[jboss-user] [Security & JAAS/JBoss] - kerberos configuration

cro110011 do-not-reply at jboss.com
Wed Nov 12 09:36:48 EST 2008


hi all
I try to setup a kerberos security configuration with a standalone java client on windows xp; the client correctly gets the kerberos token from windows os using a configuration that looks like this: 

kerberoslogincontextname {
  com.sun.security.auth.module.Krb5LoginModule required
  debug=false
  useTicketCache=true;
};

the client java code is as follows: 

      Properties props = new Properties();
      props.setProperty( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" );
      props.setProperty( Context.URL_PKG_PREFIXES, "org.jboss.naming.client" );
      props.setProperty( Context.PROVIDER_URL, "jnp://localhost:1099" );
      InitialContext ctx = new InitialContext( props );

      TextCallbackHandler callbackHandler = new TextCallbackHandler();

      LoginContext loginContext = new LoginContext( "kerberoslogincontextname", callbackHandler );
      loginContext.login();
      Subject subject = loginContext.getSubject();
      log.debug( "__subject=" + subject.toString() );

      // here I call the remote bean ..

When I try to extract the principal on the server side, I always get null for this principal; I don't use a kerberos config on the server side but a simple UsersRolesLoginModule application policy - but this should also be working, right?

I appreciate any comments :-)
regards, christian









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

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



More information about the jboss-user mailing list