[jboss-user] [Security & JAAS/JBoss] - JndiLoginInitialContextFactory in JBoss 5.0.0.CR2

bdreher do-not-reply at jboss.com
Mon Dec 1 08:09:29 EST 2008


In JBoss 4.2.x I was using org.jboss.security.jndi.JndiLoginInitialContextFactory as initial context factory to define in an application client module the name of the login user and password. By this the login user id and password were transferred to the DatabaseServerLoginModule and could there be verified and the corresponding roles could be fetched.
The transfer of security principal and credentials to the DatabaseServerLoginModule does no longer work in JBoss 5.0.0.CR2.

Part of the relavent code:

Properties props = new Properties();
  | props.setProperty(Context.SECURITY_PRINCIPAL, "admin");
  | props.setProperty(Context.SECURITY_CREDENTIALS, "admin");
  | props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
  | props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
  | props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
  | props.setProperty("j2ee.clientName", "ReiseshopTestClient");
  | 
  | Context ctx = new InitialContext(props);
  | session = (ReiseSessionRemote) ctx.lookup("ReiseSessionBean");
Is it possible to fix this?

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

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



More information about the jboss-user mailing list