@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class GSSAPIBindRequestProperties extends java.lang.Object implements java.io.Serializable
Constructor and Description |
---|
GSSAPIBindRequestProperties(java.lang.String authenticationID,
byte[] password)
Creates a new set of GSSAPI bind request properties with the provided
information.
|
GSSAPIBindRequestProperties(java.lang.String authenticationID,
java.lang.String password)
Creates a new set of GSSAPI bind request properties with the provided
information.
|
Modifier and Type | Method and Description |
---|---|
boolean |
enableGSSAPIDebugging()
Indicates whether JVM-level debugging should be enabled for GSSAPI bind
processing.
|
java.util.List<SASLQualityOfProtection> |
getAllowedQoP()
Retrieves the list of allowed qualities of protection that may be used for
communication that occurs on the connection after the authentication has
completed, in order from most preferred to least preferred.
|
java.lang.String |
getAuthenticationID()
Retrieves the authentication ID for the GSSAPI bind request, if defined.
|
java.lang.String |
getAuthorizationID()
Retrieves the authorization ID for the GSSAPI bind request, if defined.
|
GSSAPIChannelBindingType |
getChannelBindingType()
Retrieves the type of channel binding that should be used for the GSSAPI
bind request.
|
java.lang.String |
getConfigFilePath()
Retrieves the path to a JAAS configuration file that should be used when
processing the GSSAPI bind request, if defined.
|
java.lang.Boolean |
getIsInitiator()
Indicates whether the client should be configured so that it explicitly
indicates whether it is the initiator or the acceptor.
|
java.lang.String |
getJAASClientName()
Retrieves the name that will be used to identify this client in the JAAS
framework.
|
java.lang.String |
getKDCAddress()
Retrieves the address to use for the Kerberos key distribution center,
if defined.
|
java.lang.String |
getKeyTabPath()
Retrieves the path to the keytab file from which to obtain the user
credentials.
|
ASN1OctetString |
getPassword()
Retrieves the password that should be used for the GSSAPI bind request, if
defined.
|
java.lang.String |
getRealm()
Retrieves the realm to use for the GSSAPI bind request, if defined.
|
java.lang.String |
getSASLClientServerName()
Retrieves the server name that should be used when creating the Java
SaslClient , if one is defined. |
java.lang.String |
getServicePrincipalProtocol()
Retrieves the protocol specified in the service principal that the
directory server uses for its communication with the KDC.
|
java.util.Set<java.lang.String> |
getSuppressedSystemProperties()
Retrieves a set of system properties that will not be altered by GSSAPI
processing.
|
java.lang.String |
getTicketCachePath()
Retrieves the path to the Kerberos ticket cache file that should be used
during authentication, if defined.
|
boolean |
refreshKrb5Config()
Indicates whether to refresh the configuration before the JAAS
login method is called. |
boolean |
renewTGT()
Indicates whether to attempt to renew the client's ticket-granting ticket
(TGT) if an existing Kerberos session is used to authenticate.
|
boolean |
requireCachedCredentials()
Indicates whether GSSAPI authentication should only occur using an existing
Kerberos session.
|
void |
setAllowedQoP(java.util.List<SASLQualityOfProtection> allowedQoP)
Specifies the list of allowed qualities of protection that may be used for
communication that occurs on the connection after the authentication has
completed, in order from most preferred to least preferred.
|
void |
setAllowedQoP(SASLQualityOfProtection... allowedQoP)
Specifies the list of allowed qualities of protection that may be used for
communication that occurs on the connection after the authentication has
completed, in order from most preferred to least preferred.
|
void |
setAuthenticationID(java.lang.String authenticationID)
Sets the authentication ID for the GSSAPI bind request.
|
void |
setAuthorizationID(java.lang.String authorizationID)
Specifies the authorization ID for the GSSAPI bind request.
|
void |
setChannelBindingType(GSSAPIChannelBindingType channelBindingType)
Specifies the type of channel binding that should be used for the GSSAPI
bind request.
|
void |
setConfigFilePath(java.lang.String configFilePath)
Specifies the path to a JAAS configuration file that should be used when
processing the GSSAPI bind request.
|
void |
setEnableGSSAPIDebugging(boolean enableGSSAPIDebugging)
Specifies whether JVM-level debugging should be enabled for GSSAPI bind
processing.
|
void |
setIsInitiator(java.lang.Boolean isInitiator)
Specifies whether the client should explicitly indicate whether it is the
GSSAPI initiator or acceptor.
|
void |
setJAASClientName(java.lang.String jaasClientName)
Specifies the name that will be used to identify this client in the JAAS
framework.
|
void |
setKDCAddress(java.lang.String kdcAddress)
Specifies the address to use for the Kerberos key distribution center.
|
void |
setKeyTabPath(java.lang.String keyTabPath)
Specifies the path to the keytab file from which to obtain the user
credentials.
|
void |
setPassword(ASN1OctetString password)
Specifies the password that should be used for the GSSAPI bind request.
|
void |
setPassword(byte[] password)
Specifies the password that should be used for the GSSAPI bind request.
|
void |
setPassword(java.lang.String password)
Specifies the password that should be used for the GSSAPI bind request.
|
void |
setRealm(java.lang.String realm)
Specifies the realm to use for the GSSAPI bind request.
|
void |
setRefreshKrb5Config(boolean refreshKrb5Config)
Specifies whether to refresh the configuration before the JAAS
login method is called. |
void |
setRenewTGT(boolean renewTGT)
Specifies whether to attempt to renew the client's ticket-granting ticket
(TGT) if an existing Kerberos session is used to authenticate.
|
void |
setRequireCachedCredentials(boolean requireCachedCredentials)
Specifies whether an GSSAPI authentication should only occur using an
existing Kerberos session.
|
void |
setSASLClientServerName(java.lang.String saslClientServerName)
Specifies the server name that should be used when creating the Java
SaslClient . |
void |
setServicePrincipalProtocol(java.lang.String servicePrincipalProtocol)
Specifies the protocol specified in the service principal that the
directory server uses for its communication with the KDC.
|
void |
setSuppressedSystemProperties(java.util.Collection<java.lang.String> suppressedSystemProperties)
Specifies a set of system properties that will not be altered by GSSAPI
processing.
|
void |
setTicketCachePath(java.lang.String ticketCachePath)
Specifies the path to the Kerberos ticket cache file that should be used
during authentication.
|
void |
setUseKeyTab(boolean useKeyTab)
Specifies whether to use a keytab to obtain the user credentials.
|
void |
setUseSubjectCredentialsOnly(boolean useSubjectCredentialsOnly)
Specifies whether to allow the client to use credentials that are outside
the current subject.
|
void |
setUseTicketCache(boolean useTicketCache)
Specifies whether to enable the use of a ticket cache to to avoid the need
to supply credentials if the client already has an existing Kerberos
session.
|
java.lang.String |
toString()
Retrieves a string representation of the GSSAPI bind request properties.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of the GSSAPI bind request properties to
the provided buffer.
|
boolean |
useKeyTab()
Indicates whether to use a keytab to obtain the user credentials.
|
boolean |
useSubjectCredentialsOnly()
Indicates whether to allow the client to use credentials that are outside
of the current subject, obtained via some system-specific mechanism.
|
boolean |
useTicketCache()
Indicates whether to enable the use of a ticket cache to to avoid the need
to supply credentials if the client already has an existing Kerberos
session.
|
public GSSAPIBindRequestProperties(@Nullable java.lang.String authenticationID, @Nullable java.lang.String password)
authenticationID
- The authentication ID for the GSSAPI bind
request. It may be null
if an existing
Kerberos session should be used.password
- The password for the GSSAPI bind request. It may
be null
if an existing Kerberos session
should be used.public GSSAPIBindRequestProperties(@Nullable java.lang.String authenticationID, @Nullable byte[] password)
authenticationID
- The authentication ID for the GSSAPI bind
request. It may be null
if an existing
Kerberos session should be used.password
- The password for the GSSAPI bind request. It may
be null
if an existing Kerberos session
should be used.@Nullable public java.lang.String getAuthenticationID()
null
if an existing Kerberos session should be used.public void setAuthenticationID(@Nullable java.lang.String authenticationID)
authenticationID
- The authentication ID for the GSSAPI bind
request. It may be null
if an existing
Kerberos session should be used.@Nullable public java.lang.String getAuthorizationID()
null
if the authorization ID should be the same as the authentication
ID.public void setAuthorizationID(@Nullable java.lang.String authorizationID)
authorizationID
- The authorization ID for the GSSAPI bind request.
It may be null
if the authorization ID
should be the same as the authentication ID.@Nullable public ASN1OctetString getPassword()
null
if an existing Kerberos session should be used.public void setPassword(@Nullable java.lang.String password)
password
- The password that should be used for the GSSAPI bind
request. It may be null
if an existing
Kerberos session should be used.public void setPassword(@Nullable byte[] password)
password
- The password that should be used for the GSSAPI bind
request. It may be null
if an existing
Kerberos session should be used.public void setPassword(@Nullable ASN1OctetString password)
password
- The password that should be used for the GSSAPI bind
request. It may be null
if an existing
Kerberos session should be used.@Nullable public java.lang.String getRealm()
null
if
the request should attempt to use the default realm from the
system configuration.public void setRealm(@Nullable java.lang.String realm)
realm
- The realm to use for the GSSAPI bind request. It may be
null
if the request should attempt to use the
default realm from the system configuration.@NotNull public java.util.List<SASLQualityOfProtection> getAllowedQoP()
public void setAllowedQoP(@Nullable java.util.List<SASLQualityOfProtection> allowedQoP)
allowedQoP
- The list of allowed qualities of protection that may be
used for communication that occurs on the connection
after the authentication has completed, in order from
most preferred to least preferred. If this is
null
or empty, then a list containing only the
SASLQualityOfProtection.AUTH
quality of
protection value will be used.public void setAllowedQoP(@Nullable SASLQualityOfProtection... allowedQoP)
allowedQoP
- The list of allowed qualities of protection that may be
used for communication that occurs on the connection
after the authentication has completed, in order from
most preferred to least preferred. If this is
null
or empty, then a list containing only the
SASLQualityOfProtection.AUTH
quality of
protection value will be used.@Nullable public java.lang.String getKDCAddress()
null
if request should attempt to determine the KDC
address from the system configuration.public void setKDCAddress(@Nullable java.lang.String kdcAddress)
kdcAddress
- The address to use for the Kerberos key distribution
center. It may be null
if the request should
attempt to determine the KDC address from the system
configuration.@NotNull public java.lang.String getJAASClientName()
public void setJAASClientName(@NotNull java.lang.String jaasClientName)
jaasClientName
- The name that will be used to identify this client
in the JAAS framework. It must not be
null
or empty.@Nullable public java.lang.String getConfigFilePath()
null
if a JAAS
configuration file should be automatically constructed for the
bind request.public void setConfigFilePath(@Nullable java.lang.String configFilePath)
configFilePath
- The path to a JAAS configuration file that should
be used when processing the GSSAPI bind request.
It may be null
if a configuration file
should be automatically constructed for the bind
request.@Nullable public java.lang.String getSASLClientServerName()
SaslClient
, if one is defined.SaslClient
, or null
if none is defined and the
SaslClient
should use the address specified when
establishing the connection.public void setSASLClientServerName(@Nullable java.lang.String saslClientServerName)
SaslClient
.saslClientServerName
- The server name that should be used when
creating the Java SaslClient
. It may
be null
to indicate that the
SaslClient
should use the address
specified when establishing the connection.@NotNull public java.lang.String getServicePrincipalProtocol()
public void setServicePrincipalProtocol(@NotNull java.lang.String servicePrincipalProtocol)
servicePrincipalProtocol
- The protocol specified in the service
principal that the directory server uses
for its communication with the KDC.public boolean refreshKrb5Config()
login
method is called.true
if the GSSAPI implementation should refresh the
configuration before the JAAS login
method is called, or
false
if not.public void setRefreshKrb5Config(boolean refreshKrb5Config)
login
method is called.refreshKrb5Config
- Indicates whether to refresh the configuration
before the JAAS login
method is called.public boolean useSubjectCredentialsOnly()
true
if the client will only be allowed to use credentials
that are within the current subject, or false
if the
client will be allowed to use credentials outside the current
subject.public void setUseSubjectCredentialsOnly(boolean useSubjectCredentialsOnly)
false
, then a system-specific
mechanism may be used in an attempt to obtain credentials from an
existing session.useSubjectCredentialsOnly
- Indicates whether to allow the client to
use credentials that are outside of the
current subject.public boolean useKeyTab()
true
if the GSSAPI login attempt should use a keytab to
obtain the user credentials, or false
if not.public void setUseKeyTab(boolean useKeyTab)
useKeyTab
- Indicates whether to use a keytab to obtain the user
credentials.@Nullable public java.lang.String getKeyTabPath()
useKeyTab
returns
true
.null
if the default keytab location should
be used.public void setKeyTabPath(@Nullable java.lang.String keyTabPath)
keyTabPath
- The path to the keytab file from which to obtain the
user credentials. It may be null
if the
default keytab location should be used.public boolean useTicketCache()
true
if a ticket cache may be used to take advantage of an
existing Kerberos session, or false
if Kerberos
credentials should always be provided.public void setUseTicketCache(boolean useTicketCache)
useTicketCache
- Indicates whether to enable the use of a ticket
cache to to avoid the need to supply credentials if
the client already has an existing Kerberos
session.public boolean requireCachedCredentials()
true
if GSSAPI authentication should only use an existing
Kerberos session and should fail if the client does not have an
existing session, or false
if the client will be allowed
to create a new session if one does not already exist.public void setRequireCachedCredentials(boolean requireCachedCredentials)
requireCachedCredentials
- Indicates whether an existing Kerberos
session will be required for
authentication. If true
, then
authentication will fail if the client
does not already have an existing
Kerberos session. This will be ignored
if useTicketCache
is false.@Nullable public java.lang.String getTicketCachePath()
null
if the default ticket cache
file should be used.public void setTicketCachePath(@Nullable java.lang.String ticketCachePath)
ticketCachePath
- The path to the Kerberos ticket cache file that
should be used during authentication. It may be
null
if the default ticket cache file
should be used.public boolean renewTGT()
true
if the client should attempt to renew its
ticket-granting ticket if the authentication is processed using an
existing Kerberos session, or false
if not.public void setRenewTGT(boolean renewTGT)
renewTGT
- Indicates whether to attempt to renew the client's
ticket-granting ticket if an existing Kerberos session is
used to authenticate.@Nullable public java.lang.Boolean getIsInitiator()
Boolean.TRUE
if the client should explicitly indicate that
it is the GSSAPI initiator, Boolean.FALSE
if the client
should explicitly indicate that it is the GSSAPI acceptor, or
null
if the client should not explicitly indicate either
state (which is the default if the setIsInitiator(java.lang.Boolean)
method
has not been called).public void setIsInitiator(@Nullable java.lang.Boolean isInitiator)
isInitiator
- Indicates whether the client should be considered the
GSSAPI initiator. A value of Boolean.TRUE
means the client should explicitly indicate that it is
the GSSAPI initiator. A value of
Boolean.FALSE
means the client should
explicitly indicate that it is the GSSAPI acceptor. A
value of null
means that the client will not
explicitly indicate one way or the other (although
this behavior will only apply to Sun/Oracle-based
implementations; on the IBM implementation, the client
will always be the initiator unless explicitly
configured otherwise).@NotNull public GSSAPIChannelBindingType getChannelBindingType()
public void setChannelBindingType(@Nullable GSSAPIChannelBindingType channelBindingType)
channelBindingType
- The type of channel binding that should be used
for the GSSAPI bind request. It may be
null
or NONE
if no channel
binding should be used.@NotNull public java.util.Set<java.lang.String> getSuppressedSystemProperties()
public void setSuppressedSystemProperties(@Nullable java.util.Collection<java.lang.String> suppressedSystemProperties)
suppressedSystemProperties
- A set of system properties that will
not be altered by GSSAPI processing.
It may be null
or empty to
indicate that no properties should be
suppressed.public boolean enableGSSAPIDebugging()
true
if JVM-level debugging should be enabled for GSSAPI
bind processing, or false
if not.public void setEnableGSSAPIDebugging(boolean enableGSSAPIDebugging)
enableGSSAPIDebugging
- Specifies whether JVM-level debugging should
be enabled for GSSAPI bind processing.@NotNull public java.lang.String toString()
toString
in class java.lang.Object