@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,
         InetAddress 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. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitauthorizepublic static DefaultImpersonationProvider getTestProvider()
public void setConf(Configuration conf)
ConfigurablesetConf in interface Configurableconf - configuration to be usedpublic 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, InetAddress remoteAddress) throws AuthorizationException
ImpersonationProviderauthorize in interface ImpersonationProvideruser - ugi of the effective or proxy user which contains a real userremoteAddress - the ip address of clientAuthorizationException - Authorization Exception.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 © 2023 Apache Software Foundation. All rights reserved.