Package org.apache.hadoop.hbase.keymeta
Class KeymetaAdminImpl
java.lang.Object
org.apache.hadoop.hbase.keymeta.KeymetaAdminImpl
- All Implemented Interfaces:
KeymetaAdmin
STUB IMPLEMENTATION - Feature not yet complete. This class will be fully implemented in
HBASE-29368 feature PR.
-
Constructor Summary
ConstructorsConstructorDescriptionKeymetaAdminImpl(Object server) KeymetaAdminImpl(org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionvoidClear all entries in the managed key data cache on all live region servers.disableKeyManagement(byte[] keyCust, String keyNamespace) Disables key management for the specified custodian and namespace.disableManagedKey(byte[] keyCust, String keyNamespace, byte[] keyMetadataHash) Disables the specific managed key identified by the specified custodian, namespace, and metadata hash.voidejectManagedKeyDataCacheEntry(byte[] keyCustodian, String keyNamespace, String keyMetadata) Eject a specific managed key entry from the managed key data cache on all live region servers.enableKeyManagement(byte[] keyCust, String keyNamespace) Enables key management for the specified custodian and namespace.getManagedKeys(byte[] keyCust, String keyNamespace) Get the status of all the keys for the specified custodian.voidrefreshManagedKeys(byte[] keyCust, String keyNamespace) Refresh all the keymeta entries for the specified custodian and namespace.rotateManagedKey(byte[] keyCust, String keyNamespace) Attempt a key rotation for the active key of the specified custodian and namespace.booleanTriggers rotation of the System Key (STK) by checking for a new key and propagating it to all region servers.
-
Constructor Details
-
KeymetaAdminImpl
-
KeymetaAdminImpl
-
-
Method Details
-
enableKeyManagement
public ManagedKeyData enableKeyManagement(byte[] keyCust, String keyNamespace) throws IOException, KeyException Description copied from interface:KeymetaAdminEnables key management for the specified custodian and namespace.- Specified by:
enableKeyManagementin interfaceKeymetaAdmin- Parameters:
keyCust- The key custodian identifier.keyNamespace- The namespace for the key management.- Returns:
- The list of
ManagedKeyDataobjects each identifying the key and its current status. - Throws:
IOException- if an error occurs while enabling key management.KeyException
-
getManagedKeys
public List<ManagedKeyData> getManagedKeys(byte[] keyCust, String keyNamespace) throws IOException, KeyException Description copied from interface:KeymetaAdminGet the status of all the keys for the specified custodian.- Specified by:
getManagedKeysin interfaceKeymetaAdmin- Parameters:
keyCust- The key custodian identifier.keyNamespace- The namespace for the key management.- Returns:
- The list of
ManagedKeyDataobjects each identifying the key and its current status. - Throws:
IOException- if an error occurs while enabling key management.KeyException
-
rotateSTK
Description copied from interface:KeymetaAdminTriggers rotation of the System Key (STK) by checking for a new key and propagating it to all region servers.- Specified by:
rotateSTKin interfaceKeymetaAdmin- Returns:
- true if a new STK was found and rotated, false if no change was detected
- Throws:
IOException- if an error occurs while rotating the STK
-
ejectManagedKeyDataCacheEntry
public void ejectManagedKeyDataCacheEntry(byte[] keyCustodian, String keyNamespace, String keyMetadata) throws IOException Description copied from interface:KeymetaAdminEject a specific managed key entry from the managed key data cache on all live region servers.- Specified by:
ejectManagedKeyDataCacheEntryin interfaceKeymetaAdmin- Parameters:
keyCustodian- the key custodiankeyNamespace- the key namespacekeyMetadata- the key metadata- Throws:
IOException- if an error occurs while ejecting the key
-
clearManagedKeyDataCache
Description copied from interface:KeymetaAdminClear all entries in the managed key data cache on all live region servers.- Specified by:
clearManagedKeyDataCachein interfaceKeymetaAdmin- Throws:
IOException- if an error occurs while clearing the cache
-
disableKeyManagement
public ManagedKeyData disableKeyManagement(byte[] keyCust, String keyNamespace) throws IOException, KeyException Description copied from interface:KeymetaAdminDisables key management for the specified custodian and namespace. This marks any ACTIVE keys as INACTIVE and adds a DISABLED state marker such that no new ACTIVE key is retrieved, so the new data written will not be encrypted.- Specified by:
disableKeyManagementin interfaceKeymetaAdmin- Parameters:
keyCust- The key custodian identifier.keyNamespace- The namespace for the key management.- Returns:
- The
ManagedKeyDataobject identifying the previously active key and its current state. - Throws:
IOException- if an error occurs while disabling key management.KeyException- if an error occurs while disabling key management.
-
disableManagedKey
public ManagedKeyData disableManagedKey(byte[] keyCust, String keyNamespace, byte[] keyMetadataHash) throws IOException, KeyException Description copied from interface:KeymetaAdminDisables the specific managed key identified by the specified custodian, namespace, and metadata hash.- Specified by:
disableManagedKeyin interfaceKeymetaAdmin- Parameters:
keyCust- The key custodian identifier.keyNamespace- The namespace for the key management.keyMetadataHash- The key metadata hash.- Returns:
- A
ManagedKeyDataobject identifying the key and its current status. - Throws:
IOException- if an error occurs while disabling the managed key.KeyException- if an error occurs while disabling the managed key.
-
rotateManagedKey
public ManagedKeyData rotateManagedKey(byte[] keyCust, String keyNamespace) throws IOException, KeyException Description copied from interface:KeymetaAdminAttempt a key rotation for the active key of the specified custodian and namespace.- Specified by:
rotateManagedKeyin interfaceKeymetaAdmin- Parameters:
keyCust- The key custodian identifier.keyNamespace- The namespace for the key management.- Returns:
- A
ManagedKeyDataobject identifying the key and its current status. - Throws:
IOException- if an error occurs while rotating the managed key.KeyException- if an error occurs while rotating the managed key.
-
refreshManagedKeys
public void refreshManagedKeys(byte[] keyCust, String keyNamespace) throws IOException, KeyException Description copied from interface:KeymetaAdminRefresh all the keymeta entries for the specified custodian and namespace.- Specified by:
refreshManagedKeysin interfaceKeymetaAdmin- Parameters:
keyCust- The key custodian identifier.keyNamespace- The namespace for the key management.- Throws:
IOException- if an error occurs while refreshing managed keys.KeyException- if an error occurs while refreshing managed keys.
-