Use the following steps to connect to Db2 LUW using Kerberos with DbVisualizer.


1. Create jaas.conf file


If there is no existing jaas.conf file, you need to create it in the location of you choice with the following content:

JaasClient {
com.sun.security.auth.module.Krb5LoginModule required;
}

2. Configure DbVisualizer


2a. In the Connection tab for the Db2 LUW database connection, enter the following values for Database Userid and Database Password:

Database Userid = (null)
Database Password = (null)

This way, userid and password will not be sent to the database.


2b. In the Properties tab, select Driver Properties. Insert a new entry:

securityMechanism  = 11

Click Apply. This will tell the database to use the Kerberos security mechanism.


2c. Open Tools->Tool Properties and the General tab. In the Specify Overridden Java VM Properties here text area, enter:

-Dsun.security.jgss.native=true
-Djavax.security.auth.useSubjectCredsOnly=false
-Djava.security.auth.login.config=<path-to-jaas.conf>\jaas.conf

Click OK and restart DbVisualizer. 


Now you should be able to connect to Db2 LUW using Kerberos.