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

Issue 793937 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Plumb console log message for blocked cross-site documents

Project Member Reported by creis@chromium.org, Dec 11 2017

Issue description

In  issue 786505 , we added logic to block cross-site documents from renderer processes when Site Isolation modes are enabled.  This helps prevent sensitive information from leaking to a process that doesn't need access to it.

There are still many cross-site network responses that do need to be delivered to the renderer (e.g., scripts, images, stylesheets, etc).  We make an effort not to block anything that could be disruptive, but there may still be cases that affect a page's execution, especially if content is not labeled with the correct MIME type.

It would be helpful to web developers to have a console message when a blocking event occurs.  pfeldman@ noted there may be a good way to plumb that information along with the response.

I'm adding a very simple first draft of a message in https://chromium-review.googlesource.com/c/chromium/src/+/817661 which is only displayed for script tags.  We should replace that with a more consistent message if possible.
 

Comment 1 by creis@chromium.org, Dec 12 2017

Labels: -Pri-3 Pri-1
Note: I'm giving up on the simple console log message in https://chromium-review.googlesource.com/c/chromium/src/+/817661.  It was still affecting the two layout tests below, and updating their expectations would make them flaky because the message could be injected from the browser process at various points of the test.
* http/tests/htmlimports/cross-origin.html
* http/tests/security/xssAuditor/script-tag-safe4.html


Maybe this is worth doing properly sooner, so that web developers have a notification when a blocking event occurs?

Comment 2 by creis@chromium.org, Dec 27 2017

Status: Started (was: Untriaged)
CL started here: https://chromium-review.googlesource.com/c/chromium/src/+/833218
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 3 2018

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

commit 8f36166322e9bce77088d7e2caf2150cf9f744aa
Author: Pavel Feldman <pfeldman@chromium.org>
Date: Wed Jan 03 05:15:11 2018

DevTools: report blocked cross-site document load in console.

We added logic to block cross-site documents from renderer processes when Site
Isolation modes are enabled. This helps prevent sensitive information from
leaking to a process that doesn't need access to it.

It would be helpful to web developers to have a console message when a blocking
event occurs explaining what happened and why.

Bug:  793937 
Change-Id: Ia6e4b8095a925b8580a044421021810565ea66d8
Reviewed-on: https://chromium-review.googlesource.com/833218
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526624}
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/content/browser/loader/cross_site_document_resource_handler.cc
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/content/browser/loader/mojo_async_resource_handler.cc
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/content/browser/loader/resource_request_info_impl.cc
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/content/browser/loader/resource_request_info_impl.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/content/public/common/resource_response_info.cc
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/content/public/common/resource_response_info.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/content/renderer/loader/web_url_loader_impl.cc
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/content/renderer/loader/web_url_loader_impl_unittest.cc
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/services/network/public/cpp/network_param_ipc_traits.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/services/network/public/cpp/url_loader_completion_status.cc
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/services/network/public/cpp/url_loader_completion_status.h
[add] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/LayoutTests/flag-specific/site-per-process/http/tests/inspector-protocol/network/block_cross_site_document_load-expected.txt
[add] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/block_cross_site_document_load-expected.txt
[add] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/block_cross_site_document_load.js
[add] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/resources/nosniff.pl
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/loader/resource/ImageResource.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/probe/CoreProbes.pidl
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/testing/sim/SimNetwork.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/core/testing/sim/SimRequest.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/platform/exported/WebURLLoaderTestDelegate.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/platform/loader/fetch/FetchContext.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.h
[modify] https://crrev.com/8f36166322e9bce77088d7e2caf2150cf9f744aa/third_party/WebKit/public/platform/WebURLLoaderClient.h

Comment 4 by phistuck@gmail.com, Jan 4 2018

Can you send an announcement (or post a Chromium blog post) regarding new scenarios where things are blocked?
(I assume there are new scenarios, otherwise you would not need this console message)

While it sounds like the blockage is not in Blink, new blockages should probably go through the Blink intent process, because it is definitely web exposed and sounds like a backward compatibility break...
Status: Fixed (was: Started)

Comment 6 by creis@chromium.org, Jan 9 2018

Comment 4: We'll likely send an intent before turning on cross-site document blocking by default.  Right now it's only for the opt-in Site Isolation mode, but there's value to turning it on everywhere even without Site Isolation.

Sign in to add a comment