Skip to content

Cross-origin requests for secondary resources #14

@martinthomson

Description

@martinthomson

When making a request for the secondary resource, it's not clear what the properties of this request need to look like.

We could treat this as a full CORS request with a requirement for a pre-flight. That would be devastating for latency, but we could easily reason that it is safe.

We could take something of a lassez-faire approach to this and allow all credentials. That has certain risks associated with it. Even though I've tried, but cannot find a way in which this could be abused, we would have to do a lot of analysis to determine that it truly wasn't a problem. That and I'm not certain that we need to do this. One real downside is that it would allow the secondary server to track requests across origins.

The safest and fastest option is to withhold credentials on requests to the secondary resource. It's fast, and it's safe by default.

In the end, I think that the credential-free option is safest, unless we both a) discover a need for credentials, and b) are able to convince ourselves that the costs are small and manageable.

The current draft says this:

In order to prevent any leakage of information, the GET request for
the secondary resource MUST only contain information provided by the
origin server or the secondary server itself, namely HTTP
authentication credentials ([RFC7235]) and cookies ([RFC6265]).

We probably need to be a bit clearer about this, maybe with reference to (or by copying) the bit in the fetch spec that covers withCredentials: false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions