Class ProxyUsers

java.lang.Object
org.apache.hadoop.security.authorize.ProxyUsers

@Unstable @LimitedPrivate({"HDFS","MapReduce","HBase","Hive"}) public class ProxyUsers extends Object
  • Field Details

  • Constructor Details

    • ProxyUsers

      public ProxyUsers()
  • Method Details

    • refreshSuperUserGroupsConfiguration

      public static void refreshSuperUserGroupsConfiguration()
      refresh Impersonation rules
    • refreshSuperUserGroupsConfiguration

      public static void refreshSuperUserGroupsConfiguration(Configuration conf, String proxyUserPrefix)
      Refreshes configuration using the specified Proxy user prefix for properties.
      Parameters:
      conf - configuration
      proxyUserPrefix - proxy user configuration prefix
    • refreshSuperUserGroupsConfiguration

      public static void refreshSuperUserGroupsConfiguration(Configuration conf)
      Refreshes configuration using the default Proxy user prefix for properties.
      Parameters:
      conf - configuration
    • authorize

      public static void authorize(UserGroupInformation user, String remoteAddress) throws AuthorizationException
      Authorize the superuser which is doing doAs. authorize(UserGroupInformation, InetAddress) should be preferred to avoid possibly re-resolving the ip address.
      Parameters:
      user - ugi of the effective or proxy user which contains a real user
      remoteAddress - the ip address of client
      Throws:
      AuthorizationException - Authorization Exception.
    • authorize

      public static void authorize(UserGroupInformation user, InetAddress remoteAddress) throws AuthorizationException
      Authorize the superuser which is doing doAs.
      Parameters:
      user - ugi of the effective or proxy user which contains a real user
      remoteAddress - the inet address of client
      Throws:
      AuthorizationException - Authorization Exception.
    • authorize

      @Deprecated public static void authorize(UserGroupInformation user, String remoteAddress, Configuration conf) throws AuthorizationException
      Deprecated.
      This function is kept to provide backward compatibility.
      Parameters:
      user - user.
      remoteAddress - remote address.
      conf - configuration.
      Throws:
      AuthorizationException - Authorization Exception.
    • getDefaultImpersonationProvider

      @VisibleForTesting public static DefaultImpersonationProvider getDefaultImpersonationProvider()