In addition to the standard Java configuration for Kerberos, there are a few steps that needs to be done to connect to Oracle with Kerberos. The following shows a basic setup for Kerberos with the Oracle JDBC driver. 


Tested with: 

  • DbVisualizer 13
  • Oracle 19c
  • Oracle JDBC driver 19.8
  • Oracle Instant Client 19.8

TABLE OF CONTENTS


Due to an issue in the Oracle JDBC driver, the OCI protocol must be used when connecting to the database with Kerberos. The OCI JDBC driver requires native libraries and these are available in the Oracle Instant Client package which needs to be installed on the client. 


Install Oracle Instant Client

First make sure a compatible version of Oracle Instance Client is installed locally. The most recent version most often works fine. Download it from: https://www.oracle.com/se/database/technologies/instant-client/downloads.html


Once installed you need to create a link:

ln -s libocijdbc19.dylib ocijdbc19.dylib


Set Java properties

In DbVisualizer open Tools->Tool Properties select the General tab and then the General category. In Specify overridden Java VM Properties here enter the following. 


-Djava.security.krb5.conf=<path-to>\krb5.conf
-Djava.library.path=<path-to-oracle-instant-client>\instantclient_19_3


Click OK and then Restart DbVisualizer.


Setup JDBC driver


In DbVisualizer open Tools->Driver Manager and select the Oracle OCI driver template entry. 



Now Create User Driver from Template from the Driver menu or click "+" in the toolbar.

In the right list of artifacts and driver jar files, load the ocijdbc19.dylib file created in the first step.

The version of the OCI library must match the version of the JDBC driver. To change version of the driver artifact (the first entry in the list), select it, right-click and choose Edit Driver Artifact. In the Version drop-down select a matching version.


This shows the driver properly setup:


Connection setup

In the DbVisualizer main window, open the connection details for your Oracle connection and make sure the JDBC (Driver) is set to the new driver entry, "Oracle OCI (Oracle Instant Client)". Specify the other details for the connection.



Driver Properties for Kerberos

At least the following driver properties needs to be set:


oracle.net.authentication_services = KERBEROS5
oracle.net.kerberos5_mutual_authentication = true



Please note that this overview guides through the basic setup of Kerberos with Oracle. If connect fails please check the Kerberos related driver properties.