Class SaslPropertiesResolver

java.lang.Object
org.apache.hadoop.security.SaslPropertiesResolver
All Implemented Interfaces:
Configurable
Direct Known Subclasses:
IngressPortBasedResolver, WhitelistBasedResolver

public class SaslPropertiesResolver extends Object implements Configurable
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 Details

    • SaslPropertiesResolver

      public SaslPropertiesResolver()
  • Method Details

    • getInstance

      public static SaslPropertiesResolver getInstance(Configuration conf)
      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

      public void setConf(Configuration conf)
      Description copied from interface: Configurable
      Set the configuration to be used by this object.
      Specified by:
      setConf in interface Configurable
      Parameters:
      conf - configuration to be used
    • getConf

      public Configuration getConf()
      Description copied from interface: Configurable
      Return the configuration used by this object.
      Specified by:
      getConf in interface Configurable
      Returns:
      Configuration
    • getDefaultProperties

      public Map<String,String> getDefaultProperties()
      The default Sasl Properties read from the configuration
      Returns:
      sasl Properties
    • getServerProperties

      public Map<String,String> getServerProperties(InetAddress clientAddress)
      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

      public Map<String,String> getServerProperties(InetAddress clientAddress, int ingressPort)
      Identify the Sasl Properties to be used for a connection with a client.
      Parameters:
      clientAddress - client's address
      ingressPort - the port that the client is connecting
      Returns:
      the sasl properties to be used for the connection.
    • getClientProperties

      public Map<String,String> getClientProperties(InetAddress serverAddress)
      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

      public Map<String,String> getClientProperties(InetAddress serverAddress, int ingressPort)
      Identify the Sasl Properties to be used for a connection with a server.
      Parameters:
      serverAddress - server's address
      ingressPort - the port that is used to connect to server
      Returns:
      the sasl properties to be used for the connection.