New issue
Advanced search Search tips

Issue 878412 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Homologous(No cross-domain) intercept 401 forced pop-up basic auth box of certification

Reported by wei49789...@gmail.com, Aug 28

Issue description

UserAgent: 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
 
Components: Internals>Network>Auth
Labels: Needs-Milestone
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.
Labels: Needs-Feedback
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

Comment 5 Deleted

Project Member

Comment 6 by sheriffbot@chromium.org, Aug 29

Cc: asanka@chromium.org
Labels: -Needs-Feedback
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
Cc: viswa.karala@chromium.org
Labels: Needs-Feedback Triaged-ET
@Reporter: Could you please respond to comment# 4 by providing network logs, hence adding Needs-Feedback label to it.

Thanks!
This is my network logs, thank you for viewing.
chrome-net-export-log-normal(cross-domain).json
96.6 KB View Download
chrome-net-export-log-abnormal(non-cross-domain).json
75.5 KB View Download
Project Member

Comment 9 by sheriffbot@chromium.org, Aug 31

Labels: -Needs-Feedback
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
Labels: Needs-Feedback
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?

Yes, I didn't set up withCredentials, it should be false.
Project Member

Comment 12 by sheriffbot@chromium.org, Sep 3

Labels: -Needs-Feedback
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
asanka@ - Gentle ping...!!
Could you please provide any further input/s on the issue.
Thanks...!!
Labels: TE-NeedsTriageHelp
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