@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class YarnAuthorizationProvider extends Object
Constructor and Description |
---|
YarnAuthorizationProvider() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
checkPermission(AccessRequest accessRequest)
Check if user has the permission to access the target object.
|
static void |
destroy()
Destroy the
YarnAuthorizationProvider instance. |
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(List<Permission> permissions,
org.apache.hadoop.security.UserGroupInformation ugi)
Set permissions for the target object.
|
public static YarnAuthorizationProvider getInstance(org.apache.hadoop.conf.Configuration conf)
@VisibleForTesting public static void destroy()
YarnAuthorizationProvider
instance.
This method is called only in Tests.public abstract void init(org.apache.hadoop.conf.Configuration conf)
conf
- configuration.public abstract boolean checkPermission(AccessRequest accessRequest)
accessRequest
- the request object which contains all the access context info.public abstract void setPermission(List<Permission> permissions, org.apache.hadoop.security.UserGroupInformation ugi)
permissions
- A list of permissions on the target object.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 © 2008–2024 Apache Software Foundation. All rights reserved.