Class AuthenticationConfigurationBuilder
- java.lang.Object
-
- org.infinispan.hotrod.configuration.AbstractConfigurationChildBuilder
-
- org.infinispan.hotrod.configuration.AuthenticationConfigurationBuilder
-
- All Implemented Interfaces:
org.infinispan.commons.configuration.Builder<AuthenticationConfiguration>,ConfigurationChildBuilder
public class AuthenticationConfigurationBuilder extends AbstractConfigurationChildBuilder implements org.infinispan.commons.configuration.Builder<AuthenticationConfiguration>
AuthenticationConfigurationBuilder.- Since:
- 14.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_REALM
-
Constructor Summary
Constructors Constructor Description AuthenticationConfigurationBuilder(HotRodConfigurationBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationConfigurationBuildercallbackHandler(CallbackHandler callbackHandler)Specifies aCallbackHandlerto be used during the authentication handshake.AuthenticationConfigurationBuilderclientSubject(Subject clientSubject)Sets the client subject, necessary for those SASL mechanisms which require it to access client credentials (i.e.AuthenticationConfigurationcreate()AuthenticationConfigurationBuilderdisable()Disables authenticationAuthenticationConfigurationBuilderenable()Enables authenticationAuthenticationConfigurationBuilderenabled(boolean enabled)Configures whether authentication should be enabled or notAuthenticationConfigurationBuilderpassword(char[] password)Specifies the password to be used for authentication.AuthenticationConfigurationBuilderpassword(String password)Specifies the password to be used for authentication.AuthenticationConfigurationBuilderread(AuthenticationConfiguration template)AuthenticationConfigurationBuilderrealm(String realm)Specifies the realm to be used for authentication.AuthenticationConfigurationBuildersaslMechanism(String saslMechanism)Selects the SASL mechanism to use for the connection to the server.AuthenticationConfigurationBuildersaslProperties(Map<String,String> saslProperties)Sets the SASL properties.AuthenticationConfigurationBuildersaslQop(SaslQop... qop)Sets the SASL QOP property.AuthenticationConfigurationBuildersaslStrength(SaslStrength... strength)Sets the SASL strength property.AuthenticationConfigurationBuilderserverName(String serverName)Sets the name of the server as expected by the SASL protocol Setting this property also implicitly enables authentication (seeenable()This defaults to "infinispan"AuthenticationConfigurationBuildertoken(String token)AuthenticationConfigurationBuilderusername(String username)Specifies the username to be used for authentication.voidvalidate()HotRodConfigurationBuilderwithProperties(Properties properties)Configures this builder using the specified properties.-
Methods inherited from class org.infinispan.hotrod.configuration.AbstractConfigurationChildBuilder
addCluster, addContextInitializer, addContextInitializer, addContextInitializers, addJavaSerialAllowList, addServer, addServers, asyncExecutorFactory, balancingStrategy, balancingStrategy, balancingStrategy, batchSize, build, clientIntelligence, connectionPool, connectionTimeout, consistentHashImpl, consistentHashImpl, forceReturnValues, marshaller, marshaller, marshaller, maxRetries, remoteCache, security, socketTimeout, statistics, tcpKeepAlive, tcpNoDelay, transactionTimeout, transportFactory, uri, uri, version
-
-
-
-
Field Detail
-
DEFAULT_REALM
public static final String DEFAULT_REALM
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuthenticationConfigurationBuilder
public AuthenticationConfigurationBuilder(HotRodConfigurationBuilder builder)
-
-
Method Detail
-
callbackHandler
public AuthenticationConfigurationBuilder callbackHandler(CallbackHandler callbackHandler)
Specifies aCallbackHandlerto be used during the authentication handshake. TheCallbacks that need to be handled are specific to the chosen SASL mechanism.
-
enabled
public AuthenticationConfigurationBuilder enabled(boolean enabled)
Configures whether authentication should be enabled or not
-
enable
public AuthenticationConfigurationBuilder enable()
Enables authentication
-
disable
public AuthenticationConfigurationBuilder disable()
Disables authentication
-
saslMechanism
public AuthenticationConfigurationBuilder saslMechanism(String saslMechanism)
Selects the SASL mechanism to use for the connection to the server. Setting this property also implicitly enables authentication (seeenable()
-
saslProperties
public AuthenticationConfigurationBuilder saslProperties(Map<String,String> saslProperties)
Sets the SASL properties. Setting this property also implicitly enables authentication (seeenable()
-
saslQop
public AuthenticationConfigurationBuilder saslQop(SaslQop... qop)
Sets the SASL QOP property. If multiple values are specified they will determine preference order. Setting this property also implicitly enables authentication (seeenable()
-
saslStrength
public AuthenticationConfigurationBuilder saslStrength(SaslStrength... strength)
Sets the SASL strength property. If multiple values are specified they will determine preference order. Setting this property also implicitly enables authentication (seeenable()
-
serverName
public AuthenticationConfigurationBuilder serverName(String serverName)
Sets the name of the server as expected by the SASL protocol Setting this property also implicitly enables authentication (seeenable()This defaults to "infinispan"
-
clientSubject
public AuthenticationConfigurationBuilder clientSubject(Subject clientSubject)
Sets the client subject, necessary for those SASL mechanisms which require it to access client credentials (i.e. GSSAPI). Setting this property also implicitly enables authentication (seeenable()
-
username
public AuthenticationConfigurationBuilder username(String username)
Specifies the username to be used for authentication. This will use a simple CallbackHandler. This is mutually exclusive with explicitly providing the CallbackHandler. Setting this property also implicitly enables authentication (seeenable()
-
password
public AuthenticationConfigurationBuilder password(String password)
Specifies the password to be used for authentication. A username is also required. Setting this property also implicitly enables authentication (seeenable()
-
password
public AuthenticationConfigurationBuilder password(char[] password)
Specifies the password to be used for authentication. A username is also required. Setting this property also implicitly enables authentication (seeenable()
-
realm
public AuthenticationConfigurationBuilder realm(String realm)
Specifies the realm to be used for authentication. Username and password also need to be supplied. If none is specified, this defaults toDEFAULT_REALM. Setting this property also implicitly enables authentication (seeenable()
-
token
public AuthenticationConfigurationBuilder token(String token)
-
create
public AuthenticationConfiguration create()
- Specified by:
createin interfaceorg.infinispan.commons.configuration.Builder<AuthenticationConfiguration>
-
read
public AuthenticationConfigurationBuilder read(AuthenticationConfiguration template)
- Specified by:
readin interfaceorg.infinispan.commons.configuration.Builder<AuthenticationConfiguration>
-
validate
public void validate()
- Specified by:
validatein interfaceorg.infinispan.commons.configuration.Builder<AuthenticationConfiguration>
-
withProperties
public HotRodConfigurationBuilder withProperties(Properties properties)
Description copied from interface:ConfigurationChildBuilderConfigures this builder using the specified properties. SeeHotRodConfigurationBuilderfor a list.- Specified by:
withPropertiesin interfaceConfigurationChildBuilder- Overrides:
withPropertiesin classAbstractConfigurationChildBuilder
-
-