Support basic access authentication through serviceworkers
Authentication dialog is not shown when ServiceWorker returns 401 response. This CL addresses that in a similar manner as https://crrev.com/c/1290435 did, adding |window_id| on OnAuthRequired requests, however, unlike the client certificate case, we'll need even more plumbing for this bit because LoginHandlerDelegate needs to know whether a request is for the main frame or a subframe. This CL is effective only when Network Service is enabled. No behavior change on platforms where Network Service is disabled. Regarding the behavior of basic access auth login prompt, the prompt is always shown, regardless of any combination of mainframe/subframe and mainresource /subresource. In summary, the behavior of login prompt became as follows: | | TOT | TOT (via SW) | With CL | With CL (via SW) | | mainframe-mainresource | prompt | no prompt | prompt | prompt | | mainframe-subresource | prompt | no prompt | prompt | prompt | | subframe-mainresource | prompt | no prompt | prompt | prompt | | subframe-subresource | prompt | no prompt | prompt | prompt | Regarding tests, I confirmed that basic access authentication dialog is surely shown for main resources (and sub resources), using the repro case reported in the bug, manually, as well as adding a new browsertest for basic auth. This CL added new browsertest to service_worker_basic_tls_browsertest.cc, however, which is not renamed yet for easier reviewing. We'll rename in a follow-up CL. Bug: 623464,963748 Change-Id: I01284b73b7af5de1e8a25112f2b06d50efe8dcc8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614723Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Matt Falkenhagen <falken@chromium.org> Commit-Queue: Hayato Ito <hayato@chromium.org> Cr-Commit-Position: refs/heads/master@{#665791}
Showing
Please register or sign in to comment