Serve your JS over https. That is a Good thing anyway.
Generate a new PW every time you give one out, that way all hacks become traceable, and you can turn off hacked pw (or just anything not used for 10 min).
Short term credentials are your friend.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Serve your JS over https. That is a Good thing anyway.
Generate a new PW every time you give one out, that way all hacks become traceable, and you can turn off hacked pw (or just anything not used for 10 min).
Short term credentials are your friend.
Yes, I had also thought about using short term credentials. I even thought about using the timestamp as the user, and generate/verify a password based on the timestamp plus a secret key, as suggested in the patch in Issue 1197.However, it seems rather complicated, it is completely dependent on a particular architecture (i.e. in the case of apprtc it depends on GAE), but worst of all, at the end of the day, I get the feeling that the solution is not completely secure. For example, somebody could automate chrome, or even two chrome instances, in order to simulate that this is a genuine Apprtc call, just to extract fresh
passwords from JS, and then use those passwords elsewhere.
I believe the underlying problem here, is that once you give any passwords out, the TURN server has absolutely no way of telling whether this password is being used from apprtc.appspot.com, or from my-dubious-app.com.That is why I would like you guys to consider the following proposed solution:1) When Chrome contacts the TURN server, Chrome sends user and password as usual, PLUS the domain of the page.2) The TURN server checks user and password as usual, PLUS the domain of the page. If the domain is in a pre-configured list of domains allowed to relay calls through this server, then the connection is allocated, otherwise it is rejected.Unless I am missing something, this should be trivial to implement on Chrome.On the TURN server it is a little more elaborate because you have to add a new config option, parse it, and then add the check for the domain, but it should still be fairly simple to implement, with the benefit that once it is implemented, many developers can use that implementation, test it, make improvements, etc (all the benefits of the open source philosophy).And so unless there is a simple and secure way to deploy a TURN server, I believe this issue will slow down the adoption of the webRTC technology.Just think about how long it has taken Apprtc to deploy a TURN server for concerns of opening yourselves to abuse from outsiders.
As a developer, I am right now in the same situation on which on one hand, I need to deploy a TURN server (unless I am willing to neglect 8%-15% percent of my users), but on the other hand, there is right now no simple and secure way to deploy a TURN server.
This issue is right now a show stopper for me, since I do not want to deploy a TURN server that is open and exposed to abuse.I really like the webRTC initiative, I believe it is a fantastic technology, and I would appreciate it if you could consider this proposal, and whether it is viable or not.Thank you.
Em domingo, 24 de março de 2013 03h00min36s UTC-6, Philipp Hancke escreveu:
On Sun, Mar 24, 2013 at 9:48 AM, Harald Alvestrand <h...@google.com> wrote:Serve your JS over https. That is a Good thing anyway.
Generate a new PW every time you give one out, that way all hacks become traceable, and you can turn off hacked pw (or just anything not used for 10 min).
Short term credentials are your friend.And https://code.google.com/p/webrtc/issues/detail?id=1197 has a neat plan for generating those ;-)
--
- TURN user is the AppRTC user id - TURN password is base64(timestamp + HMAC(secret key, user + timestamp))
turn user -> timestamp turn password -> base64(hmac(secret key, timestamp))
usercombo = "user_id : timestamp" turn user -> usercombo turn password -> base64(hmac(secret key, usercombo))
This allows TURN credentials to be validated against a specific user id or page instance (i.e. if that user is not logged in, the request can be ignored).
If you don't have a suitable id, the timestamp alone can be used.
Also, if the "original" proposal is the way to go, then I have a question. How TURN server will know the "timestamp" value ? Philipp avoided this by making username equal to the timestamp. But if the username is AppRTC user id, then how the timestamp value is discovered by the TURN server ? Clock synchronization is not an option, of course.
turn user -> timestamp;account
The latest proposals are equivalent. Let's choose the one. I personally think that username:timestamp is more pleasant for the eye.
Does everybody agree ?
--
In order to deploy, I am thinking a combination of short term credentials as proposed in 1197, plus maybe a counter to limit the number of short-term credentials that any user account can request in a day, or something of this sort, will do.Thank you.Regards,Rene
Em segunda-feira, 25 de março de 2013 17h55min46s UTC-6, Justin Uberti escreveu:On Sun, Mar 24, 2013 at 5:54 PM, Rene Tapia <rta...@nuxlabs.com> wrote:
Yes, I had also thought about using short term credentials. I even thought about using the timestamp as the user, and generate/verify a password based on the timestamp plus a secret key, as suggested in the patch in Issue 1197.However, it seems rather complicated, it is completely dependent on a particular architecture (i.e. in the case of apprtc it depends on GAE), but worst of all, at the end of the day, I get the feeling that the solution is not completely secure. For example, somebody could automate chrome, or even two chrome instances, in order to simulate that this is a genuine Apprtc call, just to extract freshpasswords from JS, and then use those passwords elsewhere.If someone is willing to go to this trouble, all bets are off. Even with your scheme, they could run a modified version of Chrome that hardcodes the domain to be that of your site.I think the solution proposed in 1197 is going to be the standard operating practice for this sort of thing. If you have additional concerns, this would probably be a good thing to discuss on the rtcweb mailing list, which is where security issues like this can be discussed in detail.I believe the underlying problem here, is that once you give any passwords out, the TURN server has absolutely no way of telling whether this password is being used from apprtc.appspot.com, or from my-dubious-app.com.That is why I would like you guys to consider the following proposed solution:1) When Chrome contacts the TURN server, Chrome sends user and password as usual, PLUS the domain of the page.2) The TURN server checks user and password as usual, PLUS the domain of the page. If the domain is in a pre-configured list of domains allowed to relay calls through this server, then the connection is allocated, otherwise it is rejected.Unless I am missing something, this should be trivial to implement on Chrome.On the TURN server it is a little more elaborate because you have to add a new config option, parse it, and then add the check for the domain, but it should still be fairly simple to implement, with the benefit that once it is implemented, many developers can use that implementation, test it, make improvements, etc (all the benefits of the open source philosophy).And so unless there is a simple and secure way to deploy a TURN server, I believe this issue will slow down the adoption of the webRTC technology.Just think about how long it has taken Apprtc to deploy a TURN server for concerns of opening yourselves to abuse from outsiders.FWIW, abuse concerns are not the reason this has taken so long.As a developer, I am right now in the same situation on which on one hand, I need to deploy a TURN server (unless I am willing to neglect 8%-15% percent of my users), but on the other hand, there is right now no simple and secure way to deploy a TURN server.Seems like an opportunity for an entrepreneur :)This issue is right now a show stopper for me, since I do not want to deploy a TURN server that is open and exposed to abuse.I really like the webRTC initiative, I believe it is a fantastic technology, and I would appreciate it if you could consider this proposal, and whether it is viable or not.Thank you.
Em domingo, 24 de março de 2013 03h00min36s UTC-6, Philipp Hancke escreveu:
On Sun, Mar 24, 2013 at 9:48 AM, Harald Alvestrand <h...@google.com> wrote:Serve your JS over https. That is a Good thing anyway.
Generate a new PW every time you give one out, that way all hacks become traceable, and you can turn off hacked pw (or just anything not used for 10 min).
Short term credentials are your friend.And https://code.google.com/p/webrtc/issues/detail?id=1197 has a neat plan for generating those ;-)
We added implementation of the short-term credentials mechanism to our rfc5766-turn-server:
http://code.google.com/p/rfc5766-turn-server/
My understanding is that WebRTC is not supporting the short-term credentials. But it could be used in the following fashion:
1) WebRTC server and TURN server are using the same database and have access to the same database table of short-term credentials users.
2) When web server is about to generate a new page for the client, it can generate a new password for the user (or it even can generate a totally new temporary account).
3) Web server updates/inserts the information in the database. The lifetime of this information is very short - a minute or 5 minutes or similar.
4) Web server generates the requested page for the client.
5) Client obtains the page and contacts the TURN server.
6) The TURN server checks the database, grants permission to the client and caches the information for the session.
7) Optionally, the TURN server can be implemented so that it removes or changes the record in the database immediately after the first access so that
it cannot be reused. It makes every password one-time password only. The TURN server needs it only once.
8) After the expiration time, the web server removes the record from the table (if the TURN server has not done that before).
This scheme can be extended with ACL: the web server can generate temporary ACL grant for the particular client IP, so that the password can be used only from a particulr IP. The TURN server checks the ACL rejects the client if it is requesting access from a different address. Of course, the web server and the TURN server must be "near" in the network terms and see the client as network agent with the same IP.