Homologous(No cross-domain) intercept 401 forced pop-up basic auth box of certification
Reported by
wei49789...@gmail.com,
Aug 28
|
|||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 Steps to reproduce the problem: 1. Api return 401 2. 3. What is the expected behavior? Basic auth certification box doesn't pop up What went wrong? Basic auth certification box pops up Did this work before? N/A Chrome version: <Copy from: 'about:version'> Channel: n/a OS Version: 10 Flash Version: Different source(cross-domain) is normal, Firefox browser regardless of homologous or non-homologous will not pop up the basic auth certification box
,
Aug 28
,
Aug 28
Do you have a sample site that has this issue? If we receive fresh WWW-Authenticate headers on a request, we'll pop up the basic auth dialog. If we've previously authenticated against the same domain in the same connection, we should only be showing the dialog a single time.
,
Aug 28
Yup. In case the site or configuration where this happens isn't publicly accessible, could you send us a network log? Instructions for capturing a network log can be found here: https://dev.chromium.org/for-testers/providing-network-details
,
Aug 29
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 30
@Reporter: Could you please respond to comment# 4 by providing network logs, hence adding Needs-Feedback label to it. Thanks!
,
Aug 31
This is my network logs, thank you for viewing.
,
Aug 31
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 31
Here's a quick summary of the responses seen from the two logs:
In the same-origin case (i.e. referrer and host are same-origin) I see the following request:
t=18336 [st= 0] +URL_REQUEST_START_JOB [dt=1249]
--> load_flags = 16384 (MAYBE_USER_GESTURE)
[...]
t=18463 [st= 127] HTTP_TRANSACTION_READ_RESPONSE_HEADERS
--> HTTP/1.1 401 UNAUTHORIZED
Server: nginx
Date: Fri, 31 Aug 2018 02:01:41 GMT
Content-Type: application/json
Content-Length: 63
Connection: keep-alive
WWW-Authenticate: Basic realm="Authentication Required"
Access-Control-Allow-Origin: *
From the network stack's perspective, the behavior when the response is seen is to bubble up the auth challenge if there are no cached credentials present. This will result in a prompt.
In the cross-origin case (i.e. referrer and host are cross-origin) I see the following request:
t=18809 [st= 0] +URL_REQUEST_START_JOB [dt=125]
--> load_flags = 17216 (DO_NOT_SAVE_COOKIES | DO_NOT_SEND_AUTH_DATA | DO_NOT_SEND_COOKIES | MAYBE_USER_GESTURE)
--> method = "GET"
t=18934 [st=125] HTTP_TRANSACTION_READ_RESPONSE_HEADERS
--> HTTP/1.1 401 UNAUTHORIZED
Server: nginx
Date: Fri, 31 Aug 2018 02:13:10 GMT
Content-Type: application/json
Content-Length: 63
Connection: keep-alive
WWW-Authenticate: Basic realm="Authentication Required"
Access-Control-Allow-Origin: https://ht.yunzhixi.cn
Vary: Origin
Note that the request flags are different now, and include DO_NOT_SEND_AUTH_DATA. The latter is an instruction to not send any Authorization headers in the response. Hence receiving a 401 challenge is a dead end. The error will be bubbled up to the caller without any prompting.
This behavior would be consistent with the request being made via XMLHttpRequest where the withCredentials flag is false. Could you confirm?
,
Sep 3
Yes, I didn't set up withCredentials, it should be false.
,
Sep 3
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 10
asanka@ - Gentle ping...!! Could you please provide any further input/s on the issue. Thanks...!!
,
Nov 30
As per comment #13, adding 'TE-NeedsTriageHelp' and requesting 'Internals>Network>Auth' team to look into the issue and help in further triaging. Thanks.. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by dtapu...@chromium.org
, Aug 28