Class SecurityUtil

java.lang.Object
org.apache.hadoop.hbase.security.SecurityUtil

@Private @Evolving public final class SecurityUtil extends Object
Security related generic utility methods.
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
  • Constructor Details

  • Method Details

    • getUserFromPrincipal

      public static String getUserFromPrincipal(String principal)
      Get the user name from a principal
    • getPrincipalWithoutRealm

      public static String getPrincipalWithoutRealm(String principal)
      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 unwrapped
      IllegalStateException - 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

      public static boolean isKeyManagementEnabled(org.apache.hadoop.conf.Configuration conf)
      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