-
Notifications
You must be signed in to change notification settings - Fork 157
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
Feature-Policy ∪ Permission Delegation ∪ Origin Trials #9
Comments
I like it. I think we should flip the default for cascading though. cascade should be opt-out. Also, we need a disable attribute on iframe as well? |
Yep, that's what we have currently: http://igrigorik.github.io/feature-policy/#the-target-member
Yep, see: #11 |
Had an offline chat with @jpchase @clelland @mkruisselbrink today. Quick summary:
Overall though, I think we agreed that it makes sense to explore this further. Next step: convert #10 (comment) into a concrete proposal. p.s. @jpchase @clelland @mkruisselbrink please chime in if I'm forgetting anything. |
Hmm would safer defaults be for enable features not to cascade but disabled features to cascade? |
Closing this; we broke out the various pieces of #9 (comment) into separate threads. |
From: https://noncombatant.github.io/permission-delegation-api/
The recommendation is to make powerful features mediated by Permissions API (i.e. features that require user permission) disabled by default in nested context's, and require the parent context to explicitly delegate permission to each embedee to (a) enable access to said feature, and (b) pass along the permission held by the embedder to the embedee.
Functional requirement: some features are off by default in nested contexts and the parent context should have a mechanism to selectively enable access to such features.
Enable Policy
The
enable policy
allows a developer to turn on certain features for aDocument
orWorker
. The policy may be set and communicated via theFeature-Policy
HTTP Header Field, or via a declarative API.Extensions to the
iframe
elementThe
enable
attribute, when specified, enables specified features for the embedee running in theiframe
. Its value must be an unordered set of unique space-separated tokens that are ASCII case-insensitive, and is processed by the "parse enable response policy from value" algorithm.Parse enable response policy from value
Note: this would be called from "process response policy" which processes
Feature-Policy
header, and "process attribute policy".Given a list of ASCII case-insensitive tokens, this algorithm returns a list of valid enable features... Rough sketch:
enable
attribute:iframe
element'ssrc
attribute value.enforce
.null
.<insert ref to Origin Trials token processing algorithm>
algorithm returns "Enabled" when executed upon item and the document's global object:self
.enforce
.null
.There is a bunch more to work through here, but I think the above would, more or less, allow us to merge Permission Delegation and Origin Trials into a single "enable" mechanism?
The text was updated successfully, but these errors were encountered: