Package org.apache.iotdb.db.auth
Class AuthorityChecker
- java.lang.Object
-
- org.apache.iotdb.db.auth.AuthorityChecker
-
public class AuthorityChecker extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheck(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.TSStatuscheckAuthority(Statement statement, long sessionId)Check whether specific Session has the authorization to given plan.static booleancheckAuthorization(Statement statement, java.lang.String username)Check whether specific user has the authorization to given plan.static booleancheckPermission(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 inttranslateToPermissionId(Operator.OperatorType type)
-
-
-
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.AuthExceptioncheck permission.- Parameters:
username- usernamepaths- paths in List structuretype- Operator typetargetUser- 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- usernamepaths- paths in List structuretype- Statement TypetargetUser- 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
-
translateToPermissionId
public static int translateToPermissionId(Operator.OperatorType type)
-
-