Class AwsSecretsBiz
java.lang.Object
net.solarnetwork.central.cloud.aws.biz.AwsSecretsBiz
- All Implemented Interfaces:
SecretsBiz
Implementation of
SecretsBiz using AWS Secrets Manager.-
Field Summary
Fields inherited from interface net.solarnetwork.central.biz.SecretsBiz
SECRETS -
Constructor Summary
ConstructorsConstructorDescriptionAwsSecretsBiz(String region, String accessKey, String accessKeySecret) Constructor.AwsSecretsBiz(software.amazon.awssdk.regions.Region region, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteSecret(String secretName) Delete a secret.Get a secret value.voidPut a secret value.voidsetSecretCache(javax.cache.Cache<String, String> secretCache) Configure a cache to use for secrets.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.central.biz.SecretsBiz
getSecretMap, putSecret
-
Constructor Details
-
AwsSecretsBiz
Constructor.- Parameters:
region- the AWS region nameaccessKey- the access keyaccessKeySecret- the access key secret
-
AwsSecretsBiz
public AwsSecretsBiz(software.amazon.awssdk.regions.Region region, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider) Constructor.- Parameters:
region- the AWS regioncredentialsProvider- the credentials provider
-
-
Method Details
-
putSecret
Description copied from interface:SecretsBizPut a secret value.This will replace any existing value of a secret with the same name.
- Specified by:
putSecretin interfaceSecretsBiz- Parameters:
secretName- the unique name of the secret to putsecretValue- the value to store
-
getSecret
Description copied from interface:SecretsBizGet a secret value.- Specified by:
getSecretin interfaceSecretsBiz- Parameters:
secretName- the unique name of the secret to get- Returns:
- the secret value, or null if one does not exist
-
deleteSecret
Description copied from interface:SecretsBizDelete a secret.- Specified by:
deleteSecretin interfaceSecretsBiz- Parameters:
secretName- the name of the secret to delete
-
setSecretCache
Configure a cache to use for secrets.- Parameters:
secretCache- the cache
-