per dir trust for amazon s3 and other CDN hosted scripts

Bug reports and enhancement requests
Post Reply
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

per dir trust for amazon s3 and other CDN hosted scripts

Post by al_9x »

s3 urls have the following pattern:
http(s)://s3.amazonaws.com/{app}/{resource}
perhaps other CDNs use something similar. In this case it's meaningless to grant trust to the domain since it's just a container of many apps from many customers. Site Specific Permissions Policy would mitigate this, but still it would be better to trust the {app} and not the whole domain, even in a site specific scenario. How feasible is this?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: per dir trust for amazon s3 and other CDN hosted scripts

Post by Giorgio Maone »

al_9x wrote:How feasible is this?
Currently it's not (the whole browser security model is per-site, rather than per-path).
However you can do some fine tuning with ABE.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
dhouwn
Bug Buster
Posts: 968
Joined: Thu Mar 19, 2009 12:51 pm

Re: per dir trust for amazon s3 and other CDN hosted scripts

Post by dhouwn »

There are no paths, there is only a part of the URI that resembles paths. It's up to the web server how to handle this.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2) Gecko/20100115 Firefox/3.6
User avatar
Giorgio Maone
Site Admin
Posts: 9527
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: per dir trust for amazon s3 and other CDN hosted scripts

Post by Giorgio Maone »

dhouwn wrote:There are no paths, there is only a part of the URI that resembles paths. It's up to the web server how to handle this.
Not sure about what you mean here. From the browser's standpoint, they're paths (the browser can't tell what they mean to the server, e.g. if they point to actual filesystem resources or they trigger some application action through URL rewriting).
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
al_9x
Master Bug Buster
Posts: 931
Joined: Thu Mar 19, 2009 4:52 pm

Re: per dir trust for amazon s3 and other CDN hosted scripts

Post by al_9x »

Giorgio Maone wrote:However you can do some fine tuning with ABE.
I find Using ABE to selectively grant access to s3 is like using RequestPolicy without the convenience of its UI. This really needs a better approach, like Site Specific Permissions Policy.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
danblake
Posts: 1
Joined: Sat Nov 06, 2010 6:35 am

Re: per dir trust for amazon s3 and other CDN hosted scripts

Post by danblake »

Would it be possible to just add some specific rules for s3 / cloudfront / etc.. (the most common CDN's) that was something along the lines of:

If top level domain is whitelisted, then trust all CDN's - Else, dont.

Additionally, perhaps we can treat the s3 domains as partial urls ( http://s3.amazonaws.com/customer/ gets white listed, instead of just s3.amazonaws.com )

So basically if I am browsing twitter.com. any CDN that trys to load scripts on twitter.com would be allowed (provided i have given permissions to twitter.com )
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Post Reply