Revision 4c8580c189ce4501997af80b599bea070b1a7299 authored by Ian Clelland on 13 April 2018, 01:59:02 UTC, committed by Philip Jägenstedt on 13 April 2018, 12:05:15 UTC
Currently, policy-controlled features do not work as expected in
frames with opaque origins, such as isolated sandboxes and data: URLs,
because the eventual opaque origin of the frame is not known when the
HTMLFrameOwnerElement builds the container policy, and so has no way
to tell the browser that a particular origin should be allowed.

This CL adds a new member to the ParsedFeaturePolicyDeclaration, which
indicates that the iframe policy is expected to apply to the origin of
the frame, and is used when that frame has an opaque origin. This can
be triggered with an iframe of the form

<iframe sandbox allow="feature">

or

<iframe sandbox allow="feature src">

This flag is checked when building the feature policy in the new frame,
and ensures that the new feature policy will allow the feature in that
origin.

This is the first part of the eventual solution -- currently this has
the effect of allowing the feature even if a sandboxed frame navigates
to a new page (causing a new opaque origin to be created for it).
Subsequent CLs will add a unique identified to each such origin, and
ensure that the generated policies are properly tied to the specific
origin of the frame.

Bug: 690520
Change-Id: Ie18b9bc3c36be6550baf5a03e355871b9589fd40
Reviewed-on: https://chromium-review.googlesource.com/963382
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550463}
1 parent 1dd03e7
History
File Mode Size
binary
closing-handshake
constructor
cookies
handlers
interfaces
keeping-connection-open
multi-globals
opening-handshake
security
unload-a-document
Close-1000-reason.htm -rw-r--r-- 1.4 KB
Close-1000.htm -rw-r--r-- 1.4 KB
Close-Reason-124Bytes.htm -rw-r--r-- 1.1 KB
Close-reason-unpaired-surrogates.htm -rw-r--r-- 1.4 KB
Close-undefined.htm -rw-r--r-- 725 bytes
Create-Secure-extensions-empty.htm -rw-r--r-- 1.4 KB
Create-Secure-url-with-space.htm -rw-r--r-- 766 bytes
Create-Secure-valid-url-array-protocols.htm -rw-r--r-- 1.4 KB
Create-Secure-valid-url-binaryType-blob.htm -rw-r--r-- 1.5 KB
Create-Secure-valid-url-protocol-setCorrectly.htm -rw-r--r-- 1.5 KB
Create-Secure-valid-url-protocol-string.htm -rw-r--r-- 1.3 KB
Create-Secure-valid-url.htm -rw-r--r-- 1.3 KB
Create-Secure-verify-url-set-non-default-port.htm -rw-r--r-- 857 bytes
Create-asciiSep-protocol-string.htm -rw-r--r-- 871 bytes
Create-blocked-port.htm -rw-r--r-- 3.1 KB
Create-invalid-urls.htm -rw-r--r-- 1.3 KB
Create-non-absolute-url.htm -rw-r--r-- 688 bytes
Create-nonAscii-protocol-string.htm -rw-r--r-- 865 bytes
Create-on-worker-shutdown.html -rw-r--r-- 974 bytes
Create-protocol-with-space.htm -rw-r--r-- 740 bytes
Create-protocols-repeated-case-insensitive.htm -rw-r--r-- 801 bytes
Create-protocols-repeated.htm -rw-r--r-- 747 bytes
Create-valid-url-array-protocols.htm -rw-r--r-- 1.4 KB
Create-valid-url-protocol-empty.htm -rw-r--r-- 796 bytes
Create-valid-url-protocol.htm -rw-r--r-- 1.4 KB
Create-valid-url.htm -rw-r--r-- 1.3 KB
Create-verify-url-set-non-default-port.htm -rw-r--r-- 835 bytes
Create-wrong-scheme.htm -rw-r--r-- 708 bytes
OWNERS -rw-r--r-- 37 bytes
README.md -rw-r--r-- 149 bytes
Secure-Close-1000-reason.htm -rw-r--r-- 1.5 KB
Secure-Close-1000-verify-code.htm -rw-r--r-- 1.5 KB
Secure-Close-1000.htm -rw-r--r-- 1.4 KB
Secure-Close-1005-verify-code.htm -rw-r--r-- 1.4 KB
Secure-Close-1005.htm -rw-r--r-- 971 bytes
Secure-Close-2999-reason.htm -rw-r--r-- 904 bytes
Secure-Close-3000-reason.htm -rw-r--r-- 1.5 KB
Secure-Close-3000-verify-code.htm -rw-r--r-- 1.4 KB
Secure-Close-4999-reason.htm -rw-r--r-- 1.5 KB
Secure-Close-Reason-124Bytes.htm -rw-r--r-- 1.1 KB
Secure-Close-Reason-Unpaired-surrogates.htm -rw-r--r-- 1.5 KB
Secure-Close-onlyReason.htm -rw-r--r-- 879 bytes
Secure-Close-readyState-Closed.htm -rw-r--r-- 1.4 KB
Secure-Close-readyState-Closing.htm -rw-r--r-- 975 bytes
Secure-Close-server-initiated-close.htm -rw-r--r-- 1.5 KB
Secure-Close-undefined.htm -rw-r--r-- 731 bytes
Secure-Send-65K-data.htm -rw-r--r-- 1.7 KB
Secure-Send-binary-65K-arraybuffer.htm -rw-r--r-- 1.8 KB
Secure-Send-binary-arraybuffer.htm -rw-r--r-- 1.8 KB
Secure-Send-binary-arraybufferview-float32.htm -rw-r--r-- 2.1 KB
Secure-Send-binary-arraybufferview-float64.htm -rw-r--r-- 2.1 KB
Secure-Send-binary-arraybufferview-int32.htm -rw-r--r-- 2.1 KB
Secure-Send-binary-arraybufferview-uint16-offset-length.htm -rw-r--r-- 2.2 KB
Secure-Send-binary-arraybufferview-uint32-offset.htm -rw-r--r-- 2.2 KB
Secure-Send-binary-arraybufferview-uint8-offset-length.htm -rw-r--r-- 2.2 KB
Secure-Send-binary-arraybufferview-uint8-offset.htm -rw-r--r-- 2.1 KB
Secure-Send-binary-blob.htm -rw-r--r-- 1.9 KB
Secure-Send-data.htm -rw-r--r-- 1.6 KB
Secure-Send-null.htm -rw-r--r-- 1.7 KB
Secure-Send-paired-surrogates.htm -rw-r--r-- 1.7 KB
Secure-Send-unicode-data.htm -rw-r--r-- 1.7 KB
Secure-Send-unpaired-surrogates.htm -rw-r--r-- 1.7 KB
Send-0byte-data.htm -rw-r--r-- 1.6 KB
Send-65K-data.htm -rw-r--r-- 1.7 KB
Send-Unpaired-Surrogates.htm -rw-r--r-- 1.6 KB
Send-before-open.htm -rw-r--r-- 765 bytes
Send-binary-65K-arraybuffer.htm -rw-r--r-- 1.8 KB
Send-binary-arraybuffer.htm -rw-r--r-- 1.8 KB
Send-binary-arraybufferview-int16-offset.htm -rw-r--r-- 2.2 KB
Send-binary-arraybufferview-int8.htm -rw-r--r-- 2.1 KB
Send-binary-blob.htm -rw-r--r-- 1.8 KB
Send-data.htm -rw-r--r-- 1.6 KB
Send-data.worker.js -rw-r--r-- 493 bytes
Send-null.htm -rw-r--r-- 1.7 KB
Send-paired-surrogates.htm -rw-r--r-- 1.7 KB
Send-unicode-data.htm -rw-r--r-- 1.6 KB
binaryType-wrong-value.htm -rw-r--r-- 1.4 KB
close-invalid.any.js -rw-r--r-- 577 bytes
constants.js -rw-r--r-- 331 bytes
constructor.html -rw-r--r-- 545 bytes
eventhandlers.html -rw-r--r-- 704 bytes
extended-payload-length.html -rw-r--r-- 2.3 KB
referrer.any.js -rw-r--r-- 401 bytes
websocket.sub.js -rw-r--r-- 2.9 KB

README.md

back to top