[jboss-user] [Security] - SPNEGO JAAS CallBackHandler?

KevinNCSU do-not-reply at jboss.com
Fri Oct 2 12:06:50 EDT 2009

I'm writing a thick java client application which interfaces with a JBOSS 5.1 back-end.  For one deployment a SPNEGO Login module is used.  I've had success before autheticating to LDAP login modules using the UsernamePasswordCallbackHandler but when I tried to use this to authenticate to SPNEGO a null pointer was thrown.

I've been searching around for a callbackhandler specific to SPNEGO but have been unable to find one, does anyone know if such a thing exists or if not, can you point me in the right direction for authenticating to SPNEGO using a thick java client?

		UsernamePasswordHandler handler = new UsernamePasswordHandler(username,
  | 				password);
  | 		LoginContext lc = new LoginContext("SPNEGO", handler);
  | 		lc.login();

javax.security.auth.login.LoginException: java.lang.NullPointerException
  |       at org.jboss.security.negotiation.spnego.SPNEGOLoginModule.login(SPNEGOLoginModule.java:106)
  |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |       at java.lang.reflect.Method.invoke(Method.java:597)
  |       at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
  |       at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
  |       at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
  |       at java.security.AccessController.doPrivileged(Native Method)
  |       at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
  |       at javax.security.auth.login.LoginContext.login(LoginContext.java:579)

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258446#4258446

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258446

More information about the jboss-user mailing list