Package org.wildfly.security.auth.util
Class GSSCredentialSecurityFactory.Builder
- java.lang.Object
- 
- org.wildfly.security.auth.util.GSSCredentialSecurityFactory.Builder
 
- 
- Enclosing class:
- GSSCredentialSecurityFactory
 
 public static class GSSCredentialSecurityFactory.Builder extends Object A builder for GSS credential security factories.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description GSSCredentialSecurityFactory.BuilderaddMechanismOid(Oid oid)Add anOidfor a mechanism theGSSCredentialshould be usable with.SecurityFactory<GSSKerberosCredential>build()Construct a newGSSKerberosCredentialsecurity factory instance.GSSCredentialSecurityFactory.BuildersetCheckKeyTab(boolean value)Set if keytab file existence and principal presence in it should be checked on factory build.GSSCredentialSecurityFactory.BuildersetDebug(boolean debug)Set if debug logging should be enabled for the JAAS authentication portion of obtaining theGSSCredentialGSSCredentialSecurityFactory.BuildersetFailCache(long seconds)Set amount of seconds before new try to obtainGSSCredentialshould be done if it has failed last time.GSSCredentialSecurityFactory.BuildersetIsServer(boolean isServer)Set if the credential returned from the factory is representing the server side of the connection.GSSCredentialSecurityFactory.BuildersetKeyTab(File keyTab)Set the keytab file to obtain the identity.GSSCredentialSecurityFactory.BuildersetMinimumRemainingLifetime(int minimumRemainingLifetime)Once the factory has been called once it will cache the resultingGSSCredential, this setting defines how much life it must have left in seconds for it to be re-used.GSSCredentialSecurityFactory.BuildersetObtainKerberosTicket(boolean obtainKerberosTicket)Set if the KerberosTicket should also be obtained and associated with the Credential/GSSCredentialSecurityFactory.BuildersetOptions(Map<String,Object> options)Set other configuration options forKrb5LoginModuleGSSCredentialSecurityFactory.BuildersetPrincipal(String principal)Set the principal name for the initial authentication from the KeyTab.GSSCredentialSecurityFactory.BuildersetRequestLifetime(int requestLifetime)Set the lifetime to request newly created credentials are valid for.GSSCredentialSecurityFactory.BuildersetWrapGssCredential(boolean value)Set if the constructedGSSCredentialshould be wrapped to prevent improper credential disposal or not.
 
- 
- 
- 
Method Detail- 
setKeyTabpublic GSSCredentialSecurityFactory.Builder setKeyTab(File keyTab) Set the keytab file to obtain the identity.- Parameters:
- keyTab- the keytab file to obtain the identity.
- Returns:
- thisto allow chaining.
 
 - 
setIsServerpublic GSSCredentialSecurityFactory.Builder setIsServer(boolean isServer) Set if the credential returned from the factory is representing the server side of the connection.- Parameters:
- isServer- is the credential returned from the factory is representing the server side of the connection.
- Returns:
- thisto allow chaining.
 
 - 
setObtainKerberosTicketpublic GSSCredentialSecurityFactory.Builder setObtainKerberosTicket(boolean obtainKerberosTicket) Set if the KerberosTicket should also be obtained and associated with the Credential/- Parameters:
- obtainKerberosTicket- if the KerberosTicket should also be obtained and associated with the Credential/
- Returns:
- thisto allow chaining.
 
 - 
setMinimumRemainingLifetimepublic GSSCredentialSecurityFactory.Builder setMinimumRemainingLifetime(int minimumRemainingLifetime) Once the factory has been called once it will cache the resultingGSSCredential, this setting defines how much life it must have left in seconds for it to be re-used.- Parameters:
- minimumRemainingLifetime- the time in seconds of life a- GSSCredentialmust have to be re-used.
- Returns:
- thisto allow chaining.
 
 - 
setRequestLifetimepublic GSSCredentialSecurityFactory.Builder setRequestLifetime(int requestLifetime) Set the lifetime to request newly created credentials are valid for.- Parameters:
- requestLifetime- the lifetime to request newly created credentials are valid for.
- Returns:
- thisto allow chaining.
 
 - 
addMechanismOidpublic GSSCredentialSecurityFactory.Builder addMechanismOid(Oid oid) Add anOidfor a mechanism theGSSCredentialshould be usable with.- Parameters:
- oid- the- Oidfor the mechanism the- GSSCredentialshould be usable with.
- Returns:
- thisto allow chaining.
 
 - 
setPrincipalpublic GSSCredentialSecurityFactory.Builder setPrincipal(String principal) Set the principal name for the initial authentication from the KeyTab.- Parameters:
- principal- the principal name for the initial authentication from the KeyTab.
- Returns:
- thisto allow chaining.
 
 - 
setDebugpublic GSSCredentialSecurityFactory.Builder setDebug(boolean debug) Set if debug logging should be enabled for the JAAS authentication portion of obtaining theGSSCredential- Parameters:
- debug- if debug logging should be enabled for the JAAS authentication portion of obtaining the- GSSCredential
- Returns:
- thisto allow chaining.
 
 - 
setWrapGssCredentialpublic GSSCredentialSecurityFactory.Builder setWrapGssCredential(boolean value) Set if the constructedGSSCredentialshould be wrapped to prevent improper credential disposal or not.- Parameters:
- value-- trueif the constructed- GSSCredentialshould be wrapped;- falseotherwise.
- Returns:
- thisto allow chaining.
 
 - 
setCheckKeyTabpublic GSSCredentialSecurityFactory.Builder setCheckKeyTab(boolean value) Set if keytab file existence and principal presence in it should be checked on factory build.- Parameters:
- value-- trueif keytab file should be checked;- falseotherwise.
- Returns:
- thisto allow chaining.
 
 - 
setOptionspublic GSSCredentialSecurityFactory.Builder setOptions(Map<String,Object> options) Set other configuration options forKrb5LoginModule- Parameters:
- options- the configuration options which will be appended to options passed into- Krb5LoginModule
- Returns:
- thisto allow chaining.
 
 - 
setFailCachepublic GSSCredentialSecurityFactory.Builder setFailCache(long seconds) Set amount of seconds before new try to obtainGSSCredentialshould be done if it has failed last time. Allows to prevent long waiting to unavailable KDC on every authentication.- Parameters:
- seconds- amount of seconds to cache fail state of the credential factory; 0 if the cache should not be used.
- Returns:
- thisto allow chaining.
 
 - 
buildpublic SecurityFactory<GSSKerberosCredential> build() throws IOException Construct a newGSSKerberosCredentialsecurity factory instance.- Returns:
- the built factory instance
- Throws:
- IOException- when unable to use given KeyTab
 
 
- 
 
-