Configure authentication aliases for the Liberty profile
We can configure an authentication data alias to use with a resource reference for authentication on the Liberty profile.
We can use an authentication data alias by defining a user and password for authentication in the Liberty profile. To do this, add the jdbc-4.0 Liberty feature to server.xml and add at least one authData element.
There is no authentication alias principal mapping module support.
- Add the jdbc-4.0 Liberty features in server.xml.
<featureManager> <feature>jdbc-4.0</feature> </featureManager>
- Configure the authData element in server.xml as follows. Use a unique name for the assigned id attribute value.
<authData id="auth1" user="dbuser1" password="dbuser1pwd"/>
- Configure the IBM deployment descriptor, for example, the ibm-web-bnd.xml file, of the application using the authentication-alias element in the resource reference. The name attribute value must match the id attribute defined in server.xml.
<resource-ref name="jdbc/mydbresource" binding-name="jdbc/mydbresource"> <authentication-alias name="auth1"/> </resource-ref>
Parent topic: Secure the Liberty profile and its applicationsTasks:
Authorizing access to resources Reference:
How database transactions are recovered