ASCP - Authentication fails for a WebSphere (WAS) application
Symptom
Authentication fails for a WebSphere (WAS) application that has been configured to use the ASCP.
Environment
10.10;12.0;12.1;12.4;12.6;13.0 Privileged Access Manager (PAM, self-hosted) Application Server Credential Provider (ASCP)
Cause
Applications that use direct JNDI lookup (and do not use the Spring Framework, explained in the solution section) are not supported.
To understand if the application uses direct or indirect JNDI lookup, search for "lookup" in the application configuration files (oftentimes XML files).
A direct JNDI lookup string looks like: jdbc/datasource_name
An indirect JNDI lookup string looks like: java:comp/env/jdbc/datasource_name
IBM has deprecated the direct JNDI lookup, therefore, WebSphere applications that use the deprecated direct JNDI are not supported. The technical reason behind this, is that WebSphere automatically generates a default resource reference (for applications with direct JNDI), which is different than the resource reference that the ASCP requires. Therefore, the ASCP is not invoked, and consequentially neither is the Provider.
Resolution
Applications that use direct JNDI lookup (and do not use the Spring Framework) are not supported, and will not work with the WebSphere ASCP.
Applications that use direct JNDI lookup AND use the Spring Framework, can successfully work with the WebSphere ASCP using a workaround.
The Spring Framework can convert direct JNDI lookup syntax to indirect JNDI lookup, by using the <jee:jndi-lookup> xml tag in the Spring configuration files. The resource-ref property must be assigned the value of true.
Indirect JNDI lookup is supported by the ASCP, and therefore, the conversion of the JNDI lookup from direct to indirect will cause the ASCP to be invoked, retrieve and return the password..
Additional Information
Details
SYMPTOM:
Authentication fails for a WebSphere (WAS) application that has been configured to use the ASCP.
PROBLEM:
Applications that use direct JNDI lookup (and do not use the Spring Framework, explained in the solution section) are not supported.
To understand if the application uses direct or indirect JNDI lookup, search for "lookup" in the application configuration files (oftentimes XML files).
A direct JNDI lookup string looks like: jdbc/datasource_name
An indirect JNDI lookup string looks like: java:comp/env/jdbc/datasource_name
IBM has deprecated the direct JNDI lookup, therefore, WebSphere applications that use the deprecated direct JNDI are not supported. The technical reason behind this, is that WebSphere automatically generates a default resource reference (for applications with direct JNDI), which is different than the resource reference that the ASCP requires. Therefore, the ASCP is not invoked, and consequentially neither is the Provider.
SOLUTION:
Applications that use direct JNDI lookup (and do not use the Spring Framework) are not supported, and will not work with the WebSphere ASCP.
Applications that use direct JNDI lookup AND use the Spring Framework, can successfully work with the WebSphere ASCP using a workaround.
The Spring Framework can convert direct JNDI lookup syntax to indirect JNDI lookup, by using the <jee:jndi-lookup> xml tag in the Spring configuration files. The resource-ref property must be assigned the value of true.
Indirect JNDI lookup is supported by the ASCP, and therefore, the conversion of the JNDI lookup from direct to indirect will cause the ASCP to be invoked, retrieve and return the password.