Class ApplicationACLsManager
java.lang.Object
org.apache.hadoop.yarn.server.security.ApplicationACLsManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId, Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType, String> acls) booleanbooleancheckAccess(org.apache.hadoop.security.UserGroupInformation callerUGI, org.apache.hadoop.yarn.api.records.ApplicationAccessType applicationAccessType, String applicationOwner, org.apache.hadoop.yarn.api.records.ApplicationId applicationId) If authorization is enabled, checks whether the user (in the callerUGI) is authorized to perform the access specified by 'applicationAccessType' on the application by checking if the user is applicationOwner or part of application ACL for the specific access-type.final booleanisAdmin(org.apache.hadoop.security.UserGroupInformation calledUGI) Check if the given user in an admin.voidremoveApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
-
Constructor Details
-
ApplicationACLsManager
@VisibleForTesting public ApplicationACLsManager() -
ApplicationACLsManager
public ApplicationACLsManager(org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
areACLsEnabled
public boolean areACLsEnabled() -
addApplication
-
removeApplication
public void removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId) -
checkAccess
public boolean checkAccess(org.apache.hadoop.security.UserGroupInformation callerUGI, org.apache.hadoop.yarn.api.records.ApplicationAccessType applicationAccessType, String applicationOwner, org.apache.hadoop.yarn.api.records.ApplicationId applicationId) If authorization is enabled, checks whether the user (in the callerUGI) is authorized to perform the access specified by 'applicationAccessType' on the application by checking if the user is applicationOwner or part of application ACL for the specific access-type.- The owner of the application can have all access-types on the application
- For all other users/groups application-acls are checked
- Parameters:
callerUGI- UserGroupInformation for the user.applicationAccessType- Application Access Type.applicationOwner- Application Owner.applicationId- ApplicationId.- Returns:
- true if the user has permission, false otherwise.
-
isAdmin
public final boolean isAdmin(org.apache.hadoop.security.UserGroupInformation calledUGI) Check if the given user in an admin.- Parameters:
calledUGI- UserGroupInformation for the user- Returns:
- true if the user is an admin, false otherwise
-