php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52232 cURL doesn't support GSSAPI by default
Submitted: 2010-07-02 10:15 UTC Modified: 2021-02-07 04:22 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: andres dot maier at abf dot ch Assigned: cmb (profile)
Status: No Feedback Package: cURL related
PHP Version: 5.3 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andres dot maier at abf dot ch
New email:
PHP Version: OS:

 

 [2010-07-02 10:15 UTC] andres dot maier at abf dot ch
Description:
------------
Our clients use Kerberos for SSO and we noticed that cURL doesn't support the GSSAPI by default. We couldn't find any cURL binaries with GSSAPI support neither could we get it compiled on windows. It would be great to have GSSAPI support by default because kerberos is a very wide spread authentication.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-02 11:05 UTC] pajoye@php.net
I don't libgssapi works on windows. However windows supports this auth mechanism via SSPI. See:

http://msdn.microsoft.com/en-us/library/aa380496%28VS.85%29.aspx

And Winsspi is built into curl on windows. Did you try it? or is it what you are looking for?
 [2010-07-02 11:06 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2010-07-02 11:06 UTC] pajoye@php.net
-PHP Version: Irrelevant +PHP Version: 5.3
 [2010-07-07 13:24 UTC] andres dot maier at abf dot ch
-Status: Feedback +Status: Open
 [2010-07-07 13:24 UTC] andres dot maier at abf dot ch
If it would work with winsspi then we should be able to set CURLAUTH_GSSNEGOTIATE as CURLOPT_HTTPAUTH option in cURL. But if we do so, false gets returned and we aren't able to delegate the authorization token of the client.
 [2010-07-07 16:48 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2010-07-07 16:48 UTC] pajoye@php.net
I don't understand what you are saying sorry.


Does it work? If not, what does not work exactly (like the constants are not defined or the required protocols are not listed in the available features, via curl info)? The options are not available? or they are not used even when you set them?
 [2010-07-08 07:39 UTC] andres dot maier at abf dot ch
-Status: Feedback +Status: Open
 [2010-07-08 07:39 UTC] andres dot maier at abf dot ch
It doesn't work in my opinion. The option CURLOPT_HTTPAUTH can have multiple authentication types like CURLAUTH_BASIC (value), *NTLM, as well as CURLAUTH_GSSNEGOTIATE - which is used to authenticate with kerberos. When we set this option/auth type [curl_setopt(CURLOPT_HTTPAUTH, CURLAUTH_GSSNEGOTIATE)] we get false as return value - which means that GSSAPI (or SSPI) is not available and this property can not be used with the cURL extension.
 [2010-07-08 07:55 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2010-07-08 07:55 UTC] pajoye@php.net
Please see http://www.php.net/curl_setopt (CURLOPT_HTTPAUTH)

Did you try ANY_SAFE or using the bitwise operator for ntlm and GSS?

I suppose too that it is only in your comment that the curl_setopt misses the curl resource.
 [2010-07-08 08:15 UTC] andres dot maier at abf dot ch
-Status: Feedback +Status: Open
 [2010-07-08 08:15 UTC] andres dot maier at abf dot ch
NTLM is working, but GSS not. We allready tried that. But we need kerberos authentication - that's why we need gssnegotiate to work.
 [2010-07-08 08:23 UTC] andres dot maier at abf dot ch
in addition to understand our problem, you can visit another feature/change request located here: http://bugs.php.net/bug.php?id=52231
 [2010-07-08 13:21 UTC] pajoye@php.net
ok, I don't seem to be able to get the details I need to actually see where is the point of failure.

I do not use kerberos, so I won't be able to test or debug it. However, if you can provide me an access to a box where I can actually test GSS for kerberos auth, then we may get one step further.

By the way, one thing that could help is to test using the curl command line tool. All features available through the API can be tested using the command line as well (see the curl website). Can you give it a try too please?

About soap, unrelated. Soap does not use Curl.
 [2010-07-08 14:36 UTC] andres dot maier at abf dot ch
I'll try your suggestion and give you feedback.
Why I posted this link is not because of soap. Please read the last paragraph about overriding __doRequest and rebuilding it with cURL. Maybe you can extract some usefull information about our problem or about our environment.
 [2021-01-28 17:51 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-01-28 17:51 UTC] cmb@php.net
Is this issue still unresolved?  It seems to me that the provided
libcurl builds have SSPI enabled for many years, and according to
the cURL documentation[1], CURLAUTH_NEGOTIATE requires SSPI on
Windows.

[1] <https://curl.se/libcurl/c/CURLOPT_HTTPAUTH.html>
 [2021-02-07 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 04:01:28 2024 UTC