@@ -322,7 +322,7 @@ The <dfn abstract-op export>should |url| be blocked by Connection Allowlist</dfn
322322
3233231. [=list/iterate|For each=] |connection allowlist| in |connection allowlists|:
324324
325- 1. If |url| [$matches$] |connection allowlist|'s [=Connection Allowlist/allowlist =] ,
325+ 1. If [=match a URL to a Connection Allowlist=] given |url| and |connection allowlist| returns [=success =] ,
326326 [=continue=] .
327327
328328 2. [$report|Report a violation$] given |url|, |environment|, and
@@ -413,7 +413,7 @@ an [=environment=] (|environment|), and a [=connection allowlist=] (|allowlist|)
413413 redirect targets.
414414
415415 : {{ConnectionAllowlistViolationReport/allowlist}}
416- :: |allowlist|'s [=Connection Allowlist/allowlist=]
416+ :: A new list containing the result of serializing each pattern in |allowlist|'s [=Connection Allowlist/allowlist=]
417417
418418 : {{ConnectionAllowlistViolationReport/disposition}}
419419 :: |allowlist|'s [=Connection Allowlist/disposition=] .
@@ -513,9 +513,11 @@ to carefully consider how to layer the allowlisting mechanism described here int
513513Most saliently, the mechanism is context-specific, not origin-wide. This leaves broad opportunity
514514for an attacker with scripting access to bypass a context's allowlist by finding a same-origin
515515context with lower restrictions. Integration with HTML's [=policy container=] addresses some of
516- those possibilities, but it's likely that others will exist. Allowlisting the document's origin
517- (via <a grammar for="Connection-Allowlist">`response-origin`</a> or explicitly), reaching up
518- through the frame tree, etc.
516+ those possibilities, but it's likely that others will exist. An attacker might, for example,
517+ be able to reach up through the frame tree to a less-restricted parent, or pop open a new window
518+ via `window.open()` which retains an opener relationship. Allowlisting the document's origin
519+ (via <a grammar for="Connection-Allowlist">`response-origin`</a> or explicitly), is therefore
520+ not a complete solution in and of itself.
519521
520522There are scenarios in which developers can avoid this risk by sandboxing the allowlisted context
521523away from its normal origin via <{iframe/sandbox}> attributes or Content Security Policy's
@@ -528,6 +530,37 @@ their dependencies' allowlists to some extent. An opt-in mechanism rooted in som
528530be helpful to explore.
529531
530532
533+ Service Workers {#security-service-worker}
534+ ---------------
535+
536+ [=Service Workers=] complicate the story around allowlists, just as other same-origin contexts do.
537+ Because they have a [=/policy container=] distinct from each of the documents they manage, it's
538+ quite possible for them to respond to messages or requests initiated in documents whose allowlist
539+ differs from the service worker's allowlist. This proposal follows other policies' design, allowing
540+ for these differences in capability.
541+
542+ If developers wish to constrain service workers' ability to make requests, they can deliver an
543+ allowlist along with the worker script, but they'll need to ensure that this allowlist is a superset
544+ of the allowlists of any document it might service.
545+
546+
547+ DNS {#security-dns}
548+ ---
549+
550+ Connection Allowlists rely on URL matching to determine whether a given endpoint is acceptable. This
551+ approach, like any other name-based mechanism, can be subverted if the name maps to an unexpected
552+ server. The allowlist depends on an accurate mapping of [=/hosts=] to servers in order for the
553+ constraints it imposes to be meaningful.
554+
555+ Developers should mitigate the risk of DNS hijacking and/or rebinding by relying upon authenticated
556+ connections: allowlisting only secure protocols will make it much more difficult for an attacker in
557+ control over DNS to shift traffic to an arbitrary endpoint, as the TLS handshake will require
558+ possession of a certificate with the relevant name.
559+
560+ ISSUE: Should we restrict the allowlist's patterns to those representing secure protocols? Or punt
561+ the header entirely for non-secure origins?
562+
563+
531564`postMessage(...)` {#security-postmessage}
532565------------------
533566
0 commit comments