Class DefaultImpersonationProvider
java.lang.Object
org.apache.hadoop.security.authorize.DefaultImpersonationProvider
- All Implemented Interfaces:
Configurable,ImpersonationProvider
@Unstable
@Public
public class DefaultImpersonationProvider
extends Object
implements ImpersonationProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidauthorize(UserGroupInformation user, InetAddress remoteAddress) Authorize the superuser which is doing doAs.getConf()Return the configuration used by this object.getProxySuperuserGroupConfKey(String userName) Returns configuration key for effective groups allowed for a superusergetProxySuperuserIpConfKey(String userName) Return configuration key for superuser ip addressesgetProxySuperuserUserConfKey(String userName) Returns configuration key for effective usergroups allowed for a superuserstatic DefaultImpersonationProvidervoidSpecifies the configuration prefix for the proxy user properties and initializes the provider.voidsetConf(Configuration conf) Set the configuration to be used by this object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.security.authorize.ImpersonationProvider
authorize
-
Constructor Details
-
DefaultImpersonationProvider
public DefaultImpersonationProvider()
-
-
Method Details
-
getTestProvider
-
setConf
Description copied from interface:ConfigurableSet the configuration to be used by this object.- Specified by:
setConfin interfaceConfigurable- Parameters:
conf- configuration to be used
-
init
Description copied from interface:ImpersonationProviderSpecifies the configuration prefix for the proxy user properties and initializes the provider.- Specified by:
initin interfaceImpersonationProvider- Parameters:
configurationPrefix- the configuration prefix for the proxy user properties
-
getConf
Description copied from interface:ConfigurableReturn the configuration used by this object.- Specified by:
getConfin interfaceConfigurable- Returns:
- Configuration
-
authorize
public void authorize(UserGroupInformation user, InetAddress remoteAddress) throws AuthorizationException Description copied from interface:ImpersonationProviderAuthorize the superuser which is doing doAs.- Specified by:
authorizein interfaceImpersonationProvider- Parameters:
user- ugi of the effective or proxy user which contains a real userremoteAddress- the ip address of client- Throws:
AuthorizationException- Authorization Exception.
-
getProxySuperuserUserConfKey
Returns configuration key for effective usergroups allowed for a superuser- Parameters:
userName- name of the superuser- Returns:
- configuration key for superuser usergroups
-
getProxySuperuserGroupConfKey
Returns configuration key for effective groups allowed for a superuser- Parameters:
userName- name of the superuser- Returns:
- configuration key for superuser groups
-
getProxySuperuserIpConfKey
Return configuration key for superuser ip addresses- Parameters:
userName- name of the superuser- Returns:
- configuration key for superuser ip-addresses
-
getProxyGroups
-
getProxyHosts
-