Configurable, ImpersonationProvider@Unstable @Public public class DefaultImpersonationProvider extends java.lang.Object implements ImpersonationProvider
| Constructor | Description |
|---|---|
DefaultImpersonationProvider() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
authorize(UserGroupInformation user,
java.net.InetAddress remoteAddress) |
Authorize the superuser which is doing doAs.
|
Configuration |
getConf() |
Return the configuration used by this object.
|
java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> |
getProxyGroups() |
|
java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> |
getProxyHosts() |
|
java.lang.String |
getProxySuperuserGroupConfKey(java.lang.String userName) |
Returns configuration key for effective groups allowed for a superuser
|
java.lang.String |
getProxySuperuserIpConfKey(java.lang.String userName) |
Return configuration key for superuser ip addresses
|
java.lang.String |
getProxySuperuserUserConfKey(java.lang.String userName) |
Returns configuration key for effective usergroups allowed for a superuser
|
static DefaultImpersonationProvider |
getTestProvider() |
|
void |
init(java.lang.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(java.lang.String configurationPrefix)
ImpersonationProviderinit in interface ImpersonationProviderconfigurationPrefix - the configuration prefix for the proxy user
propertiespublic Configuration getConf()
ConfigurablegetConf in interface Configurablepublic void authorize(UserGroupInformation user, java.net.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 java.lang.String getProxySuperuserUserConfKey(java.lang.String userName)
userName - name of the superuserpublic java.lang.String getProxySuperuserGroupConfKey(java.lang.String userName)
userName - name of the superuserpublic java.lang.String getProxySuperuserIpConfKey(java.lang.String userName)
userName - name of the superuser@VisibleForTesting public java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getProxyGroups()
@VisibleForTesting public java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getProxyHosts()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.