java.lang.Runnable, KeyAuthorizationKeyProvider.KeyACLs@Private public class KMSACLs extends java.lang.Object implements java.lang.Runnable, KeyAuthorizationKeyProvider.KeyACLs
AccessControlLists used by KMS,
hot-reloading them if the kms-acls.xml file where the ACLs
are defined has been updated.| Modifier and Type | Class | Description |
|---|---|---|
static class |
KMSACLs.Type |
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
ACL_DEFAULT |
|
static java.util.EnumSet<KMSACLs.Type> |
INVALIDATE_CACHE_TYPES |
|
static int |
RELOADER_SLEEP_MILLIS |
| Constructor | Description |
|---|---|
KMSACLs() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
assertAccess(java.util.EnumSet<KMSACLs.Type> aclTypes,
org.apache.hadoop.security.UserGroupInformation ugi,
KMS.KMSOp operation,
java.lang.String key) |
|
void |
assertAccess(KMSACLs.Type aclType,
org.apache.hadoop.security.UserGroupInformation ugi,
KMS.KMSOp operation,
java.lang.String key) |
|
boolean |
hasAccess(KMSACLs.Type type,
org.apache.hadoop.security.UserGroupInformation ugi) |
First Check if user is in ACL for the KMS operation, if yes, then
return true if user is not present in any configured blacklist for
the operation
|
boolean |
hasAccessToKey(java.lang.String keyName,
org.apache.hadoop.security.UserGroupInformation ugi,
KeyAuthorizationKeyProvider.KeyOpType opType) |
This is called by the KeyProvider to check if the given user is
authorized to perform the specified operation on the given acl name.
|
boolean |
isACLPresent(java.lang.String keyName,
KeyAuthorizationKeyProvider.KeyOpType opType) |
|
void |
run() |
|
void |
startReloader() |
|
void |
stopReloader() |
public static final java.lang.String ACL_DEFAULT
public static final int RELOADER_SLEEP_MILLIS
public static final java.util.EnumSet<KMSACLs.Type> INVALIDATE_CACHE_TYPES
public void run()
run in interface java.lang.Runnablepublic void startReloader()
public void stopReloader()
public boolean hasAccess(KMSACLs.Type type, org.apache.hadoop.security.UserGroupInformation ugi)
type - KMS Operationugi - UserGroupInformation of userpublic void assertAccess(KMSACLs.Type aclType, org.apache.hadoop.security.UserGroupInformation ugi, KMS.KMSOp operation, java.lang.String key) throws org.apache.hadoop.security.AccessControlException
org.apache.hadoop.security.AccessControlExceptionpublic void assertAccess(java.util.EnumSet<KMSACLs.Type> aclTypes, org.apache.hadoop.security.UserGroupInformation ugi, KMS.KMSOp operation, java.lang.String key) throws org.apache.hadoop.security.AccessControlException
org.apache.hadoop.security.AccessControlExceptionpublic boolean hasAccessToKey(java.lang.String keyName,
org.apache.hadoop.security.UserGroupInformation ugi,
KeyAuthorizationKeyProvider.KeyOpType opType)
KeyAuthorizationKeyProvider.KeyACLshasAccessToKey in interface KeyAuthorizationKeyProvider.KeyACLskeyName - name of the key ACLugi - User's UserGroupInformationopType - Operation Typepublic boolean isACLPresent(java.lang.String keyName,
KeyAuthorizationKeyProvider.KeyOpType opType)
isACLPresent in interface KeyAuthorizationKeyProvider.KeyACLskeyName - ACL nameopType - Operation TypeCopyright © 2008–2025 Apache Software Foundation. All rights reserved.