public class DseAuthProvider extends Object implements 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();
NONE
Constructor and Description |
---|
DseAuthProvider() |
Modifier and Type | Method and Description |
---|---|
Authenticator |
newAuthenticator(InetSocketAddress host)
The
Authenticator to use when connecting to host |
public Authenticator newAuthenticator(InetSocketAddress host) throws AuthenticationException
AuthProvider
Authenticator
to use when connecting to host
newAuthenticator
in interface AuthProvider
host
- the Cassandra host to connect to.AuthenticationException
Copyright © 2014. All rights reserved.