public class DseAuthProvider extends Object implements com.datastax.driver.core.AuthProvider
dse.sasl.protocol system property.
Keytab and ticket cache settings are specified using a standard JAAS
configuration file. The location of the file can be set using the
java.security.auth.login.config system property or by adding a
login.config.url.n entry in the java.security properties
file.
See http://docs.oracle.com/javase/1.4.2/docs/guide/security/jaas/tutorials/LoginConfigFile.html for further details on the Login configuration file and http://docs.oracle.com/javase/6/docs/technotes/guides/security/jaas/tutorials/GeneralAcnOnly.html for more on JAAS in general.
kinit to obtain a ticket and populate the cache before
connecting. JAAS config:
DseClient {
com.sun.security.auth.module.Krb5LoginModule required
useTicketCache=true
renewTGT=true;
};
DseClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/path/to/file.keytab"
principal="user@MYDOMAIN.COM";
};
To connect to clusters using internal authentication, use the standard method for
setting credentials. eg:
Cluster cluster = Cluster.builder()
.addContactPoint(hostname)
.withCredentials("username", "password")
.build();
| Constructor and Description |
|---|
DseAuthProvider() |
public com.datastax.driver.core.Authenticator newAuthenticator(InetSocketAddress host) throws com.datastax.driver.core.exceptions.AuthenticationException
newAuthenticator in interface com.datastax.driver.core.AuthProvidercom.datastax.driver.core.exceptions.AuthenticationExceptionCopyright © 2015. All rights reserved.