Package dev.enola.common.secret.exec
Class ExecPassSecretManager
java.lang.Object
dev.enola.common.secret.exec.ExecPassSecretManager
- All Implemented Interfaces:
SecretManager
ExecPassSecretManager is an implementation of
SecretManager which "shells out" (exec) to
[something like] pass (for every
secret).
We recommend using this with GPG on a YubiKey that requires "touch" to decrypt secrets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes a secret from the manager.getOptional(String key) Retrieves a secret by its key, with optionality.static voidvoidStores a secret value associated with a unique key.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.enola.common.secret.SecretManager
get
-
Constructor Details
-
ExecPassSecretManager
-
ExecPassSecretManager
public ExecPassSecretManager()
-
-
Method Details
-
getOptional
Description copied from interface:SecretManagerRetrieves a secret by its key, with optionality.- Specified by:
getOptionalin interfaceSecretManager- Parameters:
key- The unique key (name) of the secret to retrieve.- Returns:
- An
Optionalcontaining theSecret, if found.
-
store
Description copied from interface:SecretManagerStores a secret value associated with a unique key. The sensitive value is provided as a char array. Implementations will zero out the inputvaluearray immediately after calling this method for security. If a secret with the same key already exists, its value is overwritten.- Specified by:
storein interfaceSecretManager- Parameters:
key- The unique key (name) for the secret.value- The sensitive secret value as a character array.
-
delete
Description copied from interface:SecretManagerDeletes a secret from the manager.- Specified by:
deletein interfaceSecretManager- Parameters:
key- The unique key (name) of the secret to delete.
-
main
-