Closed
Description
I did this
$ curl -Ssl -u : --negotiate -H "Accept: application/json" --proxy http://<http server proxy address> https://<API server endpoint>
curl: (66) Failed to find SSL backend for endpoint
I expected the following
$ curl -Ssl -u : --negotiate -H "Accept: application/json" --proxy http://<http server proxy address> https://<API server endpoint>
{<json response from the API server>}
curl/libcurl version
curl 8.10.0 and curl 8.10.1
curl --version
curl 8.10.1 (x86_64-unknown-linux-gnu) libcurl/8.10.1 OpenSSL/1.1.1y zlib/1.2.13 libpsl/0.21.5 libssh2/1.9.0 nghttp2/1.61.0
Release-Date: 2024-09-18
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets
operating system
Linux RHEL 7.9 and RHEL 8.8
$ uname -a
Linux <hostname redacted> 4.18.0-477.36.1.el8_8.x86_64 #1 SMP Thu Nov 9 08:12:18 EST 2023 x86_64 x86_64 x86_64 GNU/Linux
Activity
bagder commentedon Sep 19, 2024
Did this work with a previous curl version?
stevenpackardblp commentedon Sep 19, 2024
It's only when a proxy server is used that the issue occurs. SPNEGO to an HTTPS endpoint without using a proxy server works as expected. I believe 0a5ea09 is the commit that introduced the regression, but I'm not sure why it's causing the issue other than there are no
ssl_connect_data
withSSL
in its name in the linked list when I stepped through a debugger. The only names I saw wereHTTPS-CONNECT
,SETUP
,HTTP-PROXY
,H1-PROXY
, andHAPPY-EYEBALLS
. This the full walkback when the error occurs:stevenpackardblp commentedon Sep 19, 2024
Yes, it works fine in 8.9.1.
bagder commentedon Sep 19, 2024
/cc @SGA-max-faxalv
SSL-PROXY
perhaps?Foorack commentedon Sep 22, 2024
Deeply sorry for the regression. I am currently on holiday without a laptop, and will be back 3rd October.
In the meantime I'm investigating (1) how/if this will be possible, (2) whether the PROXY requires to support SCB as well...
I have an environment at work where I can test this, but I don't know if that proxy supports channel binding.
In the meantime I'm wondering if it would be possible to disable SCB when using proxy, saying it is not supported yet, which would restore previous functionality. Doing so leaves a bad taste, but I also feel deeply sorry for not having access to a computer for so long either to "fix my mess" in a timely manner.
stevenpackardblp commentedon Sep 22, 2024
We do have other authentication mechanisms besides SPNEGO for the service, but they're not as convenient. We've opted to back out curl to version 8.9.1 until this gets addressed.
brookheather commentedon Oct 24, 2024
I have the same issue when using 8.10.1 - is there a fix for this in progress - will it be included in the next release (8.10.2?)
Foorack commentedon Oct 24, 2024
@brookheather Trying to understand how to replicate this. Are you trying to auth with SPNEGO to a HTTPS server, through a HTTP proxy server?
brookheather commentedon Oct 24, 2024
Correct. I am trying to use libcurl in a program to achieve the same as using the bundled curl.exe 8.8.0 on Windows (which works fine):
curl -x proxy.example.com:8080 --proxy-negotiate https://login.microsoftonline.com/xxxxx/v2.0/.well-known/openid-configuration
Foorack commentedon Oct 25, 2024
@brookheather I apologize for the inconvenience.
I want to avoid breaking past working functionality, so I have made a proposed PR which - similar to if a peer certificate isn't presented - soft-fails and continues establishing the connection without SecureChannelBinding even if an SSL backend isn't found (such as when using a HTTP proxy).
This makes the behaviour of CURL the same as before then SCB feature was integrated.
And then if someone very specifically needs SecureChannelBinding over HTTP proxy (if that is even technically possible!?) it could be implemented in a future request.
#15410
brookheather commentedon Oct 25, 2024
Thanks @Foorack I have tested with your change - it no longer shows the original error but I am now getting a "gss_init_sec_context() failed" error during the connection:
CONNECT tunnel: HTTP/1.1 negotiated
allocate connect buffer
gss_init_sec_context() failed: No credentials were supplied, or the credentials were unavailable or inaccessible. Internal credentials cache error.
Proxy auth using Negotiate with user ''
Establish HTTP proxy tunnel to login.microsoftonline.com:443
gss_init_sec_context() failed: No credentials were supplied, or the credentials were unavailable or inaccessible. Internal credentials cache error.
CONNECT tunnel failed, response 407
16 remaining items