[Security & JAAS/JBoss] - Authentication info not passed to login module when invoking
by alllle
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
18Â years, 6Â months
[JBoss jBPM] - Re: Concurrent access problem
by luxupan
#### <host33> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1193713079563> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@32d832d8 - appName: 'webapp', name: 'webapp', context-path: '/piccclaim'] Root cause of ServletException.
org.hibernate.exception.GenericJDBCException: could not update: [org.jbpm.graph.exe.Token#524]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2360)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2242)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2542)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100063#4100063
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100063
18Â years, 6Â months