Multiple Proxy-Authenticate headers order-dependency bug causes login popup with NTLM + Basic (pick auth schema by safety rating)
Categories
(Core :: Networking: HTTP, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | fixed |
People
(Reporter: adrien, Assigned: valentin)
References
Details
(Keywords: dev-doc-needed, Whiteboard: [necko-triaged][ntlm])
Attachments
(1 file)
Updated•14 years ago
|
Comment 1•14 years ago
|
||
Reporter | ||
Comment 2•14 years ago
|
||
Comment 3•13 years ago
|
||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Updated•9 years ago
|
Comment 8•8 years ago
|
||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Comment 12•7 years ago
|
||
Comment 13•6 years ago
|
||
I can confirm this bug with firefox 64 on windows 10.
proxy: squid 4.4
if auth scheme in proxy configuration is listed as BASIC first NTLM second, firefox use basic, all other browsers (i tried chrome, Internet explorer, Edge) use NTLM.
if auth scheme in proxy configuration is NTLM first, BASIC second, firefox use correctly NTLM and ask no password (no change in the behaviour of other browsers).
Tried different settings for proxy in firefox: direct, via wpad, system proxy, but results are all the same: basic is the auth scheme used if listed first on the proxy configuration.
I also tried changing settings on about:config, with no results.
As stated above, from https://datatracker.ietf.org/doc/rfc7235/?include_text=1 :
the user agent ought to do so by selecting the challenge with what it
considers to be the most secure auth-scheme that it understands,
obtaining credentials from the user as appropriate
Comment 14•6 years ago
|
||
How can it happen that such a bug is known but not fixed for eight years? When can we expect a fix on this?
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 16•5 years ago
|
||
To keep in parity with Chrome(ium), see https://www.chromium.org/developers/design-documents/http-authentication
In a nut shell, use the safest first, regardless of the order we receive it. It's also a good opportunity to rewrite the challenge parsing code with mozilla::Tokenizer to clean it up a bit.
I believe a preference to revert to the previous behavior (respect the server order) might be in place, just in case.
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Is there a chance that this bug will be fixed?
Recently we switched web sites in our corporate network to mixed Integrated Windows and Basic Authentication to allow access for mobile clients.
Now I'm being asked by users if they could switch their desktop browsers to Chrome to enable smooth login, and I don't know what to answer.
Comment 19•5 years ago
|
||
Dragana, what was the motivation to put this to P5? I think we want to fix this. It's not a small amount of work, though, the whole parser needs to be rewritten.
Comment 20•5 years ago
|
||
(In reply to alexander.veit from comment #18)
Is there a chance that this bug will be fixed?
Recently we switched web sites in our corporate network to mixed Integrated Windows and Basic Authentication to allow access for mobile clients.
Now I'm being asked by users if they could switch their desktop browsers to Chrome to enable smooth login, and I don't know what to answer.
Note that the authentication header ordering can be changed on the server side.
Comment 21•5 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #20)
Note that the authentication header ordering can be changed on the server side.
As far as I know there's no way to configure the ordering of authentication headers in IIS.
By default Firefox should probably use the most secure authentication scheme, and only use the less secure methods as a fallback (security by default).
Chromium (see https://www.chromium.org/developers/design-documents/http-authentication) does the following:
Choosing an authentication scheme
When a server or proxy accepts multiple authentication schemes, our network stack selects the authentication scheme with the highest score:
* Basic: 1
* Digest: 2
* NTLM: 3
* Negotiate: 4
The Basic scheme has the lowest score because it sends the username/password unencrypted to the server or proxy.
So we choose the most secure scheme, and we ignore the server or proxy's preference, indicated by the order in which the schemes are listed in the WWW-Authenticate or Proxy-Authenticate response headers. This could be a source of compatibility problems because MSDN documents that "WinInet chooses the first method it recognizes." Note: In IE7 or later, WinInet chooses the first non-Basic method it recognizes.
Comment 22•5 years ago
|
||
(In reply to alexander.veit from comment #21)
(In reply to Honza Bambas (:mayhemer) from comment #20)
Note that the authentication header ordering can be changed on the server side.
As far as I know there's no way to configure the ordering of authentication headers in IIS.
In my experience, IIS even seems to randomize the order in which authentication headers the are returned. This means that for some requests, the Basic authentication popup is shown, for some it is not (as reported in 1041465 closed as duplicate).
As the bug is already nine years old, our recommendation to our customers is to migrate away from FF, as this behaviour will probably not change in the foreseeable future.
Updated•5 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 24•3 years ago
|
||
Comment 25•3 years ago
|
||
Comment 26•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Comment 28•3 years ago
|
||
I'd love to get this on the ESR once we're confident.
Assignee | ||
Comment 29•3 years ago
|
||
The patch builds on top of bug 1705659 which landed in 93. I am unsure if we'd be able to uplift that to 91 (if we're interested I could look into it - no regressions from that change AFAIK)
Comment 30•3 years ago
|
||
That's a pretty huge patch. I doubt Ryan would go for that :).
Comment 31•3 years ago
|
||
Yeah, I think we'll need to let this go out in the ESR102 release.
Updated•3 years ago
|
Description
•