Class InboundImpersonationManager

java.lang.Object
org.apache.drill.exec.rpc.user.InboundImpersonationManager

public class InboundImpersonationManager extends Object
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 : ["..."] } }, ... ]

  • Constructor Details

    • InboundImpersonationManager

      public InboundImpersonationManager()
  • Method Details

    • hasImpersonationPrivileges

      public static boolean hasImpersonationPrivileges(String proxyName, String targetName, String policiesString) throws IOException
      Throws:
      IOException
    • replaceUserOnSession

      public 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.
      Parameters:
      targetName - target user name
      session - user session