RE: [sysapps/runtime] cross origin XHR in packaged apps

On 08/04/2013 10:08, Marcos Caceres wrote:
> 
>> On Monday, April 8, 2013 at 8:17 AM, John Lyle wrote:
>> 
>> (1) The app developer should define the origins with which the app
>> needs to communicate (definition of least privilege)
>
> To clarify, by "define" I think you mean the app developer should
> attempt to access the origins through some means (e.g., XHR, an img
> tag, a script tag, etc.). CSP rules in the manifest may intervene at
> this point. But you don't mean that the app developer declares those
> origins in a list within the JSON manifest, right?

In some situations, they absolutely could declare those required origins in the manifest.  That's the model Chrome uses for extensions (CSP) and how WARP works, right?  

I'm not suggesting this is always necessary or a good idea, but it's one method for imposing least-privilege restrictions on the application.  This is what Jonas was proposing in his message on 01/04 (I'm hoping not an April fools joke).  It would significantly narrow the scope of a web application in many cases,  even if not in all.

John

Received on Monday, 8 April 2013 08:26:42 UTC