
public static class GSSCredentialSecurityFactory.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
GSSCredentialSecurityFactory.Builder |
addMechanismOid(Oid oid)
Add an
Oid for a mechanism the GSSCredential should be usable with. |
SecurityFactory<GSSKerberosCredential> |
build()
Construct a new
GSSKerberosCredential security factory instance. |
GSSCredentialSecurityFactory.Builder |
setCheckKeyTab(boolean value)
Set if keytab file existence and principal presence in it should be checked on factory build.
|
GSSCredentialSecurityFactory.Builder |
setDebug(boolean debug)
Set if debug logging should be enabled for the JAAS authentication portion of obtaining the
GSSCredential |
GSSCredentialSecurityFactory.Builder |
setFailCache(long seconds)
Set amount of seconds before new try to obtain
GSSCredential should be done if it has failed last time. |
GSSCredentialSecurityFactory.Builder |
setIsServer(boolean isServer)
Set if the credential returned from the factory is representing the server side of the connection.
|
GSSCredentialSecurityFactory.Builder |
setKeyTab(File keyTab)
Set the keytab file to obtain the identity.
|
GSSCredentialSecurityFactory.Builder |
setMinimumRemainingLifetime(int minimumRemainingLifetime)
Once the factory has been called once it will cache the resulting
GSSCredential, this setting
defines how much life it must have left in seconds for it to be re-used. |
GSSCredentialSecurityFactory.Builder |
setObtainKerberosTicket(boolean obtainKerberosTicket)
Set if the KerberosTicket should also be obtained and associated with the Credential/
|
GSSCredentialSecurityFactory.Builder |
setOptions(Map<String,Object> options)
Set other configuration options for
Krb5LoginModule |
GSSCredentialSecurityFactory.Builder |
setPrincipal(String principal)
Set the principal name for the initial authentication from the KeyTab.
|
GSSCredentialSecurityFactory.Builder |
setRequestLifetime(int requestLifetime)
Set the lifetime to request newly created credentials are valid for.
|
GSSCredentialSecurityFactory.Builder |
setWrapGssCredential(boolean value)
Set if the constructed
GSSCredential should be wrapped to prevent improper credential disposal or not. |
public GSSCredentialSecurityFactory.Builder setKeyTab(File keyTab)
keyTab - the keytab file to obtain the identity.this to allow chaining.public GSSCredentialSecurityFactory.Builder setIsServer(boolean isServer)
isServer - is the credential returned from the factory is representing the server side of the connection.this to allow chaining.public GSSCredentialSecurityFactory.Builder setObtainKerberosTicket(boolean obtainKerberosTicket)
obtainKerberosTicket - if the KerberosTicket should also be obtained and associated with the Credential/this to allow chaining.public GSSCredentialSecurityFactory.Builder setMinimumRemainingLifetime(int minimumRemainingLifetime)
GSSCredential, this setting
defines how much life it must have left in seconds for it to be re-used.minimumRemainingLifetime - the time in seconds of life a GSSCredential must have to be re-used.this to allow chaining.public GSSCredentialSecurityFactory.Builder setRequestLifetime(int requestLifetime)
requestLifetime - the lifetime to request newly created credentials are valid for.this to allow chaining.public GSSCredentialSecurityFactory.Builder addMechanismOid(Oid oid)
Oid for a mechanism the GSSCredential should be usable with.oid - the Oid for the mechanism the GSSCredential should be usable with.this to allow chaining.public GSSCredentialSecurityFactory.Builder setPrincipal(String principal)
principal - the principal name for the initial authentication from the KeyTab.this to allow chaining.public GSSCredentialSecurityFactory.Builder setDebug(boolean debug)
GSSCredentialdebug - if debug logging should be enabled for the JAAS authentication portion of obtaining the GSSCredentialthis to allow chaining.public GSSCredentialSecurityFactory.Builder setWrapGssCredential(boolean value)
GSSCredential should be wrapped to prevent improper credential disposal or not.value - true if the constructed GSSCredential should be wrapped; false otherwise.this to allow chaining.public GSSCredentialSecurityFactory.Builder setCheckKeyTab(boolean value)
value - true if keytab file should be checked; false otherwise.this to allow chaining.public GSSCredentialSecurityFactory.Builder setOptions(Map<String,Object> options)
Krb5LoginModuleoptions - the configuration options which will be appended to options passed into Krb5LoginModulethis to allow chaining.public GSSCredentialSecurityFactory.Builder setFailCache(long seconds)
GSSCredential should be done if it has failed last time.
Allows to prevent long waiting to unavailable KDC on every authentication.seconds - amount of seconds to cache fail state of the credential factory; 0 if the cache should not be used.this to allow chaining.public SecurityFactory<GSSKerberosCredential> build() throws IOException
GSSKerberosCredential security factory instance.IOException - when unable to use given KeyTabCopyright © 2020 JBoss by Red Hat. All rights reserved.