@InterfaceStability.Unstable @InterfaceAudience.Public public class DefaultImpersonationProvider extends Object implements ImpersonationProvider
Constructor and Description |
---|
DefaultImpersonationProvider() |
Modifier and Type | Method and Description |
---|---|
void |
authorize(UserGroupInformation user,
String remoteAddress)
Authorize the superuser which is doing doAs
|
Configuration |
getConf()
Return the configuration used by this object.
|
Map<String,Collection<String>> |
getProxyGroups() |
Map<String,Collection<String>> |
getProxyHosts() |
String |
getProxySuperuserGroupConfKey(String userName)
Returns configuration key for effective groups allowed for a superuser
|
String |
getProxySuperuserIpConfKey(String userName)
Return configuration key for superuser ip addresses
|
String |
getProxySuperuserUserConfKey(String userName)
Returns configuration key for effective usergroups allowed for a superuser
|
static DefaultImpersonationProvider |
getTestProvider() |
void |
init(String configurationPrefix)
Specifies the configuration prefix for the proxy user properties and
initializes the provider.
|
void |
setConf(Configuration conf)
Set the configuration to be used by this object.
|
public DefaultImpersonationProvider()
public static DefaultImpersonationProvider getTestProvider()
public void setConf(Configuration conf)
Configurable
setConf
in interface Configurable
public void init(String configurationPrefix)
ImpersonationProvider
init
in interface ImpersonationProvider
configurationPrefix
- the configuration prefix for the proxy user
propertiespublic Configuration getConf()
Configurable
getConf
in interface Configurable
public void authorize(UserGroupInformation user, String remoteAddress) throws AuthorizationException
ImpersonationProvider
authorize
in interface ImpersonationProvider
user
- ugi of the effective or proxy user which contains a real userremoteAddress
- the ip address of clientAuthorizationException
public String getProxySuperuserUserConfKey(String userName)
userName
- name of the superuserpublic String getProxySuperuserGroupConfKey(String userName)
userName
- name of the superuserpublic String getProxySuperuserIpConfKey(String userName)
userName
- name of the superuserpublic Map<String,Collection<String>> getProxyGroups()
public Map<String,Collection<String>> getProxyHosts()
Copyright © 2017 Apache Software Foundation. All Rights Reserved.