url: fix reuse of connections using HTTP Negotiate#20534
url: fix reuse of connections using HTTP Negotiate#20534
Conversation
Assume Negotiate means connection-based Reported-by: Zhicheng Chen
|
@aisle-analyzer thoughts? |
🔒 Aisle Security Analysis✅ We scanned this PR and did not find any security vulnerabilities. Analyzed PR: #20534 at commit |
|
augment review |
There was a problem hiding this comment.
Pull request overview
This PR adjusts connection reuse selection so that HTTP Negotiate (SPNEGO) authentication is treated as connection-based during connection pool matching, similar to existing NTLM handling.
Changes:
- Added connection-match flags to represent “want HTTP Negotiate” and “want proxy HTTP Negotiate”.
- Introduced
url_match_auth_nego()to exclude/allow reuse based on Negotiate auth state and credentials. - Integrated Negotiate matching into the existing connection reuse decision path in
url_match_conn().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🤖 Augment PR SummarySummary: Adjust connection reuse rules for HTTP Negotiate (SPNEGO), treating Negotiate authentication as connection-based. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
This assumption is not correct. In a SPNEGO/Kerberos loop one roundtrip is sufficient and can be request-legged. See also https://github.com/gssapi/mod_auth_gssapi?tab=readme-ov-file#gssapiconnectionbound |
|
Yes, but Negotiate can also mean NTLM which is, and we can't easily tell the difference. So better safe than sorry I think. |
Sure ot can, bu this can be quieried from the security context, but given that this should not be the norm and only on Windows I'd at least would try to cover both. |
If you say so. I don't know how, and we don't have test cases for either way.
NTLM is certainly not only on Windows. curl supports it on all platforms. And yes, it would be great to support both ways but in this PR I focus on fixing the current bug and leave the improvements for a separate follow-up work. |
You are confusing curl's custom NTLM impl and the GSS-API mech. Only SSPI implements NTLM natively through SPNEGO when Kerberos fails. MIT Kerberos and Heimdal require https://github.com/gssapi/gss-ntlmssp to be installed and a credential file placed. Cannot use the Kerberos credential cache. This quite boils down a token starting with |
Ideomatic way with GSS-API if SPNEGO is used: Of course, I leave the upto you. Just wanted to let you know the options... |
Assume Negotiate means connection-based
Reported-by: Zhicheng Chen