Class DrillUserPrincipal

java.lang.Object
org.apache.drill.exec.server.rest.auth.DrillUserPrincipal
All Implemented Interfaces:
Principal
Direct Known Subclasses:
DrillUserPrincipal.AnonDrillUserPrincipal

public class DrillUserPrincipal extends Object implements Principal
Captures Drill user credentials and privilege's of the session user.
  • Field Details

    • ANONYMOUS_USER

      public static final String ANONYMOUS_USER
      See Also:
    • AUTHENTICATED_ROLE

      public static final String AUTHENTICATED_ROLE
      See Also:
    • ADMIN_ROLE

      public static final String ADMIN_ROLE
      See Also:
    • ADMIN_USER_ROLES

      public static final String[] ADMIN_USER_ROLES
    • NON_ADMIN_USER_ROLES

      public static final String[] NON_ADMIN_USER_ROLES
    • ADMIN_PRINCIPALS

      public static final List<org.eclipse.jetty.security.AbstractLoginService.RolePrincipal> ADMIN_PRINCIPALS
    • NON_ADMIN_PRINCIPALS

      public static final List<org.eclipse.jetty.security.AbstractLoginService.RolePrincipal> NON_ADMIN_PRINCIPALS
  • Constructor Details

    • DrillUserPrincipal

      public DrillUserPrincipal(String userName, boolean isAdmin)
  • Method Details

    • isAdminUser

      public boolean isAdminUser()
    • getName

      public String getName()
      Specified by:
      getName in interface Principal
    • canManageProfileOf

      public boolean canManageProfileOf(String profileOwner)
      Is the user identified by this user principal can manage (read) the profile owned by the given user?
      Parameters:
      profileOwner - Owner of the profile.
      Returns:
      true/false
    • canManageQueryOf

      public boolean canManageQueryOf(String queryUser)
      Is the user identified by this user principal can manage (cancel) the query issued by the given user?
      Parameters:
      queryUser - User who launched the query.
      Returns:
      true/false