Package net.solarnetwork.central.biz
Interface SecretsBiz
- All Known Implementing Classes:
AwsSecretsBiz,SimpleSecretsBiz
public interface SecretsBiz
API for secret management.
The intention of this API is that implementations store the secret values in a secure, encrypted manner.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteSecret(String secretName) Delete a secret.Get a secret value.getSecretMap(String secretName) Get a secret value that is a JSON object string.voidPut a secret value.default voidPut a Map as a JSON object string secret value.
-
Field Details
-
SECRETS
A qualifier for secrets components.- See Also:
-
-
Method Details
-
getSecret
Get a secret value.- Parameters:
secretName- the unique name of the secret to get- Returns:
- the secret value, or null if one does not exist
-
putSecret
Put a secret value.This will replace any existing value of a secret with the same name.
- Parameters:
secretName- the unique name of the secret to putsecretValue- the value to store
-
deleteSecret
Delete a secret.- Parameters:
secretName- the name of the secret to delete
-
getSecretMap
Get a secret value that is a JSON object string.This method will interpret the associated secret value as a JSON object string, and return that as a Map. If the secret value exists but cannot be decoded as a JSON object, null will be returned.
- Parameters:
secretName- the unique name of the secret to put- Returns:
- the secret value, decoded from a JSON object
-
putSecret
Put a Map as a JSON object string secret value.- Parameters:
secretName- the unique name of the secret to putsecretValue- the Map to encode as a JSON object value
-