public class KerberosAuthenticator extends Object implements Authenticator
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;
};
To enable authentication using a keytab file, specify its location on disk. If your keytab contains more than one principal key, you should also specify which one to select.
DseClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/path/to/file.keytab"
principal="user@MYDOMAIN.COM";
};
| Modifier and Type | Field and Description |
|---|---|
static String |
JAAS_CONFIG_ENTRY |
static String |
SASL_PROTOCOL_NAME |
static String |
SASL_PROTOCOL_NAME_PROPERTY |
static String[] |
SUPPORTED_MECHANISMS |
| Constructor and Description |
|---|
KerberosAuthenticator(InetAddress host) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
evaluateChallenge(byte[] challenge)
Evaluate a challenge received from the Server.
|
byte[] |
initialResponse()
Obtain an initial response token for initializing the SASL handshake
|
public static final String JAAS_CONFIG_ENTRY
public static final String[] SUPPORTED_MECHANISMS
public static final String SASL_PROTOCOL_NAME
public static final String SASL_PROTOCOL_NAME_PROPERTY
public KerberosAuthenticator(InetAddress host)
public byte[] initialResponse()
AuthenticatorinitialResponse in interface Authenticatorpublic byte[] evaluateChallenge(byte[] challenge)
AuthenticatorevaluateChallenge in interface Authenticatorchallenge - the server's SASL challengeCopyright © 2013. All Rights Reserved.