Configuring JDBC Driver for SSO
When JDBC Driver is the client for SSO, use the DriverManager.getConnection() method, with an SSO connection property set to the Informix® service principal.
Procedure
- Set the DriverManager.getConnection() method with the SSO
options.The following example illustrates valid syntax for one database URL:
="jdbc:informix-sqli://payroll.jkenterprises.com:9555/test: informixserver=ol_jk_ent1;CSM=(SSO=ol_jk_ent1@jkenterprises.com,ENC=true)";
ENC in the database URL determines whether Generic Security Services (GSS) encryption is enabled or not. By default, the setting is ENC = true (encryption enabled). - Create a login configuration file before you run the application
with the following entry:
com.sun.security.jgss.initiate { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true doNotPrompt=true; };
See your Kerberos documentation about login modules for additional options.
- Provide the login configuration file with the -D option
to run the application.The following example illustrates the format for the command, where
IfmxLog.conf
is the full path and name to the login configuration file andTestSso
is the Java™ class name:java -Djava.security.auth.login.config=IfmxLog.conf TestSso