Websphere - using direct JNDI lookup and JAAS login module

I have WebSphere Application Server version 7.0 running on Windows. I created a JAAS login module that implements the javax.security.auth.spi.LoginModule interface and created a datasource that uses this login module (in the Mapping-Configuration alias). Because this data source needs to obtain the connection credentials from the login module, there is no authentication alias set in the data source.

I want to use this data source in my application, but my application is using direct JNDI lookup for the data source. According to this article, when using JNDI direct lookup, websphere creates a default resource link that is configured with res-auth = application. Since res-auth is an application, my login module never gets called, but I get a login error because the "Component Driven Authentication Alliance" is empty. I tried to create a link to the resource manually using res-auth = Container, but it didn't help.

Is there a way to change the default resolution for a container? Is there a way to get the login module to work if the res-auth is set to Application?

Thank.

+3


source to share


2 answers


Go to your datasource -> security options -> select your jaas login module for Component-managed authentication alias

andContainer-managed authentication alias



Hello,

0


source


u can change res-auth in web.xml to container so it will use container-managed authentication alias.



0


source







All Articles