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

Add spec for APIs gated on network revocation. #204

Merged
merged 4 commits into from
Jan 14, 2025
Merged
Changes from all commits
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
38 changes: 33 additions & 5 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -762,11 +762,11 @@ can freely flow in and out without risk of the credit card information being joi
data. Because of that, the fenced frame can be constructed directly from the web platform using the
{{FencedFrameConfig}} constructor without compromising privacy. The button at this point has no
personalized data in it since it can't access the credit card data yet. The {{Document}} can only
read that credit card data once it turns off all network access, preventing the data from flowing
out of the fenced frame and preventing it from being joined with cross-site data to build a user
profile. Once it does that, the button will then display the last 4 digits of the user's credit card
number, as it is saved in the browser, inside the first-party storage partition for the ecommerce
platform's origin.
read that credit card data once it turns off all network access via
{{Fence/disableUntrustedNetwork()}}, preventing the data from flowing out of the fenced frame and
preventing it from being joined with cross-site data to build a user profile. Once it does that,
the button will then display the last 4 digits of the user's credit card number, as it is saved in
the browser, inside the first-party storage partition for the ecommerce platform's origin.

<h4 id=fenced-frame-config-struct>The [=fenced frame config=] [=struct=]</h4>

Expand Down Expand Up @@ -2196,6 +2196,34 @@ table](https://fetch.spec.whatwg.org/#destination-table) to illustrate that <{fe
* CSP directive of <code>fenced-frame-src</code>
* Features as HTML's <code>&lt;fencedframe&gt;</code>

<h3 id=gating-methods-on-network-revocation>Gating methods on network revocation</h3>

*This first introductory paragraph is non-normative.*

After a fenced frame has fully disabled untrusted network access, meaning the {{Promise}} returned
by {{Fence/disableUntrustedNetwork()}} has [=resolved=], certain powerful interface methods will
become available to script which executes inside of the fenced frame. These methods are defined in
other specifications, which will use the below algorithm to determine if invocation can occur
successfully. One example of a method which is gated behind revocation of untrusted network access
is {{SharedStorage/get()}} when invoked outside of a {{SharedStorageWorklet}}. This method is
defined in the [[Shared-Storage]] draft specification.

<div algorithm>
To <dfn export>determine if a navigable has fully revoked network</dfn> given a [=navigable=]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, since we're exporting this, is there a corresponding PR made in the Shared Storage spec yet?

Copy link
Collaborator Author

@VergeA VergeA Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, not yet. I started working on one a while ago, but there's been some refactors to the spec since then. I was waiting to rewrite it until this PR landed, so I could have a correctly-exported definition and my Shared Storage spec would build properly.

|navigable|:

1. If |navigable|'s [=navigable/traversable navigable=] is not a [=fenced navigable
domfarolino marked this conversation as resolved.
Show resolved Hide resolved
container/fenced navigable=], return false.

1. Let |config| be |navigable|'s [=navigable/active browsing context=]'s [=browsing
context/fenced frame config instance=].

1. If |config|'s [=fenced frame config instance/untrusted network status=] is not [=untrusted
network status/disabled for this tree and fenced subtrees=], return false.

1. Return true.
</div>

<h3 id=automatic-reporting>Automatic Reporting</h3>

*This first introductory paragraph is non-normative.*
Expand Down
Loading