-
1. Re: Authentication exception & MDB
drcharris Aug 26, 2003 7:17 AM (in response to sergmesh)Message Driven Beans essentially run anonymously, since they aren't called by any user code but only in response to JMS messages. This means that MDB invocations don't have an identity associated with them unless you specifically assign one in your bean configuration.
It's likely that your MDB calls other code which requires authentication (like another EJB), which is why you get the SecurityException.
You might be able to configure the MDB with a run-as identity in the deployment descriptor, and assign it a specific user name. -
2. Re: Authentication exception & MDB
urunkulia May 6, 2004 4:59 AM (in response to sergmesh)Hi, drcharris
i have the same problem with mdb and authorization.
I have a mdb and try to create a session bean from my mdb. But an authentication exception, principal=null is thrown, when i try to call 'mySessionHome.create();'
In the deployment descriptor i have configured the mdb to use another identity with run-as. My Security configuration is configured with DatabaseServerLoginModule in login-config.xml. Login and Authentication runs fine as long as I don't use MDBs.
You wrote:
You might be able to configure the MDB with a run-as identity in the deployment descriptor, and assign it a specific user name.
How can I assign a user name to the role that is specified in the deployment-descriptor with run-as?
Any help would be appreciated.
urunkulia -
3. Re: Authentication exception & MDB
milasx May 18, 2004 1:37 PM (in response to sergmesh)I have the same issue here. Did you manage to solve it?
Many thanks!!!! -
4. Re: Authentication exception & MDB
starksm64 May 21, 2004 11:08 AM (in response to sergmesh)See the unauthenticatedIdentity usage in the JAAS Howto.