Class ReadOnlySecretManager

java.lang.Object
dev.enola.common.secret.ReadOnlySecretManager
All Implemented Interfaces:
SecretManager
Direct Known Subclasses:
EnvironmentSecretManager, JavaPropertySecretManager, TestSecretManager

public abstract class ReadOnlySecretManager extends Object implements SecretManager
  • Constructor Details

  • Method Details

    • store

      public final void store(String key, char[] value) throws IOException
      Description copied from interface: SecretManager
      Stores a secret value associated with a unique key. The sensitive value is provided as a char array. Implementations will zero out the input value array immediately after calling this method for security. If a secret with the same key already exists, its value is overwritten.
      Specified by:
      store in interface SecretManager
      Parameters:
      key - The unique key (name) for the secret.
      value - The sensitive secret value as a character array.
      Throws:
      IOException - If an error occurs while storing the secret.
    • delete

      public final void delete(String key) throws IOException
      Description copied from interface: SecretManager
      Deletes a secret from the manager.
      Specified by:
      delete in interface SecretManager
      Parameters:
      key - The unique key (name) of the secret to delete.
      Throws:
      IOException - If an error occurs while deleting the secret.