-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce 'webrtc' as a simple on/off switch #457
Conversation
The 'webrtc-src' directive is a proposal for handling WebRTC connections. This patch isn't exactly finished, but it should at least give a concrete proposal that we can discuss in w3c#92.
Minor conflicts wrt. new sections added; just required picking an order.
There's no longer any server/peer specific logic, it's just yes or no now.
The CI has pointed out that I need to sign off on some licensing stuff. I'm not affiliated with any relevant organization, so probably this case applies:
how do I go about this? |
Paging @samuelweiler, can you help with this? |
@zenhack Thanks for asking. It's a multi-stage process, but it's also easy.
|
I went through the process re: IPR, invited expert application is pending, thanks. @mozfreddyb, could you also weigh in on the telemetry question? |
@zenhack I was apparently somewhat wrong about the process - or at least the links; you don't need to become an IE to do this. You should now have an email with the proper form. |
This would be a breaking change.
To make it more apparent that this is a stand-alone thing which doesn't inherit from anything else, per @annevk's suggestion.
...since we've backed out the finer grained cases.
The one big TODO still left is the integration section. My current thinking is that the constructor for https://www.w3.org/TR/webrtc/#constructor afaik there are no other entry points that would need to be blocked. Thoughts? |
If you block the constructor you'll also block |
Hm, that hadn't specifically been my intent, is it a corollary of some detail of how object transfer works that I'm unaware of? Note that the discussion in w3c/mediacapture-extensions#16 (comment) is about transferring Note that there's some suggestion of making |
I think so, even though it would be opt-in. We should try to avoid that with WebTransport. |
I was assuming Web Transport would tie into |
Also, this kind of thing still seems reasonable to me, but cc @antosart to evaluate this from Chromium's perspective. |
¯\_(ツ)_/¯ |
Ok, so I think we're just waiting on @annevk now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @zenhack for your tireless efforts on fixing this gap in the web platform. It's unfortunate this is the best we can do due to web compatibility, but that's still a lot better than doing nothing at all.
I think it's worth updating #457 (comment) to explain the setup we ended up with.
This as well w3c/webrtc-extensions#81 look good to me.
Is there a web-platform-tests PR as well?
@antosart can clarify that, but I would recommend at least writing some basic tests to ensure everyone is on the same page. |
Yes, right. It would be great to have a basic web platform test before merging this one. |
...as specified in: - w3c/webappsec-csp#457 - w3c/webrtc-extensions#81
Opened web-platform-tests/wpt#32914; could use feedback. |
Thanks! It seems like that would be best reviewed by @alvestrand or @jan-ivar or someone of their choosing. Like @antosart I'm not familiar enough with WebRTC testing. |
WPT test in web-platform-tests/wpt#32914 seems ready to land. |
Can someone merge this please? I need this today. Thanks |
* Test webrtc/content-security-policy integration ...as specified in: - w3c/webappsec-csp#457 - w3c/webrtc-extensions#81 * Fix typos in comment. Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> * Fix ice candidate exchange in CSP webrtc tests. we should be passing each candidate to the *other* pc. Tests now behave as expected. * CSP webrtc tests: listen for connection state change, not gathering. See #32914 (comment) * CSP webrtc tests: drop unnecessary stun server. * webrtc csp: simplify state checking "new" is the initial state. Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
I don't have merge access in this repo, but I just merged the wpt this depended on, so maybe someone else can do the honors? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is good to merge for me. Could you just fix a few stylistic nits? (I would have done it myself, but I have no edit rights on your repo). Thanks!
index.bs
Outdated
<h3 id="webrtc-integration">Integration with WebRTC</h3> | ||
|
||
<p>The [=administratively-prohibited=] algorithm calls [[#should-block-rtc-connection]] | ||
when invoked, and prohibits all candidates if it returns "`Blocked`."</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
"`Blocked`".
(swap "
and .
)
index.bs
Outdated
[[#create-violation-for-global]] on |global|, |policy|, and | ||
|directive|'s <a for="directive">name</a>. | ||
|
||
3. Set |violation|'s <a for="violation">resource</a> to null. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
`null`
(with backquotes)
index.bs
Outdated
</div> | ||
|
||
<h5 algorithm id="webrtc-pre-connect"> | ||
`webrtc` Preconnect Check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Pre-connect
for consistency.
index.bs
Outdated
|
||
1. If this directive's [=directive/value=] contains a single item which is an | ||
<a>ASCII case-insensitive</a> match for the string "<a grammar>`'allow'`</a>", | ||
return "Allowed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
"`Allowed`".
(with backquotes, and dot at the end).
@antosart weirdly enough I do have push access so I made the requested changes + one bonus. |
Ok, then let's merge it. |
…2914) * Test webrtc/content-security-policy integration ...as specified in: - w3c/webappsec-csp#457 - w3c/webrtc-extensions#81 * Fix typos in comment. Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> * Fix ice candidate exchange in CSP webrtc tests. we should be passing each candidate to the *other* pc. Tests now behave as expected. * CSP webrtc tests: listen for connection state change, not gathering. See web-platform-tests#32914 (comment) * CSP webrtc tests: drop unnecessary stun server. * webrtc csp: simplify state checking "new" is the initial state. Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
…gration, a=testonly Automatic update from web-platform-tests Test webrtc/content-security-policy integration (#32914) * Test webrtc/content-security-policy integration ...as specified in: - w3c/webappsec-csp#457 - w3c/webrtc-extensions#81 * Fix typos in comment. Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> * Fix ice candidate exchange in CSP webrtc tests. we should be passing each candidate to the *other* pc. Tests now behave as expected. * CSP webrtc tests: listen for connection state change, not gathering. See web-platform-tests/wpt#32914 (comment) * CSP webrtc tests: drop unnecessary stun server. * webrtc csp: simplify state checking "new" is the initial state. Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> -- wpt-commits: 0abba58602758eb8be11c38788c6f51fed2529e4 wpt-pr: 32914
…gration, a=testonly Automatic update from web-platform-tests Test webrtc/content-security-policy integration (#32914) * Test webrtc/content-security-policy integration ...as specified in: - w3c/webappsec-csp#457 - w3c/webrtc-extensions#81 * Fix typos in comment. Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> * Fix ice candidate exchange in CSP webrtc tests. we should be passing each candidate to the *other* pc. Tests now behave as expected. * CSP webrtc tests: listen for connection state change, not gathering. See web-platform-tests/wpt#32914 (comment) * CSP webrtc tests: drop unnecessary stun server. * webrtc csp: simplify state checking "new" is the initial state. Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com> -- wpt-commits: 0abba58602758eb8be11c38788c6f51fed2529e4 wpt-pr: 32914
Merged to the webappsec-csp repo in April: w3c/webappsec-csp#457
Merged to the webappsec-csp repo in April: w3c/webappsec-csp#457
This builds on #287; I've merged in changes from master and then changed the description so that this is a simple on-off switch with
*
allowing anything and'none'
denying everything.The original PR had at least one TODO in there that I haven't yet tackled, so this is definitely still in the "starting point for discussion" phase.
PTAL
(2022-02-14): For folks not wanting to wade through over a year worth of comments, a summary of things that we ended up settling on:
webrtc-src
towebrtc
, and we don't inherit from any other directive due to compatibility considerations.'allow'
and'block'
, rather than*
and'none'
Preview | Diff