Package org.apache.hadoop.hbase.security
Class SecurityUtil
java.lang.Object
org.apache.hadoop.hbase.security.SecurityUtil
Security related generic utility methods.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Encryption.ContextcreateEncryptionContext(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path, FixedFileTrailer trailer, ManagedKeyDataCache managedKeyDataCache, SystemKeyCache systemKeyCache) Create an encryption context from encryption key found in a file trailer, suitable for read.static Encryption.ContextcreateEncryptionContext(org.apache.hadoop.conf.Configuration conf, TableDescriptor tableDescriptor, ColumnFamilyDescriptor family, ManagedKeyDataCache managedKeyDataCache, SystemKeyCache systemKeyCache) Helper to create an encryption context with current encryption key, suitable for writes.static StringgetPrincipalWithoutRealm(String principal) Get the user name from a principalstatic StringgetUserFromPrincipal(String principal) Get the user name from a principalstatic booleanisKeyManagementEnabled(org.apache.hadoop.conf.Configuration conf) Check if key management is enabled in configuration.
-
Field Details
-
LOG
-
-
Constructor Details
-
SecurityUtil
private SecurityUtil()
-
-
Method Details
-
getUserFromPrincipal
Get the user name from a principal -
getPrincipalWithoutRealm
Get the user name from a principal -
createEncryptionContext
public static Encryption.Context createEncryptionContext(org.apache.hadoop.conf.Configuration conf, TableDescriptor tableDescriptor, ColumnFamilyDescriptor family, ManagedKeyDataCache managedKeyDataCache, SystemKeyCache systemKeyCache) throws IOException Helper to create an encryption context with current encryption key, suitable for writes. STUB IMPLEMENTATION - Key management not yet implemented. Cache parameters are placeholders for future implementation.- Parameters:
conf- The current configuration.tableDescriptor- The table descriptor.family- The current column descriptor.managedKeyDataCache- The managed key data cache (unused in stub).systemKeyCache- The system key cache (unused in stub).- Returns:
- The created encryption context.
- Throws:
IOException- if an encryption key for the column cannot be unwrappedIllegalStateException- in case of encryption related configuration errors
-
createEncryptionContext
public static Encryption.Context createEncryptionContext(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path, FixedFileTrailer trailer, ManagedKeyDataCache managedKeyDataCache, SystemKeyCache systemKeyCache) throws IOException Create an encryption context from encryption key found in a file trailer, suitable for read. STUB IMPLEMENTATION - Key management not yet implemented. Cache parameters are placeholders for future implementation.- Parameters:
conf- The current configuration.path- The path of the file.trailer- The file trailer.managedKeyDataCache- The managed key data cache (unused in stub).systemKeyCache- The system key cache (unused in stub).- Returns:
- The created encryption context or null if no key material is available.
- Throws:
IOException- if an encryption key for the file cannot be unwrapped
-
isKeyManagementEnabled
Check if key management is enabled in configuration. STUB - Always returns false in precursor.- Parameters:
conf- the configuration to check- Returns:
- false in stub implementation
-