-
Notifications
You must be signed in to change notification settings - Fork 150
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
CSP: Change the scope of the Permissions API #312
Comments
I think we could have a CSP directive that disabled the permission (even if But placing a resource in a permission jail is different than trying to On Mon, Apr 27, 2015 at 1:37 PM Andy Earnshaw [email protected]
|
I hadn't thought of that, I guess a resource could just frame another resource on the site and use its permissions. Selectively denying permissions might be something that we do, or force a prompt each time a resource is loaded, if those were possible. Ideally, we don't want to cut clients off completely from these APIs, we just want to sandbox them. So how about a directive to sandbox a resource entirely, for not just the permissions API, but to treat a tree as a completely separate origin to another tree? This would apply to permissions, canvas tainting, XHR and everything else that would otherwise be managed by the same origin policy. |
You mean this? http://www.w3.org/TR/CSP2/#directive-sandbox It is very unfortunate that the sandbox attribute was designed to be On Tue, Apr 28, 2015 at 12:48 AM Andy Earnshaw [email protected]
|
Yeah, adding it to the sandbox directive sounds like it might be a good idea. What's the process for new proposals like this? |
I work for a large-scale adserving company who hosts third-party creatives on our CDN. One of the challenges we have at the moment is controlling the scope of the Permissions API. Consider the following case:
Given that, I'd like to suggest that a new directive could be implemented to change the scope of permissions from applying to an entire origin, to origin + path. For example, given the URL http://cdn.mydomain.com/1234567/12345/index.html, a relative or absolute path could be supplied. The following would be synonymous:
Obviously an absolute URL would need to match the current origin and be part of the current path's tree. For our use case, this would scope the permissions to a specific campaign, so other campaigns would need to request permissions for themselves.
This could also be useful for other sites hosting third-party content, such as JSFiddle, CodePen, or eBay listings. Is this something that could be considered for the specification?
The text was updated successfully, but these errors were encountered: