Package org.apache.drill.exec.rpc.user
Class InboundImpersonationManager
java.lang.Object
org.apache.drill.exec.rpc.user.InboundImpersonationManager
Helper class to manage inbound impersonation.
Impersonation policies format:
[
{
proxy_principals : { users : ["..."], groups : ["..."] },
target_principals : { users : ["..."], groups : ["..."] }
},
{
proxy_principals : { users : ["..."], groups : ["..."] },
target_principals : { users : ["..."], groups : ["..."] }
},
...
]
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Validator for impersonation policies. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
hasImpersonationPrivileges
(String proxyName, String targetName, String policiesString) void
replaceUserOnSession
(String targetName, UserSession session) Check if the current session user, as a proxy user, is authorized to impersonate the given target user based on the system's impersonation policies.
-
Constructor Details
-
InboundImpersonationManager
public InboundImpersonationManager()
-
-
Method Details
-
hasImpersonationPrivileges
public static boolean hasImpersonationPrivileges(String proxyName, String targetName, String policiesString) throws IOException - Throws:
IOException
-
replaceUserOnSession
Check if the current session user, as a proxy user, is authorized to impersonate the given target user based on the system's impersonation policies.- Parameters:
targetName
- target user namesession
- user session
-