Issues using integrated security after upgrading IAM and Registry to ServicePack ( SP2 or newer)
search cancel

Issues using integrated security after upgrading IAM and Registry to ServicePack ( SP2 or newer)

book

Article ID: 274430

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

In our DevTest UAT environment we are trying to configure our database connections with integrated security. For some reason we see errors that we are unable to make a database connection.

Instead of a SQL Server ID, we are trying to use an AD ID.

Currently we are on SP2/HF21

Here are the iam.properties settings:

Updated iam.properties

iam.db.url=jdbc:sqlserver://DBServerName\\User14911:11001;integratedSecurity=true;databaseName=IAM_DB;encrypt=false

iam.db.user=Domain\\User094003

iam.db.password=xxxxxxx

server.log:

2023-09-28 16:20:39,684 WARN  [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator] (JPA Startup Thread: keycloak-default) HHH000342: Could not obtain connection to query metadata: java.sql.SQLException: Acquisition timeout while waiting for new connection

               at io.agroal.pool.ConnectionPool.handlerFromSharedCache(ConnectionPool.java:320)

               at io.agroal.pool.ConnectionPool.getConnection(ConnectionPool.java:248)

               at io.agroal.pool.DataSource.getConnection(DataSource.java:86)

               at io.quarkus.hibernate.orm.runtime.customized.QuarkusConnectionProvider.getConnection(QuarkusConnectionProvider.java:23)

               at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:181)

               at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:68)

               at io.quarkus.hibernate.orm.runtime.recording.PrevalidatedQuarkusMetadata.buildSessionFactoryOptionsBuilder(PrevalidatedQuarkusMetadata.java:68)

               at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:72)

               at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:72)

               at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:80)

               at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)

               at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:165)

               at io.quarkus.hibernate.orm.runtime.JPAConfig$1.run(JPAConfig.java:66)

               at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: java.util.concurrent.TimeoutException

               at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204)

               at io.agroal.pool.ConnectionPool.handlerFromSharedCache(ConnectionPool.java:296)

               ... 23 more

 

 

Environment

Release : 10.7.2

Cause

The security auth dll needs to be copied to the java library classpath:  (i.e. java.library.path = c:\program files\ca\devtest\jre\bin  )

Resolution

## MS SQL Server using Windows Authentication

Updated iam.properties

iam.db.url=jdbc:sqlserver://DBServerName\\User14911:11001;integratedSecurity=true;databaseName=IAM_DB;encrypt=false

iam.db.user=Domain\\User094003

iam.db.password=xxxxxxx

 

For DevTest 10.7.2 Resgistry and ED do the below:
- Download mssql-jdbc_auth-8.2.0.x64.dll from any Microsoft site. 
- Copy mssql-jdbc_auth-8.2.0.x64.dll into the java library classpath:  (i.e. java.library.path = c:\program files\ca\devtest\jre\bin => Identified based on server.log)
 
For DevTest 10.7.2  IAM with SP2 or SP3
- Download mssql-jdbc_auth-11.2.0.x64.dll from any Microsoft site. 
- Copy mssql-jdbc_auth-11.2.0.x64.dll into  IAM-Home\jdk\bin
IAM uses JDK 11, so the dll file should reflect that. 

. Stop all DevTest components.
. Delete all the log files in DEVTEST_HOME/IdentityAccessManager/data/log  and DEVTEST_HOME/lisatmp10.x folder
. Start all DevTest components.
 Login to IAM ,ED and Portal  to verify.