Class AuthorityChecker


  • public class AuthorityChecker
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean check​(java.lang.String username, java.util.List<? extends org.apache.iotdb.commons.path.PartialPath> paths, Operator.OperatorType type, java.lang.String targetUser)
      check permission.
      static org.apache.iotdb.common.rpc.thrift.TSStatus checkAuthority​(Statement statement, long sessionId)
      Check whether specific Session has the authorization to given plan.
      static boolean checkAuthorization​(Statement statement, java.lang.String username)
      Check whether specific user has the authorization to given plan.
      static boolean checkPermission​(java.lang.String username, java.util.List<? extends org.apache.iotdb.commons.path.PartialPath> paths, StatementType type, java.lang.String targetUser)
      check permission(datanode to confignode).
      static int translateToPermissionId​(Operator.OperatorType type)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • check

        public static boolean check​(java.lang.String username,
                                    java.util.List<? extends org.apache.iotdb.commons.path.PartialPath> paths,
                                    Operator.OperatorType type,
                                    java.lang.String targetUser)
                             throws org.apache.iotdb.commons.auth.AuthException
        check permission.
        Parameters:
        username - username
        paths - paths in List structure
        type - Operator type
        targetUser - target user
        Returns:
        if permission-check is passed
        Throws:
        org.apache.iotdb.commons.auth.AuthException - Authentication Exception
      • checkPermission

        public static boolean checkPermission​(java.lang.String username,
                                              java.util.List<? extends org.apache.iotdb.commons.path.PartialPath> paths,
                                              StatementType type,
                                              java.lang.String targetUser)
        check permission(datanode to confignode).
        Parameters:
        username - username
        paths - paths in List structure
        type - Statement Type
        targetUser - target user
        Returns:
        if permission-check is passed
      • checkAuthority

        public static org.apache.iotdb.common.rpc.thrift.TSStatus checkAuthority​(Statement statement,
                                                                                 long sessionId)
        Check whether specific Session has the authorization to given plan.
      • checkAuthorization

        public static boolean checkAuthorization​(Statement statement,
                                                 java.lang.String username)
                                          throws org.apache.iotdb.commons.auth.AuthException
        Check whether specific user has the authorization to given plan.
        Throws:
        org.apache.iotdb.commons.auth.AuthException