Interface SecretProvider
- All Known Subinterfaces:
ManagedSecretProvider
public interface SecretProvider
A
SecretProvider
exposed methods for listing, reading, and writing secrets managed by the provider.
Every provider must support reading secrets. Listing secrets may not be supported by every provider.-
Method Summary
-
Method Details
-
list
List all secrets in this provider.- Returns:
- a list containing the names of every secret in this provider (never null)
- Throws:
SecretProviderException
- if there was a problem listing the secrets in this providerUnsupportedOperationException
- if this provider does not support listing secrets
-
read
Read a secret from this provider.- Parameters:
name
- the name of the secret to read. must not be null.- Returns:
- a
Plaintext
instance encapsulating the contents of the secret (never null) - Throws:
NullPointerException
- if the given name argument is nullSecretNotFoundException
- if no secret exists with the given nameSecretProviderException
- if there was a problem reading the secret
-