Reputation: 19
I am working on Kerberos authentication and need help in jaas.conf file I have below section in jaas.conf
SQLJDBCDriver {
com.sun.security.auth.module.Krb5LoginModule required
principal =
keyTab =
}
I need one more SQLJDBCDriver section for another keytab and another principal But when I add another section, the first and second both sections don't work.
Please help?
Upvotes: 2
Views: 1981
Reputation: 151
I ran into similar issue where I try to set up multiple principals to different db instances.
You can specify multiple sections/principals in jaas.conf,
SQLJDBCDriver_1 {
com.sun.security.auth.module.Krb5LoginModule required
principal =
keyTab =
}
SQLJDBCDriver_2 {
com.sun.security.auth.module.Krb5LoginModule required
principal =
keyTab =
}
With the latest SQL JDBC driver, you can specify section name, for example:
jdbc:sqldriver://...;jaasConfigurationName=SQLJDBCDriver_1;
I also documented the findings in https://github.com/Microsoft/mssql-jdbc/issues/828
Upvotes: 2