Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec: Wait for network revocation in nested fenced frames before disabling network. #176

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address comments
  • Loading branch information
blu25 committed Sep 12, 2024
commit 49fe6a25dce1e55c392c30f4af5d69cbb5292cdc
27 changes: 16 additions & 11 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1878,22 +1878,27 @@ A user agent has an associated <dfn>network revocation nonce set</dfn>, which is
[=partition nonces=], and a <dfn>network revocation exemption map</dfn>, which is a [=map=] whose
[=map/keys=] are [=partition nonces=] and [=map/values=] are [=sets=] of [=URLs=].

Note: The network revocation exemption map is used only for web platform tests; in normal usage
it is always empty.
Note: The [=network revocation exemption map=] is used only for web platform tests; in normal usage
it is always empty. This list is modified directly in web platform tests by a function call to
exempt specific URLs from network revocation.

Issue: This will require a RFC to add a test-only function to the WPT web driver.
(<a href="https://github.com/WICG/fenced-frame/issues/192">WICG/fenced-frame#192</a>)

<div algorithm>
In order to <dfn>revoke network for a partition nonce</dfn> using a
[=fenced frame config instance/partition nonce=] |nonce|, run these steps:
To <dfn>revoke network for a partition nonce</dfn> using a [=fenced frame config
instance/partition nonce=] |nonce|, run these steps:

1. [=set/Append=] |nonce| to the user agent's [=network revocation nonce set=].

1. <span class=XXX>TODO: Cancel requests in progress.</span>
1. [=fetch group/terminated|Terminate=] [=this=]'s [=relevant settings object=]'s
[=fetch/fetch group=].
</div>

<div algorithm>
To determine whether fetching a [=request=] |request| <dfn>should be blocked due to a revoked
partition nonce</dfn> using a [=fenced frame config instance/partition nonce=] |nonce| and a
[=URL=] |requestURL|, run these steps:
To determine whether fetching a [=request=] <var ignore>request</var> <dfn>must be blocked due to
a revoked partition nonce</dfn> using a [=fenced frame config instance/partition nonce=] |nonce|
and a [=URL=] |requestURL|, run these steps:

1. If the user agent's [=network revocation exemption map=][|nonce|] [=map/exists=], and if
|requestURL| [=set/exists=] in it, return <b>allowed</b>.
Expand All @@ -1909,16 +1914,16 @@ it is always empty.
The network revocation mechanism requires the following monkeypatches to the [[FETCH]] Standard.

<div algorithm=network-revocation-check-patch>
In the [=main fetch=] algorithm, step 7, where it says:
In the [=fetch=] algorithm, step 7, where it says:

> If <a lt="block bad port">should <var>request</var> be blocked due to a bad port</a>,
> <a lt="should fetching request be blocked as mixed content?">
> should fetching <var>request</var> be blocked as mixed content</a>, or
> <a lt="should request be blocked by Content Security Policy?">should <var>request</var>
> be blocked by Content Security Policy</a> returns <b>blocked</b>, then set
> <var>response</var> to a <a>network error</a>.
> <var ignore>response</var> to a <a>network error</a>.

Add "[=should request be blocked due to a revoked partition nonce=]" to the conditions after
Add "[=must be blocked due to a revoked partition nonce=]" to the conditions after
"should request be blocked by Content Security Policy".
</div>

Expand Down
Loading