diff --git a/source b/source index 260d0228fa1..65164728782 100644 --- a/source +++ b/source @@ -2460,7 +2460,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

The following terms are defined in MIME Sniffing:

@@ -2486,6 +2487,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute -
Cross-Origin Embedder Policy
- -
-

The following features are defined in Cross-Origin Embedder Policy:

- - -
-
@@ -9027,6 +9034,9 @@ partial interface Document { empty string, which represents the default referrer policy used by fetches initiated by the Document.

+

The Document has an embedder + policy (an embedder policy).

+

The Document has a CSP list, which is a CSP list containing all of the Content Security Policy objects active for the document. The @@ -76674,6 +76684,10 @@ popup4.close(); referrer policy to creator's referrer policy.

+
  • If creator is non-null, then set document's + embedder policy to creator's + embedder policy.

  • +
  • Add document to browsingContext's session history.

  • @@ -78832,6 +78846,11 @@ interface BarProp {
  • Return document's referrer policy.

  • + +
    The embedder policy
    +

    Return window's associated + Document's embedder + policy.

    @@ -80073,9 +80092,8 @@ interface BarProp {

    If value[0] is "same-origin", then:

      -
    1. Let coep be the result of obtaining a cross-origin embedder - policy from response.

    2. +
    3. Let coep be the result of obtaining + an embedder policy from response.

    4. If coep is "require-corp", then return "same-origin-plus-COEP".

    5. @@ -80176,6 +80194,277 @@ interface BarProp { +

      Cross-origin embedder policies

      + +

      An embedder policy value controls the fetching of cross-origin + resources without explicit permission from resource owners. There are two such values:

      + +
      +
      "unsafe-none"
      +

      This is the default value. When this value is used, cross-origin resources can be fetched + without giving explicit permission through the CORS protocol or the + `Cross-Origin-Resource-Policy` header.

      + +
      "require-corp"
      +

      When this value is used, fetching cross-origin resources requires the server's + explicit permission through the CORS protocol or the + `Cross-Origin-Resource-Policy` header.

      +
      + +

      An embedder policy consists of:

      + + + +

      The "coep" report type is a report type + whose value is "coep". It is visible to + ReportingObservers.

      + +

      The headers

      + +

      The `Cross-Origin-Embedder-Policy` and + `Cross-Origin-Embedder-Policy-Report-Only` HTTP response header fields allow a server + to declare an embedder policy for an environment settings object. These + headers are structured headers whose values must be + token. + +

      The valid token values are the embedder policy values. The token may also have attached parameters; of these, the "report-to" parameter can have a valid URL + string identifying an appropriate reporting endpoint.

      + +
      +

      The processing model fails open (by defaulting + to "unsafe-none") in the presence of a header that cannot + be parsed as a token. This includes inadvertent lists created by combining multiple instances of + the `Cross-Origin-Embedder-Policy` header present in a given response:

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      `Cross-Origin-Embedder-Policy`Final embedder policy value
      No header delivered"unsafe-none"
      `require-corp`"require-corp"
      `unknown-value`"unsafe-none"
      `require-corp, unknown-value`"unsafe-none"
      `unknown-value, unknown-value`"unsafe-none"
      `unknown-value, require-corp`"unsafe-none"
      `require-corp, require-corp`"unsafe-none"
      + +

      (The same applies to `Cross-Origin-Embedder-Policy-Report-Only`.)

      +
      + +
      + +

      To obtain an embedder policy from a response response:

      + +
        +
      1. Let policy be a new embedder policy.

      2. + +
      3. Let parsedItem be the result of getting a structured header + with `Cross-Origin-Embedder-Policy` and "item".

      4. + +
      5. +

        If parsedItem is neither failure nor null and parsedItem[0] is "require-corp":

        + +
          +
        1. Set policy's value to "require-corp".

        2. . + +
        3. If parsedItem[1]["report-to"] exists, then set policy's endpoint to parsedItem[1]["report-to"].

        4. +
        +
      6. + +
      7. Set parsedItem to the result of getting a structured header + with `Cross-Origin-Embedder-Policy-Report-Only` and "item".

      8. + +
      9. +

        If parsedItem is neither failure nor null and parsedItem[0] is "require-corp":

        + +
          +
        1. Set policy's report only + value to "require-corp".

        2. . + +
        3. If parsedItem[1]["report-to"] exists, then set policy's report only reporting endpoint + to parsedItem[1]["report-to"].

        4. +
        +
      10. + +
      11. Return policy.

      12. +
      + +

      Embedder policy checks

      + +

      To check a navigation response's adherence to its embedder policy given a response response and a browsing context + target:

      + +
        +
      1. If target is not a child browsing context, then return + true.

      2. + +
      3. Let responsePolicy be the result of obtaining an embedder policy from response.

      4. + +
      5. Let parentPolicy be target's container document's embedder policy.

      6. + +
      7. If parentPolicy's report only + value is "require-corp" and + responsePolicy's value is "unsafe-none", then queue a cross-origin embedder policy + inheritance violation with response, "navigation", + parentPolicy's report + only reporting endpoint, and target's container document's relevant settings + object.

      8. + +
      9. If parentPolicy's value is "unsafe-none" or responsePolicy's value is "require-corp", then return true.

      10. + +
      11. Queue a cross-origin embedder policy inheritance violation with + response, "navigation", parentPolicy's reporting endpoint, and target's + container document's relevant settings + object.

      12. + +
      13. Return false.

      14. +
      + +

      To check a global object's embedder policy given a WorkerGlobalScope + workerGlobalScope, an environment settings object owner, and + a response response:

      + +
        +
      1. If workerGlobalScope is not a DedicatedWorkerGlobalScope object, + then return true.

      2. + +
      3. Let policy be workerGlobalScope's embedder policy. + +

      4. Let ownerPolicy be owner's embedder policy. + +

      5. If ownerPolicy's report only + value is "require-corp" and policy's + value is "unsafe-none", then queue a cross-origin embedder policy + inheritance violation with response, "worker + initialization", owner's policy's report only reporting endpoint, + and owner.

      6. + +
      7. If ownerPolicy's value is "unsafe-none" or policy's value is "require-corp", then return true.

      8. + +
      9. Queue a cross-origin embedder policy inheritance violation with + response, "worker initialization", owner's policy's + reporting endpoint, and + owner.

      10. + +
      11. Return false.

      12. +
      + +

      To queue a cross-origin embedder policy inheritance violation given a response response, a string type, a string + endpoint, and an environment settings object settings:

      + +
        +
      1. Let serialized be the result of serializing a response URL for + reporting with response.

      2. + +
      3. +

        Let body be a new object containing the following properties:

        + + + + + + + + + + + + + + + + + + +
        keyvalue
        typetype
        blocked-urlserialized
        +
      4. + +
      5. Queue body as the + "coep" report type for endpoint on settings. +

      + + +

      Session history and navigation

      Browsing sessions

      @@ -82265,6 +82554,22 @@ interface Location { // but see also container document's origin, + browsingContext's container + document's relevant settings object, response, and true is + blocked, then set response to a network error and + break.

      + +

      Here we're running the cross-origin resource policy check + against the parent browsing context rather than + sourceBrowsingContext. This is because we care about the same-originness of the + embedded content against the parent context, not the navigation source.

      + +
    6. If response does not have a location URL or the Location { // but see also Blocked" when executed upon request, response, navigationType, source, and browsingContext.

    7. + +
    8. The result of checking a + navigation response's adherence to its embedder policy with response + and browsingContext is false.

    9. This is where the network errors defined and propagated by Fetch, @@ -82767,6 +83077,10 @@ interface Location { // but see also

      +
    10. Set document's embedder + policy to the result of obtaining an + embedder policy from response.

    11. +
    12. Initialize a Document's CSP list given document, response, and request.

      @@ -86756,6 +87070,14 @@ interface ApplicationCache : EventTarget {

      The default referrer policy for fetches performed using this environment settings object as a request client. + +

      An embedder policy
      + +

      An embedder policy used by cross-origin resource policy checks for fetches + performed using this environment settings object as a request client.

      An environment settings object also has an outstanding rejected promises @@ -98159,6 +98481,10 @@ interface WorkerGlobalScope : EventTarget { data-dfn-for="WorkerGlobalScope" data-x="concept-WorkerGlobalScope-referrer-policy">referrer policy (a referrer policy). It is initially the empty string.

      +

      A WorkerGlobalScope object has an associated embedder + policy (an embedder policy).

      +

      A WorkerGlobalScope object has an associated CSP list, which is a CSP list containing all of the Content Security @@ -98603,6 +98929,22 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope { parsing the `Referrer-Policy` header of response.

    13. +
    14. If response's url's scheme is a local scheme, then set + worker global scope's embedder policy to owner's + embedder policy.

    15. + +
    16. Otherwise, set worker global scope's embedder policy to the result of + obtaining an embedder policy from + response.

    17. + +
    18. If the result of checking a + global object's embedder policy with worker global scope, owner, + and response is false, then set response to a network + error.

    19. +
    20. Execute the Initialize a global object's CSP list algorithm on worker global scope and response.

    21. @@ -98896,6 +99238,12 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope {

      Return worker global scope's referrer policy.

    + +
    The embedder policy
    +
    +

    Return worker global scope's embedder policy.

    +
    @@ -116196,6 +116544,54 @@ interface External { text/event-stream resources.

    +

    `Cross-Origin-Embedder-Policy`

    + +

    This section describes a header for registration in the Permanent Message Header Field + Registry.

    + +
    +
    Header field name:
    +
    Cross-Origin-Embedder-Policy
    +
    Applicable protocol:
    +
    http
    +
    Status:
    +
    standard
    +
    Author/Change controller:
    +
    WHATWG
    +
    Specification document(s):
    +
    + This document is the relevant specification. +
    +
    Related information:
    +
    None.
    +
    + + +

    `Cross-Origin-Embedder-Policy-Report-Only`

    + +

    This section describes a header for registration in the Permanent Message Header Field + Registry.

    + +
    +
    Header field name:
    +
    Cross-Origin-Embedder-Policy-Report-Only
    +
    Applicable protocol:
    +
    http
    +
    Status:
    +
    standard
    +
    Author/Change controller:
    +
    WHATWG
    +
    Specification document(s):
    +
    + This document is the relevant specification. +
    +
    Related information:
    +
    None.
    +
    + +

    `Cross-Origin-Opener-Policy`

    This section describes a header for registration in the Permanent Message Header Field @@ -120893,9 +121289,6 @@ INSERT INTERFACES HERE

    [COMPUTABLE]
    (Non-normative) On computable numbers, with an application to the Entscheidungsproblem, A. Turing. In Proceedings of the London Mathematical Society, series 2, volume 42, pages 230-265. London Mathematical Society, 1937.
    -
    [COEP]
    -
    Cross-Origin Embedder Policy, M. West. WICG.
    -
    [COOKIES]
    HTTP State Management Mechanism, A. Barth. IETF.
    @@ -121129,6 +121522,9 @@ INSERT INTERFACES HERE
    [MEDIASTREAM]
    Media Capture and Streams, D. Burnett, A. Bergkvist, C. Jennings, A. Narayanan. W3C.
    +
    [REPORTING]
    +
    Reporting, D. Creager, I. Clelland, M. West. W3C.
    +
    [MFREL]
    Microformats Wiki: existing rel values. Microformats.