-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curl 8.10.x with SPNEGO authentication through an HTTP proxy to an HTTP endpoint throws "Failed to find SSL backend for endpoint" error #14973
Comments
Did this work with a previous curl version? |
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
|
Yes, it works fine in 8.9.1. |
/cc @SGA-max-faxalv
|
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. |
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. |
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?) |
@brookheather Trying to understand how to replicate this. Are you trying to auth with SPNEGO to a HTTPS server, through a HTTP proxy server? |
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):
|
@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. |
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 |
Is there an update here? The issue is still present in version 8.11.1 and is blocking upgrading from 8.9.1. Thanks! |
Been extremely busy, but will try to look into it this week. @stevenpackardblp @brookheather Do you know what software is used on the proxy? |
@Foorack I don't know the answer that question, but I'm trying to find out and whether I can share it in this forum. If you're attending FOSDEM this weekend, I'd be happy to sit down with you to do some testing and debugging. |
I've finally had time to sit down and refresh my memory of the code, and there seems to have been done changes since:
Which have made it so CURL specifically no longer crashes if you are connecting through an HTTP proxy. I think you would still crash if you connect through an HTTPS proxy. Oh, and SCB still doesn't work through either type of Proxy. But that means as long as the backend server doesn't require EPA - which it shouldn't have done before because doing SCB through Proxy has never been possible until now - then you should be able to upgrade to latest version of curl @stevenpackardblp I will keep looking into if I can get SCB working on connections going through proxy. And sadly won't be at FOSDEM. Will be at WHY2025 though. |
Hello everybody, I think I am also running into the same - or at least similar - problem here. My however is: "Failed to find the SSL filter". My full log looks like this:
Once I clear the My expected behaviour is that a connection through the proxy will be established using plain HTTP without authentication and after the SSL connection has been established, the request will be sent using SPEGNO. On the network, the only thing that I can see is a TCP connection being established to the proxy with no further data being sent. The connection is then immediately closed. I am using a share handle and I am restricting CURLOPT_PROTOCOLS_STR to only HTTP, HTTPS, FTP and FILE. Apart from that I am not doing anything out of the usual I feel. If you are interested in more details, my code is here: https://git.ipfire.org/?p=pakfire.git;a=blob;f=src/pakfire/xfer.c;h=91294117a3ef1dc681988190a9ce9b769f796838;hb=HEAD#l264. I am also happy to answer questions.
My proxy is squid, configured without any authentication. I am running curl from Debian Bookworm Backports in version 8.11.1:
|
@mtremer thanks for the report. This problem has been fixed in 25b445e. The negotiate code, talking to the http: proxy, was wrongly assuming that SSL was involved. @stevenpackardblp Since your stracktrace points to the same code path, I believe this is solved by this change as well. And yes, @Foorack is correct with their analysis. |
@mtremer It looks like 25b445e did not make it into I am looking into trying to get SCB working over CONNECT proxy as well, but having slow progress due to not that deeply familiar with curl codebase. |
@icing Yes, thanks to that patch, it is my understanding that both people's problem would be solved in the latest release. The question is if this Issue should then be marked as Resolved, and we instead add "GSSAPI SCB over CONNECT proxy" to the TODO list? As that is a feature which has not been implemented in curl before. |
refs curl#14973 When curl negotiated with a http: proxy for a https: request, it wrongly believed there must be an SSL filter present, which during CONNECT, there is not. 25b445e fixed this. This PR adds a pytest case for the setup.
I agree on both. The bug we have fixed. The other part is a missing feature for TODO, I believe, as you suggest. |
I'm happy to report that patching commit 25b445e into the 8.11.1 release resolves the issue I reported here, so I'm ok with closing this issue as fixed in the 8.12.0 release. Thanks for pointing this out! |
@Foorack do you want to submit a PR for this? I assume you mean secure channel binding? |
Thank you very much for everyone looking at this. I am sorry to send my feedback so late, but I can also confirm that this is resolved in 8.12.0. |
I did this
I expected the following
curl/libcurl version
curl 8.10.0 and curl 8.10.1
operating system
Linux RHEL 7.9 and RHEL 8.8
The text was updated successfully, but these errors were encountered: