Repository navigation
Add TAO destination check for navigation redirect chains - #1931
Conversation
|
Chrome team is supportive. |
noamr
left a comment
There was a problem hiding this comment.
Wouldn't it be simpler to keep a list of TAO value sets and iterate over them when computing the "navigation TAO check"?
@annevk made a similar comment earlier on. What we can do is something like:
I don't know that it's simpler (and it seems like we'd be copying more values around between redirect responses), but happy to move to that model if that's simpler/easier |
It's simpler to read (IMO) and potentially cleaner impl wise as there is no set manipulation as you go along and it's not a dedup check for each redirect. |
noamr
left a comment
There was a problem hiding this comment.
LGTM (though needs the checkboxes etc)
|
@annevk - Can you take a look? Do I need to file a WebKit position on this, or will you be able to state support here? |
This CL implements whatwg/html#12513 and whatwg/fetch#1931, in order to resolve w3c/navigation-timing#215. It enables developers to opt-in to get cross-origin redirect timings, through destination-based Timing-Allow-Origin headers. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/GOPn8-wQlsk/m/x5Q3G6KuAgAJ Change-Id: Ib463010f1862af523a241d2e9180ff09bfedb101 Bug: 521861828 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7915892 Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1650808}
This CL implements whatwg/html#12513 and whatwg/fetch#1931, in order to resolve w3c/navigation-timing#215. It enables developers to opt-in to get cross-origin redirect timings, through destination-based Timing-Allow-Origin headers. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/GOPn8-wQlsk/m/x5Q3G6KuAgAJ Change-Id: Ib463010f1862af523a241d2e9180ff09bfedb101 Bug: 521861828 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7915892 Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1650808}
annevk
left a comment
There was a problem hiding this comment.
This design seemed reasonable to @achristensen07 and I so you can consider WebKit supportive.
|
This looks good from the Mozilla side as well. |
This CL implements whatwg/html#12513 and whatwg/fetch#1931, in order to resolve w3c/navigation-timing#215. It enables developers to opt-in to get cross-origin redirect timings, through destination-based Timing-Allow-Origin headers. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/GOPn8-wQlsk/m/x5Q3G6KuAgAJ Change-Id: Ib463010f1862af523a241d2e9180ff09bfedb101 Bug: 521861828 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7915892 Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1650808} Co-authored-by: Yoav Weiss <[email protected]>
…, a=testonly Automatic update from web-platform-tests Navigation-Timing: destination-based TAO (#60823) This CL implements whatwg/html#12513 and whatwg/fetch#1931, in order to resolve w3c/navigation-timing#215. It enables developers to opt-in to get cross-origin redirect timings, through destination-based Timing-Allow-Origin headers. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/GOPn8-wQlsk/m/x5Q3G6KuAgAJ Change-Id: Ib463010f1862af523a241d2e9180ff09bfedb101 Bug: 521861828 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7915892 Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1650808} Co-authored-by: Yoav Weiss <[email protected]> -- wpt-commits: 2b0c3ce064199c58603edca2a8562da285f8d82b wpt-pr: 60823
…stination origin. https://bugs.webkit.org/show_bug.cgi?id=316647 Reviewed by Alex Christensen. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. * LayoutTests/imported/w3c/web-platform-tests/navigation-timing/redirect-tao-expected.txt: Progression. * LayoutTests/imported/w3c/web-platform-tests/navigation-timing/redirect-tao.html: * LayoutTests/imported/w3c/web-platform-tests/navigation-timing/resources/redirect-tao-helper.js: * LayoutTests/imported/w3c/web-platform-tests/navigation-timing/resources/report-navigation-redirect-timing.html: Added. * LayoutTests/imported/w3c/web-platform-tests/navigation-timing/response-start-after-coop-bcg-switch.https-expected.txt: Expectation change. * LayoutTests/imported/w3c/web-platform-tests/navigation-timing/unload-event-same-origin-check-expected.txt: Progression. * Source/WebCore/loader/DocumentLoader.cpp: (WebCore::hideRedirectTimingForNoReferrerNavigation): Resets redirect count if noreferrer. (WebCore::DocumentLoader::notifyFinished): Calls hideRedirectTimingForNoReferrerNavigation. (WebCore::DocumentLoader::commitData): Calls hideRedirectTimingForNoReferrerNavigation. * Source/WebCore/page/PerformanceNavigationTiming.cpp: (WebCore::PerformanceNavigationTiming::shouldExposeRedirectTiming const): Only exposes redirect timing if redirectCount is not zero. (WebCore::PerformanceNavigationTiming::redirectCount const): TAO check. * Source/WebCore/page/PerformanceNavigationTiming.h: * Source/WebCore/page/PerformanceResourceTiming.cpp: (WebCore::fetchStart): Pass exposeRedirectTiming. (WebCore::entryStartTime): Use shouldExposeRedirectTiming(). (WebCore::PerformanceResourceTiming::shouldExposeRedirectTiming const): A virtual fun that enables NavigationTiming to override the default RT behavior. (WebCore::PerformanceResourceTiming::redirectStart const): Use shouldExposeRedirectTiming(). (WebCore::PerformanceResourceTiming::redirectEnd const): Use shouldExposeRedirectTiming(). (WebCore::PerformanceResourceTiming::fetchStart const): Use shouldExposeRedirectTiming(). * Source/WebCore/page/PerformanceResourceTiming.h: * Source/WebCore/platform/network/TimingAllowOrigin.cpp: (WebCore::passesNavigationTAOCheck): * Source/WebCore/platform/network/TimingAllowOrigin.h: * Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::checkRedirection): Append TAO values. (WebKit::NetworkLoadChecker::validateResponse): Set TAO values on the response. (WebKit::NetworkLoadChecker::appendToNavigationTimingAllowValuesList): Accumulate TAO values. * Source/WebKit/NetworkProcess/NetworkLoadChecker.h: (WebKit::NetworkLoadChecker::navigationTAOCheckPassed const): Getter. * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didFinishLoading): Canonical link: https://commits.webkit.org/317061@main
…, a=testonly Automatic update from web-platform-tests Navigation-Timing: destination-based TAO (#60823) This CL implements whatwg/html#12513 and whatwg/fetch#1931, in order to resolve w3c/navigation-timing#215. It enables developers to opt-in to get cross-origin redirect timings, through destination-based Timing-Allow-Origin headers. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/GOPn8-wQlsk/m/x5Q3G6KuAgAJ Change-Id: Ib463010f1862af523a241d2e9180ff09bfedb101 Bug: 521861828 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7915892 Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1650808} Co-authored-by: Yoav Weiss <[email protected]> -- wpt-commits: 2b0c3ce064199c58603edca2a8562da285f8d82b wpt-pr: 60823
…stination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061@main
…stination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061@main
…/show_bug.cgi?id=316647, a=testonly Automatic update from web-platform-tests Navigation Timing: cross-origin redirect opt-in should be based on destination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061@main -- wpt-commits: 6662bb5ac7dfcf0b31d010d7f402360e00cbf0e3 wpt-pr: 64599
…/show_bug.cgi?id=316647, a=testonly Automatic update from web-platform-tests Navigation Timing: cross-origin redirect opt-in should be based on destination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061@main -- wpt-commits: 5a686a30bc8638de1a161d781e4234a661116879 wpt-pr: 64618
…/show_bug.cgi?id=316647, a=testonly Automatic update from web-platform-tests Navigation Timing: cross-origin redirect opt-in should be based on destination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061main -- wpt-commits: 6662bb5ac7dfcf0b31d010d7f402360e00cbf0e3 wpt-pr: 64599 UltraBlame original commit: 60b9f2299b1e1102d2e9d99367f2238f5204e19e
…/show_bug.cgi?id=316647, a=testonly Automatic update from web-platform-tests Navigation Timing: cross-origin redirect opt-in should be based on destination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061main -- wpt-commits: 5a686a30bc8638de1a161d781e4234a661116879 wpt-pr: 64618 UltraBlame original commit: d061e4b754b982c689b5a94599eea146292b0e53
…/show_bug.cgi?id=316647, a=testonly Automatic update from web-platform-tests Navigation Timing: cross-origin redirect opt-in should be based on destination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061main -- wpt-commits: 6662bb5ac7dfcf0b31d010d7f402360e00cbf0e3 wpt-pr: 64599 UltraBlame original commit: 60b9f2299b1e1102d2e9d99367f2238f5204e19e
…/show_bug.cgi?id=316647, a=testonly Automatic update from web-platform-tests Navigation Timing: cross-origin redirect opt-in should be based on destination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061main -- wpt-commits: 5a686a30bc8638de1a161d781e4234a661116879 wpt-pr: 64618 UltraBlame original commit: d061e4b754b982c689b5a94599eea146292b0e53
…/show_bug.cgi?id=316647, a=testonly Automatic update from web-platform-tests Navigation Timing: cross-origin redirect opt-in should be based on destination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061main -- wpt-commits: 6662bb5ac7dfcf0b31d010d7f402360e00cbf0e3 wpt-pr: 64599 UltraBlame original commit: 60b9f2299b1e1102d2e9d99367f2238f5204e19e
…/show_bug.cgi?id=316647, a=testonly Automatic update from web-platform-tests Navigation Timing: cross-origin redirect opt-in should be based on destination origin. This PR aligns the WebKit implementation with whatwg/fetch#1931 and whatwg/html#12513, and ensures that TAO opt-ins for navigation timing take the destination origin into account. New iframe tests, plus test progressions. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=316647 WebKit-Canonical-Link: https://commits.webkit.org/317061main -- wpt-commits: 5a686a30bc8638de1a161d781e4234a661116879 wpt-pr: 64618 UltraBlame original commit: d061e4b754b982c689b5a94599eea146292b0e53
As part of the WebPerfWG discussion on re-exposing redirectCount for opted-in cross-origin redirects, we discussed the fact that TAO currently only opts-in "backwards" in terms of origins, and doesn't constitute an opt-in to the destination origin, which is the appropriate opt-in for navigations (contrary to subresources).
This PR adds the mechanisms that can enable such "forward" opt-in, and can enable a response to a redirect chain to know that the redirect chain opted in to expose the redirects to its origin.
Once this lands, we'd use the relevant algorithms in the related HTML PR.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff