Package org.apache.hadoop.security
Class SaslPropertiesResolver
java.lang.Object
org.apache.hadoop.security.SaslPropertiesResolver
- All Implemented Interfaces:
Configurable
- Direct Known Subclasses:
IngressPortBasedResolver,WhitelistBasedResolver
Provides SaslProperties to be used for a connection.
The default implementation is to read the values from configuration.
This class can be overridden to provide custom SaslProperties.
The custom class can be specified via configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClientProperties(InetAddress serverAddress) Identify the Sasl Properties to be used for a connection with a server.getClientProperties(InetAddress serverAddress, int ingressPort) Identify the Sasl Properties to be used for a connection with a server.getConf()Return the configuration used by this object.The default Sasl Properties read from the configurationstatic SaslPropertiesResolvergetInstance(Configuration conf) Returns an instance of SaslPropertiesResolver.getServerProperties(InetAddress clientAddress) Identify the Sasl Properties to be used for a connection with a client.getServerProperties(InetAddress clientAddress, int ingressPort) Identify the Sasl Properties to be used for a connection with a client.voidsetConf(Configuration conf) Set the configuration to be used by this object.
-
Constructor Details
-
SaslPropertiesResolver
public SaslPropertiesResolver()
-
-
Method Details
-
getInstance
Returns an instance of SaslPropertiesResolver. Looks up the configuration to see if there is custom class specified. Constructs the instance by passing the configuration directly to the constructor to achieve thread safety using final fields.- Parameters:
conf- configuration.- Returns:
- SaslPropertiesResolver
-
setConf
Description copied from interface:ConfigurableSet the configuration to be used by this object.- Specified by:
setConfin interfaceConfigurable- Parameters:
conf- configuration to be used
-
getConf
Description copied from interface:ConfigurableReturn the configuration used by this object.- Specified by:
getConfin interfaceConfigurable- Returns:
- Configuration
-
getDefaultProperties
The default Sasl Properties read from the configuration- Returns:
- sasl Properties
-
getServerProperties
Identify the Sasl Properties to be used for a connection with a client.- Parameters:
clientAddress- client's address- Returns:
- the sasl properties to be used for the connection.
-
getServerProperties
Identify the Sasl Properties to be used for a connection with a client.- Parameters:
clientAddress- client's addressingressPort- the port that the client is connecting- Returns:
- the sasl properties to be used for the connection.
-
getClientProperties
Identify the Sasl Properties to be used for a connection with a server.- Parameters:
serverAddress- server's address- Returns:
- the sasl properties to be used for the connection.
-
getClientProperties
Identify the Sasl Properties to be used for a connection with a server.- Parameters:
serverAddress- server's addressingressPort- the port that is used to connect to server- Returns:
- the sasl properties to be used for the connection.
-