@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 static DefaultImpersonationProvider getTestProvider()
public void setConf(Configuration conf)
ConfigurablesetConf in interface Configurablepublic void init(String configurationPrefix)
ImpersonationProviderinit in interface ImpersonationProviderconfigurationPrefix - the configuration prefix for the proxy user
propertiespublic Configuration getConf()
ConfigurablegetConf in interface Configurablepublic void authorize(UserGroupInformation user, String remoteAddress) throws AuthorizationException
ImpersonationProviderauthorize in interface ImpersonationProvideruser - ugi of the effective or proxy user which contains a real userremoteAddress - the ip address of clientAuthorizationExceptionpublic 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 © 2019 Apache Software Foundation. All Rights Reserved.