[jboss-user] [Security & JAAS/JBoss] - Authentication info not passed to login module when invoking
alllle
do-not-reply at jboss.com
Tue Oct 30 00:04:16 EDT 2007
JBoss AS 4.0.5GA and JBoss Messaging 1.0.4 SP4.
I am having problem to invoke local EJB from a MDB due to authentication problem. I used the following to create the InitialContext object:
| Hashtable<String, Object> env = new Hashtable<String, Object> ();
| env.put(Context.SECURITY_PRINCIPAL, username);
| env.put(Context.SECURITY_CREDENTIALS, password);
| env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
|
| InitialContext context = new InitialContext(env);
|
However, the login module does not get the username and password during the authentication. These values are null and therefore the invocation to the EJB fails with exception.
The remote client can access the EJB without problems with the same code, in which case a separate jndi.properties file is also used to specify the following jndi properties:
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| java.naming.provider.url=localhost
|
Does anyone know why the security information is not passed to the LoginModule?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100064#4100064
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100064
More information about the jboss-user
mailing list