@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class YarnAuthorizationProvider extends Object
Constructor and Description |
---|
YarnAuthorizationProvider() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
checkPermission(AccessType accessType,
PrivilegedEntity target,
org.apache.hadoop.security.UserGroupInformation user)
Check if user has the permission to access the target object.
|
static YarnAuthorizationProvider |
getInstance(org.apache.hadoop.conf.Configuration conf) |
abstract void |
init(org.apache.hadoop.conf.Configuration conf)
Initialize the provider.
|
abstract boolean |
isAdmin(org.apache.hadoop.security.UserGroupInformation ugi)
Check if the user is an admin.
|
abstract void |
setAdmins(org.apache.hadoop.security.authorize.AccessControlList acls,
org.apache.hadoop.security.UserGroupInformation ugi)
Set a list of users/groups who have admin access
|
abstract void |
setPermission(PrivilegedEntity target,
Map<AccessType,org.apache.hadoop.security.authorize.AccessControlList> acls,
org.apache.hadoop.security.UserGroupInformation ugi)
Set ACLs for the target object.
|
public static YarnAuthorizationProvider getInstance(org.apache.hadoop.conf.Configuration conf)
public abstract void init(org.apache.hadoop.conf.Configuration conf)
public abstract boolean checkPermission(AccessType accessType, PrivilegedEntity target, org.apache.hadoop.security.UserGroupInformation user)
accessType
- The type of accessing method.target
- The target object being accessed, e.g. app/queueuser
- User who access the targetpublic abstract void setPermission(PrivilegedEntity target, Map<AccessType,org.apache.hadoop.security.authorize.AccessControlList> acls, org.apache.hadoop.security.UserGroupInformation ugi)
target
- The target object.acls
- A map from access method to a list of users and/or groups who has
permission to do the access.ugi
- User who sets the permissions.public abstract void setAdmins(org.apache.hadoop.security.authorize.AccessControlList acls, org.apache.hadoop.security.UserGroupInformation ugi)
acls
- users/groups who have admin accessugi
- User who sets the admin acls.public abstract boolean isAdmin(org.apache.hadoop.security.UserGroupInformation ugi)
ugi
- the user to be determined if it is an adminCopyright © 2017 Apache Software Foundation. All Rights Reserved.