From 97afb135474e866b3e90d1bf337fdb8db035fb01 Mon Sep 17 00:00:00 2001
From: Jan-Ivar Bruaroey
SecureCorp Inc. restructured its domains and now needs to needs to delegate +
SecureCorp Inc. restructured its domains and now needs to delegate
use of the Geolocation API to its origin ("https://example.com
")
as well as three subdomains ("https://geo.example.com
",
"https://geo2.example.com
", and "https://new.geo2.example.com
").
@@ -163,6 +163,38 @@ spec: RFC8941; urlPrefix: https://datatracker.ietf.org/doc/html/rfc8941#
to use the Geolocation API, but any other ports on "https://example.com
"
could use it too.
JSPlaygroundCorp Inc. wants to host user-generated web applications, but wants the
+ browser to manage their permissions to use powerful features in isolation of each other.
+ This can be accomplished by creating discrete subdomains for each piece of web-content
+ or web-content creator, and navigating them as top-level documents (framework and
+ user-content can still be separated using same-origin iframes).
+
+ JSPlaygroundCorp should avoid iframing the web-content using the "allow
"
+ attribute from its own domain.
+
PlatformCorp Inc. wants to offer a marketplace of embeddable third-party components + to build from or games to play. It wants to delegate + the use of powerful features like the getUserMedia API responsibly. It keeps + track of which components need a feature, using bespoke "install" UX to keep end-users + in charge.
+Camera and microphone are disabled by default in all cross-origin frames.
+ Each third-party component has a subdomain, and can be embedded in a
+ cross-origin iframe. PlatformCorp can use the "allow
" attribute on
+ the iframe element to control whether to delegate camera or microphone access or
+ not to each subdomain.
+ An iframe where "plugin1" and "plugin3" should have camera access and "plugin2"
+ should have microphone access might look like this:
+
+ <iframe + allow="camera //plugin1.site.com //plugin3.site.com; microphone //plugin2.site.com" + src="//doc1.site.com" sandbox="allow-same-origin allow-scripts"></iframe> ++
Iframe attributes can selectively enable features in certain frames, and + not in others, even if those contain documents from the same origin. + The list of sandbox tokens might be longer in practice.
+JSPlaygroundCorp Inc. wants to host user-generated web applications, but wants the
- browser to manage their permissions to use powerful features in isolation of each other.
+ browser to manage their permissions to use [=powerful features=] in isolation of each other.
This can be accomplished by creating discrete subdomains for each piece of web-content
or web-content creator, and navigating them as top-level documents (framework and
user-content can still be separated using same-origin iframes).
From 72c3f933f1cf096e53c3bede94fa319740f9edd3 Mon Sep 17 00:00:00 2001
From: Jan-Ivar Bruaroey Iframe attributes can selectively enable features in certain frames, and
- not in others, even if those contain documents from the same origin.
+ not in others, even if those contain documents from the [=same origin=].
The list of sandbox tokens might be longer in practice.
spec:payment-request; urlPrefix: https://w3c.github.io/payment-request/ @@ -170,25 +171,31 @@ spec: RFC8941; urlPrefix: https://datatracker.ietf.org/doc/html/rfc8941# or web-content creator, and navigating them as top-level documents (framework and user-content can still be separated using same-origin iframes). - JSPlaygroundCorp should avoid iframing the web-content using the "allow
" - attribute from its own domain. + This is necessary since users grant permissions to the domain they perceive they + are interacting with in the browser, which is the top-level domain. + + JSPlaygroundCorp should avoid iframing user-generated web applications using the + <{iframe/allow}> attribute from its own domain in this case, as this would grant + its domain permissions to all of them.-PlatformCorp Inc. wants to offer a marketplace of embeddable third-party components - to build from or games to play. It wants to delegate - the use of powerful features like the getUserMedia API responsibly. It keeps - track of which components need a feature, using bespoke "install" UX to keep end-users - in charge.
+PlatformCorp Inc. wants to offer a marketplace of embeddable third-party + components to build from or games to play under its top-level domain. It wants to + delegate the use of [=powerful features=] like the {{MediaDevices/getUserMedia()}} + API responsibly. It accepts responsibility for tracking which of its component + applications need a feature, using bespoke "install" UX to keep end-users in + charge.
Camera and microphone are disabled by default in all cross-origin frames. Each third-party component has a subdomain, and can be embedded in a - cross-origin iframe. PlatformCorp can use the "
allow
" attribute on - the iframe element to control whether to delegate camera or microphone access or - not to each subdomain. - An iframe where "plugin1" and "plugin3" should have camera access and "plugin2" - should have microphone access might look like this: + cross-origin iframe. PlatformCorp can use the <{iframe/allow}> attribute on + the <{iframe}> element to control whether to delegate camera or microphone + access or not to each subdomain. If the user already trusts PlatformCorp then + there might be no additional permission prompt in this case. + + An iframe where the component "app1" should have camera access, "app2" should + have microphone access, and "app3" should have both might look like this:- <iframe - allow="camera //plugin1.site.com //plugin3.site.com; microphone //plugin2.site.com" + <iframe allow="camera //app1.site.com //app3.site.com; microphone //app2.site.com" src="//doc1.site.com" sandbox="allow-same-origin allow-scripts"></iframe>Iframe attributes can selectively enable features in certain frames, and From 8a3de8f3ff758e209ffcf109e0f02d6bb993d5d3 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey
Date: Thu, 20 Jun 2024 15:33:33 -0400 Subject: [PATCH 5/6] Move note about permission prompt last --- index.bs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index da9c6ad3..5775b27c 100644 --- a/index.bs +++ b/index.bs @@ -189,8 +189,7 @@ spec: RFC8941; urlPrefix: https://datatracker.ietf.org/doc/html/rfc8941# Each third-party component has a subdomain, and can be embedded in a cross-origin iframe. PlatformCorp can use the <{iframe/allow}> attribute on the <{iframe}> element to control whether to delegate camera or microphone - access or not to each subdomain. If the user already trusts PlatformCorp then - there might be no additional permission prompt in this case. + access or not to each subdomain. An iframe where the component "app1" should have camera access, "app2" should have microphone access, and "app3" should have both might look like this: @@ -201,6 +200,8 @@ spec: RFC8941; urlPrefix: https://datatracker.ietf.org/doc/html/rfc8941# Iframe attributes can selectively enable features in certain frames, and not in others, even if those contain documents from the [=same origin=]. The list of sandbox tokens might be longer in practice.
+If the user already trusts PlatformCorp then + there might not be any additional permission prompt in this case.
From 8075bc024f91a1c2ed5e60d0c0d20f6abacf2638 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Wed, 26 Jun 2024 15:36:07 -0400 Subject: [PATCH 6/6] Fix example and add feedback to paragraph on prompts --- index.bs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/index.bs b/index.bs index 5775b27c..99444fe8 100644 --- a/index.bs +++ b/index.bs @@ -194,14 +194,20 @@ spec: RFC8941; urlPrefix: https://datatracker.ietf.org/doc/html/rfc8941# An iframe where the component "app1" should have camera access, "app2" should have microphone access, and "app3" should have both might look like this: - <iframe allow="camera //app1.site.com //app3.site.com; microphone //app2.site.com" - src="//doc1.site.com" sandbox="allow-same-origin allow-scripts"></iframe> + <iframe + allow="camera https://app1.site.com https://app3.site.com; + microphone https://app2.site.com https://app3.site.com" + src="https://doc1.site.com" + sandbox="allow-same-origin allow-scripts"> + </iframe>Iframe attributes can selectively enable features in certain frames, and not in others, even if those contain documents from the [=same origin=]. The list of sandbox tokens might be longer in practice.
-If the user already trusts PlatformCorp then - there might not be any additional permission prompt in this case.
+Since browsers generally ask users to grant permissions to the top-level + domain, there might not be any additional permission prompt for the + components to request camera or microphone access if the user already + trusts PlatformCorp.