Class ProxyUsers
java.lang.Object
org.apache.hadoop.security.authorize.ProxyUsers
@Unstable
@LimitedPrivate({"HDFS","MapReduce","HBase","Hive"})
public class ProxyUsers
extends Object
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidauthorize(UserGroupInformation user, String remoteAddress) Authorize the superuser which is doing doAs.static voidauthorize(UserGroupInformation user, String remoteAddress, Configuration conf) Deprecated.static voidauthorize(UserGroupInformation user, InetAddress remoteAddress) Authorize the superuser which is doing doAs.static DefaultImpersonationProviderstatic voidrefresh Impersonation rulesstatic voidRefreshes configuration using the default Proxy user prefix for properties.static voidrefreshSuperUserGroupsConfiguration(Configuration conf, String proxyUserPrefix) Refreshes configuration using the specified Proxy user prefix for properties.
-
Field Details
-
CONF_HADOOP_PROXYUSER
- See Also:
-
-
Constructor Details
-
ProxyUsers
public ProxyUsers()
-
-
Method Details
-
refreshSuperUserGroupsConfiguration
public static void refreshSuperUserGroupsConfiguration()refresh Impersonation rules -
refreshSuperUserGroupsConfiguration
Refreshes configuration using the specified Proxy user prefix for properties.- Parameters:
conf- configurationproxyUserPrefix- proxy user configuration prefix
-
refreshSuperUserGroupsConfiguration
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 userremoteAddress- 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 userremoteAddress- the inet address of client- Throws:
AuthorizationException- Authorization Exception.
-
authorize
@Deprecated public static void authorize(UserGroupInformation user, String remoteAddress, Configuration conf) throws AuthorizationException Deprecated.useauthorize(UserGroupInformation, String)instead.This function is kept to provide backward compatibility.- Parameters:
user- user.remoteAddress- remote address.conf- configuration.- Throws:
AuthorizationException- Authorization Exception.
-
getDefaultImpersonationProvider
-
authorize(UserGroupInformation, String)instead.