Proposal: Deprecation of "cross-origin-policy" in favor of a declarative network isolation of insecure HTML tags #6553
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
Context
Web developers need declarative, simple and elegant ways to reason about security and network policies, which are not offered by origin-based policies such as
cross-origin-policy
.Why cross-origin-policy should be deprecated ?
cross-origin-policy
diverges from the HTML specificationThe technology is mainly based on HTTP headers which are not part of HTML, but of a different specification, as a transport protocol.
cross-origin-policy
is often not available for web developersMore and more websites are hosted on third-party hosting services and web developers often do not have the possibility or the knowledge necessary in order to modify or control the HTTP headers for their documents on the server-side.
cross-origin-policy
is difficult to reason about for web-developersThe technology may lead to very complicated scenarios to reason about (#6552). Moreover, by mixing server-related issues with client-side related issues, it creates confusion and incertitude in the mind of web-developers, who often do not want or need to deal with server-side related settings.
cross-origin-policy
is not secureThe technology is not able to isolate critical parts of the application in the eventuality that the hosting server itself or the transport protocol or both get compromised.
Proposal
As first proposed in
Per-Module Network Isolation
for script tags (#6547), we could achieve security and have fine-grained control over network policies via the declarative network isolation of insecure HTML tags. This proposal is thus an extension of declarative network isolation for all insecure HTML tags beyond thescript
tag.For example, we could declare for a
siteA.com
embedding asiteB.com
, thatsiteB.com
can gain network access for all domains excepted the embedder domainsiteA.com
, via theallow-net
attribute in the insecureiframe
tag, with a value set to an exclusion!
reference forsiteA.com
and an all*
reference for every other domain:Meaning simply here that
siteB.com
could not accesssiteA.com
resources.By default, an empty document such as
about:blank
or the main document of the websitesiteA.com
would not have any network access (w3c/webappsec #578), but we could define and restrict network access within thehead
of the HTML document:Security
For Web Applications, which require more security than mere websites and can be distributed as a Web Bundle, the
allow-net
attribute of thehead
would not be set, so that by default, the document is offline and does not have any network access.Then, isolated parts of the application could gain network access via
Per-Module Network Isolation
, allowing critical parts of the application to stay offline:Defining network policies in the form of HTML attributes would be a more secure, concise and declarative way to achieve network isolation for insecure tags than "cross-origin-policy", and would be more in line with the HTML specification.
The text was updated successfully, but these errors were encountered: