Does IAM supports integrated security for SQL SERVER

Document ID : KB000101536
Last Modified Date : 14/06/2018
Show Technical Document Details
Introduction:
IAM (Identity Access Manager) supports SQL SERVER Integrated Security but right now we don’t have an option to configure this out of the box. We have a workaround.  
Environment:
DEVTEST 10.3 and up
Instructions:
To configure IAM  for Integrated Security, follow the below steps

1.       Choose Embedded database and complete the installation.
2.       Navigate to <VSC_HOME>/IdentityAccessManager/modules and create directory, com/microsoft/sqlserver/jdbc/sqlserverdriver/main
3.       Copy the database driver jar to the above location.
4.       Create a file named module.xml with the contents below in the same directory created in step 2. Replace ="<<REPLACE_WITH_JAR_FILE_NAME>> with name of the jar file.
<?xml version='1.0' encoding='UTF-8'?>
  
<module xmlns="urn:jboss:module:1.1" name="com.microsoft.sqlserver.jdbc.sqlserverdriver">
 
    <resources>
        <resource-root path="<<REPLACE_WITH_JAR_FILE_NAME>>"/>
    </resources>
 
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
        <module name="javax.xml.bind.api"/>
    </dependencies>
</module>
 
5.       Open <VSC_HOME>/IdentityAccessManager/standalone/configuration/standalone.xml and search for “KeycloakDS"”
6.       Replace the datasource with the below content, change the connection url per customer requirement.
 
<datasource pool-name="KeycloakDS" jndi-name="java:jboss/datasources/KeycloakDS" enabled="true" use-java-context="true">
                    <connection-url>jdbc:sqlserver://localhost;databaseName=AdventureWorks;integratedSecurity=true;</connection-url>
                    <driver>sqlserver</driver>
                </datasource>
 
7.       Next to this datasource tag you will find drivers tag, add the following content.
<driver name="sqlserver" module="com.microsoft.sqlserver.jdbc.sqlserverdriver">
                        <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
                    </driver>
8.       Start IAM.