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

Issue 841002 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug
Proj-Servicification

Blocking:
issue 721414



Sign in to add a comment

Extensions+Network service: Requests made on behalf of a profile's request context are not proxied to WebRequest API.

Project Member Reported by karandeepb@chromium.org, May 8 2018

Issue description

This is the reason for failure of ExtensionWebRequestApiTest.WebRequestClientsGoogleComProtection with the network service. 

Requests made by a browser from a profile's request context should be visible to the web request API. However this is not the case currently with network service. Reason is that requests made through the URLLoaderFactory obtained from the call to content::BrowserContext::GetDefaultStoragePartition(profile())
            ->GetURLLoaderFactoryForBrowserProcess() are not proxied through to the web request API. 

This probably needs some plumbing similar to what is done for URLLoaderFactories relating to subresource loads and navigation requests. See WebRequestAPI::MaybeProxyURLLoaderFactory. 
 
Cc: roc...@chromium.org
Labels: -Pri-3 Pri-2
Owner: jam@chromium.org
Status: Assigned (was: Untriaged)
Assigning to you for now John. Let me know if you need any more context/help. I think solving this should also help enable -ExtensionWebRequestApiTest.WebRequestURLFetcherInterception. 

Comment 2 by jam@chromium.org, May 9 2018

Cc: -roc...@chromium.org jam@chromium.org
Owner: roc...@chromium.org
Thanks.

Comment 3 by jam@chromium.org, May 10 2018

Blocking: 721414

Comment 4 by dxie@chromium.org, May 14 2018

Labels: Proj-Servicification-Canary OS-Chrome OS-Linux OS-Mac OS-Windows

Comment 5 by roc...@chromium.org, May 29 2018

I'm not sure it's quite this simple though - I don't think we want WebRequest listeners to see arbitrary requests made by the browser process on the profile's behalf.

It seems to me that features which need their requests to be visible to WebRequest should get their URLLoaderFactory elsewhere, or at least should have to explicitly opt-in to allowing interception so that StoragePartitionImpl can know it's OK to call ContentBrowserClient::WillCreateURLLoaderFactory (and thus possibly have proxies injected) before returning.
>> I'm not sure it's quite this simple though - I don't think we want WebRequest listeners to see arbitrary requests made by the browser process on the profile's behalf.

Isn't that the current behavior though? Unless the request is made from the system's request context.
Huh, I guess you're right. We just filter sensitive hosts. OK, SGTM
Cc: cmumford@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 6 2018

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

commit 428b1d6eaee89f1f9caef8ee95aea358474a0448
Author: Ken Rockot <rockot@chromium.org>
Date: Wed Jun 06 17:12:21 2018

Proxy browser requests through WebRequest API

This enables browser-initiated requests to be proxied through the
WebRequest API when the Network Service is enabled. Note that this
only applies to requests made on via a profile's context, not the
system context.

This mirrors the behavior in the non-Network Service path today.

Bug:  841002 
Test: see buildbot filter changes
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I1830959e1ba089974c546d933b4a6b51fb038779
Reviewed-on: https://chromium-review.googlesource.com/1083952
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564937}
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/browser/loader/navigation_url_loader_impl.cc
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/browser/storage_partition_impl.cc
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/content/public/browser/content_browser_client.h
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/browser/api/web_request/web_request_api.cc
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/shell/browser/shell_content_browser_client.cc
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/extensions/shell/browser/shell_content_browser_client.h
[modify] https://crrev.com/428b1d6eaee89f1f9caef8ee95aea358474a0448/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter

Status: Fixed (was: Assigned)

Sign in to add a comment