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