Open Bug 833509 Opened 12 years ago Updated 2 years ago

Add URI protocol handlers for STUN and TURN

Categories

(Core :: WebRTC, defect, P4)

defect

Tracking

()

People

(Reporter: jib, Unassigned)

References

(Blocks 1 open bug)

Details

The nsURI class does not currently have protocol handlers for "STUN:", "STUNS:", "TURN:" and "TURNS:". This is needed to centralize parsing and to give us proper validation and restriction enforcement of stun/turn urls. Adam wrote in bug 825703, comment 43: > ... the STUN URL scheme is defined in > http://tools.ietf.org/html/draft-nandakumar-rtcweb-stun-uri-02 > and TURN is described in > http://tools.ietf.org/html/draft-petithuguenin-behave-turn-uri-03 > (but note that neither of these have been adopted by an IETF working group, > so they're still very much works in progress). > [...] > Jan-Ivar points out that the W3C spec gives an example that doesn't conform to > syntax (http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcconfiguration-type > contains a <username>) so there is still some harmonization necessary. > ... > Extra credit reading on the design of the URL syntax: > http://blog.marc.petit-huguenin.org/2012/09/on-design-of-stun-and-turn-uri-formats.html Boris wrote in bug 825703, comment 44: > ... So looks like the relevant BNF is: > > stun:<stun-host>:<stun-port> > stuns:<stun-host>:<stun-port> > > turnURI = scheme ":" host [ ":" port ] [ "?transport=" transport ] > transport = "udp" / "tcp" / transport-ext > transport-ext = 1*unreserved > > We should probably actually enforce those restrictions somewhere.
We don;t need to add anything to the URI classes. Protocol handlers are just services exposed via standardized contract IDs. Whatever code is interested in these URIs can just implement a protocol handler.
Component: Networking → WebRTC
QA Contact: jsmith
Summary: Add protocol handlers for STUN and TURN to the URI class → Add URI protocol handlers for STUN and TURN
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
Whiteboard: [WebRTC] [blocking-webrtc-]
backlog: --- → webRTC+
Rank: 35
Whiteboard: [WebRTC] [blocking-webrtc-]
Mass change P3->P4 to align with new Mozilla triage process.
Priority: P3 → P4

Any relevance to this bug now?

Assignee: rjesup → nobody
Flags: needinfo?(docfaraday)

I think this is going to be important for bug 1529588. Marking it as blocking for now.

Blocks: 1529588
Flags: needinfo?(docfaraday)

(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #0)

The nsURI class does not currently have protocol handlers for "STUN:",
"STUNS:", "TURN:" and "TURNS:". This is needed to centralize parsing and to
give us proper validation and restriction enforcement of stun/turn urls.

Adam wrote in bug 825703, comment 43:

... the STUN URL scheme is defined in
http://tools.ietf.org/html/draft-nandakumar-rtcweb-stun-uri-02
and TURN is described in
http://tools.ietf.org/html/draft-petithuguenin-behave-turn-uri-03
(but note that neither of these have been adopted by an IETF working group,
so they're still very much works in progress).
[...]
Jan-Ivar points out that the W3C spec gives an example that doesn't conform to
syntax (http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcconfiguration-type
contains a <username>) so there is still some harmonization necessary.
...
Extra credit reading on the design of the URL syntax:
http://blog.marc.petit-huguenin.org/2012/09/on-design-of-stun-and-turn-uri-formats.html

This article is no longer available but here's an earlier snapshot:
https://web.archive.org/web/20160514042254/http://blog.marc.petit-huguenin.org/2012/09/on-design-of-stun-and-turn-uri-formats.html

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.