With security, its safer (and more accurate) to assume compatibility breakage than not. Its not just syntax that can change but the rules themselves. For example if we identify new vectors for code injection, we might have to block additional APIs thus breaking sites that would otherwise effectively support CSP without any change in syntax.

Even something as relatively simple to reason about like HTTP itself is versioned, that is why each transaction starts with the HTTP version for the request. CSP is a complex security model; I would say backwards breakage in the future is inevitable regardless of how much we churn on it now, given it will have to evolve hand in hand with our understanding of the threat models. It cannot anticipate attack vectors we don't yet know about.
  Lucas.

On Jul 8, 2009, at 9:21 AM, Gervase Markham wrote:

So the versioning in the UA is to guard against a policy syntax change. But the syntax is so simple a list of (key/value pairs) that it's very, very hard to imagine a requirement which would mean we *had* to break the syntax. And yet, every request the browser ever sends acquires another six bytes, until the end of time. (This is not a UA token which changes over time as browsers change, like OS, it's one which has to be present for ever.)

I don't think the risk of needing a breaking syntax change is worth it. In that very unlikely event, we should instead plan to deploy a new header, as you say below. There's more downstream bandwidth than upstream, and there's more every year.

The other approach is to version the response, a few extra bytes only
when a server supports CSP. Yay, bandwidth win! But then what do we do?
How does the server know which version to send? Should it send every
version it knows about, and the client process the highest version it
knows how to process? That means if we ever have a CSP-2 either clients are sending two complete headers (or three, or more) or they're sending
their preferred version and users of clients which only support CSP-1
get zero protection rather than the 99% they actually support.

But this scary scenario fails to take into account the frankly tiny chance that we'll need to make one breaking syntax change, let alone two. Even with the spec as it is. Careful design can reduce the chances even further.


_______________________________________________
dev-security mailing list
dev-security@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-security

Reply via email to