1
Vote

no successfull authentication with the version tcp 02062012

description

I received this message:
I tried Your TCP-Tomcat-SPNEGO (Tomcat 6) and never got a succesful Authentication.
 
In my eyes the is a bug in line 928 of the SSPAuthenticator.java. It lacks the keyword „Negotiate“ in front of the Token.
 
It should be
response.setHeader("WWW-Authenticate", "Negotiate " + responseToken);
instead of
response.setHeader("WWW-Authenticate", responseToken);
 
The same bug seems to be in the sources for the other tomcats.
 
I compiled a new JAR with this change and all works fine.
 
Best Regards
Jens Runge

comments

doumeguerin wrote Jul 23, 2012 at 5:01 PM

My answer :
Hello,

It is now possible to choose NTLM or Negotiate with the parameter spnegoandntlm.

I have only one source for tomvcat5, 6 and 7. and I use a little preprocessor. So the bug is in all versions with tcp.

The bug is not in the code using JNA.

In the method getHeaderAuthorizationAndSetWWW_Authenticate, I have to replace
if ( responsetoken != null) {
responsetoken.setHeader("WWW-Authenticate", responsetoken);
by
if ( responsetoken != null) {
responsetoken.setHeader("WWW-Authenticate", negotiation + " " + responsetoken);

I will change the version TCP on Codeplex.
Thank you

Dominique Guerin

The correction is in version 23072012

wrote Feb 14, 2013 at 6:57 PM