Forum Discussion

danimas's avatar
13 years ago

Spnego/Kerberios authentication

Hi,
I'm trying to send a request to a webservice that requires Spnego/Kerberos authentication. I've followed instruccions in this webpage:

http://hc.apache.org/httpcomponents-cli ... ation.html

I've also set system properties in soapUI.bat to load krb5.conf and login.conf:

set JAVA_OPTS=-Xms128m -Xmx1024m -Dsoapui.properties=soapui.properties "-Dsoapui.home=%SOAPUI_HOME%\" -Djavax.security.auth.useSubjectCredsOnly=false -Djava.security.auth.login.config=C:/login.conf -Djava.security.krb5.conf=C:/krb5.conf

but I can't make this work. I'm using soapUI 4.5.1, java 1.6.0_35, in Windows 7 OS.

In the request properties in SoapUI, I have set "Authorization type" to NTLM/Kerberos. I've tried to set a username and password, and also to leave them blank, but the result is always the same.
I've seen the http log in soapUI, and no authorization header is set in the request message (althoug "Authorization: Negotiate" should be sent).

The server sends an http-401 response with an http header "WWW-Authenticate: Negotiate", but soapUI doesn't send any more requests to the server with requested authentication.

Any help? Am I missing anything?

Regards,
Dani
  • mkazz's avatar
    mkazz
    New Contributor
    I faced same problem. I have found that there is bug in soapUI code in class com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport. In this class for AuthPolicy SPNEGO, it is registering NTLMSchemeFactory when instead it should be registering NegotiateSchemeFactory
  • mkazz's avatar
    mkazz
    New Contributor
    I did not know about the soapUI project on github. I download the source code from sourceforge for 4.5.1 and made few changes and got Negotiate to work. The patch you pointed to is still using NTLMSchemeFactory for SPNEGO AuthPolicy. I don't know if NTLMScheme uses Kerberos. I would presume it uses NTLMv1/v2. I have attached my patch if anyone is interested.
  • Walid's avatar
    Walid
    Occasional Contributor
    Hello,
    can somebody tell me please how to deploy this patch
    Best Regards