public class DefaultGSSAuthenticator extends java.lang.Object implements SshGSSAPIAuthenticator
SshGSSAPIAuthenticator. This should
suffice for most uses.
See the documentation for
Krb5LoginModule for more details.| Constructor and Description |
|---|
DefaultGSSAuthenticator(java.lang.String principal)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
javax.security.auth.login.Configuration |
getConfiguration()
Get the JAAS configuration used for authentication.
|
java.lang.String |
getPrincipal()
Get the name of the principal that should be used.
|
java.lang.String |
getTypeName()
Get the name of this authenticator (e.g "password", "publickey" etc).
|
boolean |
isDebug()
Get whether GSSAPI operations should output debug.
|
boolean |
isDoNotPrompt()
True if you do not want to be prompted for the password if credentials
can not be obtained from the cache or keytab.(Default is false) If set to
true authentication will fail if credentials can not be obtained from the
cache or keytab.
|
boolean |
isStoreKey()
Get if you want the principal's key to be stored in the Subject's private
credentials.
|
boolean |
isTryFirstPass()
Get if the username and password should be retrieved from the module's
shared state using "javax.security.auth.login.name" and
"javax.security.auth.login.password" as the respective keys.
|
boolean |
isUseKeyTab()
This is true if you want the module to get the principal's key from the
the keytab.(default value is False) If keyatb is not set then the module
will locate the keytab from the Kerberos configuration file.
|
boolean |
isUseTicketCache()
This is true if you want the TGT to be obtained from the ticket cache.
|
char[] |
promptForPassword(SshClient session,
java.lang.String message)
Invoked when a password.
|
void |
setDebug(boolean debug)
Set whether GSSAPI operations should output debug.
|
void |
setDoNotPrompt(boolean doNotPrompt)
Set this to true if you do not want to be prompted for the password if
credentials can not be obtained from the cache or keytab.(Default is
false) If set to true authentication will fail if credentials can not be
obtained from the cache or keytab.
|
void |
setPrincipal(java.lang.String principal)
Set the name of the principal that should be used.
|
void |
setStoreKey(boolean storeKey)
Set this to True to if you want the principal's key to be stored in the
Subject's private credentials.
|
void |
setTryFirstPass(boolean tryFirstPass)
Set to true to retrieve the the username and password from the module's
shared state using "javax.security.auth.login.name" and
"javax.security.auth.login.password" as the respective keys.
|
void |
setUseKeyTab(boolean useKeyTab)
Set this to true if you want the module to get the principal's key from
the the keytab.(default value is False) If keyatb is not set then the
module will locate the keytab from the Kerberos configuration file.
|
void |
setUseTicketCache(boolean useTicketCache)
Set this to true, if you want the TGT to be obtained from the ticket
cache.
|
public DefaultGSSAuthenticator(java.lang.String principal)
principal - public void setPrincipal(java.lang.String principal)
principal - principalpublic java.lang.String getPrincipal()
public boolean isUseKeyTab()
setUseKeyTab(boolean)public void setUseKeyTab(boolean useKeyTab)
useKeyTab - use key tab.public boolean isDebug()
public void setDebug(boolean debug)
debug - debugpublic boolean isDoNotPrompt()
public void setDoNotPrompt(boolean doNotPrompt)
doNotPrompt - do not promptpublic boolean isStoreKey()
public void setStoreKey(boolean storeKey)
storeKey - store principal's key in subjects private credentialspublic boolean isTryFirstPass()
public void setTryFirstPass(boolean tryFirstPass)
tryFirstPass - try first passpublic boolean isUseTicketCache()
public void setUseTicketCache(boolean useTicketCache)
useTicketCache - use ticket cachepublic javax.security.auth.login.Configuration getConfiguration()
SshGSSAPIAuthenticatorgetConfiguration in interface SshGSSAPIAuthenticatorpublic java.lang.String getTypeName()
SshAuthenticatorgetTypeName in interface SshAuthenticatorpublic char[] promptForPassword(SshClient session, java.lang.String message)
SshPasswordPromptpromptForPassword in interface SshPasswordPromptsession - sessionmessage - messagenull if password is not available (e.g.
cancelled)Copyright © 2018. All rights reserved.