Class GoogleCloudSecretManagerService
java.lang.Object
com.broadleafcommerce.securevault.service.provider.GoogleCloudSecretManagerService
- All Implemented Interfaces:
SecureVaultService
Implementation of the
SecureVaultService
for the Google Cloud Secret Manager.
In order to connect to the Secret Manager, make sure you have an account on GCP with at least the
`roles/secretmanager.secretAccessor` role. You will need to be locally authenticated by running:
gcloud auth application-default loginFollow the prompts to authenticate with you're authorized GCP account. Additional information can be found in GCP's documentation: https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
convertNameToKey
(String propertyName) Because periods ('.') are not allowed in a secret's id, we need to replace them with underscores.protected String
getSecretForKey
(String key) protected String
getSecretFromClientForKey
(com.google.cloud.secretmanager.v1.SecretManagerServiceClient client, String key) getSecretsForKeys
(List<String> keys)
-
Constructor Details
-
GoogleCloudSecretManagerService
-
-
Method Details
-
getSecretsForKeys
- Specified by:
getSecretsForKeys
in interfaceSecureVaultService
- Throws:
IOException
-
getSecretForKey
- Specified by:
getSecretForKey
in interfaceSecureVaultService
- Throws:
IOException
-
getSecretFromClientForKey
-
convertNameToKey
Because periods ('.') are not allowed in a secret's id, we need to replace them with underscores. -
getProjectId
-