New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 856700 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Add more WPT tests for Accept-CH-Lifetime

Project Member Reported by tbansal@chromium.org, Jun 26 2018

Issue description

From the discussion at https://groups.google.com/a/chromium.org/d/msg/blink-dev/G_rkd0yo2AM/3bc_z6KDBQAJ:

Given where we landed on the privacy discussions, we need to make sure that ACH and ACHL do nothing when returned on a subresource response. 

 
Cc: y...@yoav.ws
Currently, Chromium honors Accept-CH-Lifetime (ACL) header on all responses as long as the origin of the response matches the main frame origin.

First, we need to make changes to Chromium to honor ACL header on only the main frame (aka navigation) response.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/62cc354dd35516c50d53022484b945884386cb8f

commit 62cc354dd35516c50d53022484b945884386cb8f
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Jun 27 23:53:30 2018

Honor Accept-CH-Lifetime header only on main frame responses

Currently, Chromium honors Accept-CH-Lifetime (ACL) header on
all responses as long as the origin of the response matches
the main frame origin. This CL changes the behavior to honor
the ACL header on main frame responses only.

Change-Id: I480e7faf3d060ddc9d31220f368d6c2f8b02221f
Bug:  856700 
Reviewed-on: https://chromium-review.googlesource.com/1115960
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570942}
[modify] https://crrev.com/62cc354dd35516c50d53022484b945884386cb8f/chrome/browser/client_hints/client_hints_browsertest.cc
[add] https://crrev.com/62cc354dd35516c50d53022484b945884386cb8f/chrome/test/data/client_hints/accept_ch_without_lifetime_with_subresource.html
[add] https://crrev.com/62cc354dd35516c50d53022484b945884386cb8f/chrome/test/data/client_hints/accept_ch_without_lifetime_with_subresource_iframe.html
[modify] https://crrev.com/62cc354dd35516c50d53022484b945884386cb8f/third_party/blink/renderer/core/loader/frame_fetch_context.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34541863ad3969e1ec5b358075ff02ff966bcf2a

commit 34541863ad3969e1ec5b358075ff02ff966bcf2a
Author: Tarun Bansal <tbansal@chromium.org>
Date: Fri Jun 29 11:07:04 2018

Honor ACL header from 1p origin in iframes navigation response

Currently, Chromium disregards Accept-CH-Lifetime header on iframe
navigation responses. This CL changes Chromium behavior to
accept ACL header on iframe navigation responses provided the origin
of the response matches the origin of the main frame navigation.

This behavior is compliant with the updated client hints spec.

WPT tests will come in a subsequent CL.

Change-Id: I5603cad33f77d8e413b402b8a6c184497d87aec6
Bug:  856700 
Reviewed-on: https://chromium-review.googlesource.com/1117859
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571438}
[modify] https://crrev.com/34541863ad3969e1ec5b358075ff02ff966bcf2a/chrome/browser/client_hints/client_hints_browsertest.cc
[modify] https://crrev.com/34541863ad3969e1ec5b358075ff02ff966bcf2a/third_party/blink/renderer/core/loader/frame_fetch_context.cc
[modify] https://crrev.com/34541863ad3969e1ec5b358075ff02ff966bcf2a/third_party/blink/renderer/core/loader/frame_fetch_context.h

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/960dfcbf80b41b83d4f5f5729fd21c4f4f7f003b

commit 960dfcbf80b41b83d4f5f5729fd21c4f4f7f003b
Author: Tarun Bansal <tbansal@chromium.org>
Date: Mon Jul 02 20:38:08 2018

WPT tests for http-equiv accept-ch header

This CL adds WPT tests for http-equiv accept-ch header:
(1) The header is not honored on HTTP pages
(2) Malformed header is not honored
(3) When the header is present, client hints are attached only
    on the same-origin subresources, and not on cross-origin
    subresources in the same navigation.
(4) When the header is present, client hints are attached only
    on the same origin subresources, and not on subresources in
    a new navigation.

Bug:  856700 
Change-Id: I3f82df8cd02816b06542256062eb291577ebe8b7
Reviewed-on: https://chromium-review.googlesource.com/1120953
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Cr-Commit-Position: refs/heads/master@{#571986}
[rename] https://crrev.com/960dfcbf80b41b83d4f5f5729fd21c4f4f7f003b/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.tentative.sub.https.html
[rename] https://crrev.com/960dfcbf80b41b83d4f5f5729fd21c4f4f7f003b/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.tentative.sub.https.html.headers
[add] https://crrev.com/960dfcbf80b41b83d4f5f5729fd21c4f4f7f003b/third_party/WebKit/LayoutTests/external/wpt/client-hints/http_equiv_accept_ch.tentative.http.html
[add] https://crrev.com/960dfcbf80b41b83d4f5f5729fd21c4f4f7f003b/third_party/WebKit/LayoutTests/external/wpt/client-hints/http_equiv_accept_ch.tentative.https.html
[copy] https://crrev.com/960dfcbf80b41b83d4f5f5729fd21c4f4f7f003b/third_party/WebKit/LayoutTests/external/wpt/client-hints/http_equiv_accept_ch.tentative.sub.https.html
[add] https://crrev.com/960dfcbf80b41b83d4f5f5729fd21c4f4f7f003b/third_party/WebKit/LayoutTests/external/wpt/client-hints/http_equiv_accept_ch_malformed_header.tentative.https.html

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae

commit 607bfe3b601134ef4f4b62bda13cd4e691c4a6ae
Author: Tarun Bansal <tbansal@chromium.org>
Date: Tue Jul 03 17:37:05 2018

Add more WPT tests for client hints

The WPT tests check the Accept-CH-Lifetime (ACL) header functionality.

Add tests for:
(i) When ACL header is sent by a same-origin iframe.
(ii) When ACL header is sent by a cross-origin iframe.
(iii) When ACL header is sent by a subresource.
(iv) When ACL header is sent on the main frame.

Also, change the ACL persistence time-duration from 20
seconds to 5 seconds to make it easier to run multiple tests
quickly and without waiting too long.

Change-Id: I31047598bbb1e7c64cadf3e6845bf850c29aca8b
Bug:  856700 
Reviewed-on: https://chromium-review.googlesource.com/1119848
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Cr-Commit-Position: refs/heads/master@{#572273}
[modify] https://crrev.com/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.tentative.https.html
[modify] https://crrev.com/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch_lifetime.tentative.https.html
[add] https://crrev.com/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch_lifetime_cross_origin_iframe.tentative.sub.https.html
[add] https://crrev.com/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch_lifetime_same_origin_iframe.tentative.https.html
[add] https://crrev.com/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch_lifetime_subresource.tentative.https.html
[modify] https://crrev.com/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/accept_ch_lifetime.html.headers
[modify] https://crrev.com/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/do_not_expect_client_hints_headers.html
[modify] https://crrev.com/607bfe3b601134ef4f4b62bda13cd4e691c4a6ae/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/expect_client_hints_headers.html

Status: Fixed (was: Assigned)

Sign in to add a comment