Class GoogleCloudSecretManagerService
- java.lang.Object
- 
- com.broadleafcommerce.securevault.service.provider.GoogleCloudSecretManagerService
 
- 
- All Implemented Interfaces:
- SecureVaultService
 
 public class GoogleCloudSecretManagerService extends Object implements SecureVaultService Implementation of theSecureVaultServicefor 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 SummaryConstructors Constructor Description GoogleCloudSecretManagerService(String projectId)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringconvertNameToKey(String propertyName)Because periods ('.') are not allowed in a secret's id, we need to replace them with underscores.protected StringgetProjectId()StringgetSecretForKey(String key)protected StringgetSecretFromClientForKey(com.google.cloud.secretmanager.v1.SecretManagerServiceClient client, String key)Map<String,Object>getSecretsForKeys(List<String> keys)
 
- 
- 
- 
Constructor Detail- 
GoogleCloudSecretManagerServicepublic GoogleCloudSecretManagerService(String projectId) 
 
- 
 - 
Method Detail- 
getSecretsForKeyspublic Map<String,Object> getSecretsForKeys(List<String> keys) throws IOException - Specified by:
- getSecretsForKeysin interface- SecureVaultService
- Throws:
- IOException
 
 - 
getSecretForKeypublic String getSecretForKey(String key) throws IOException - Specified by:
- getSecretForKeyin interface- SecureVaultService
- Throws:
- IOException
 
 - 
getSecretFromClientForKeyprotected String getSecretFromClientForKey(com.google.cloud.secretmanager.v1.SecretManagerServiceClient client, String key) 
 - 
convertNameToKeyprotected String convertNameToKey(String propertyName) Because periods ('.') are not allowed in a secret's id, we need to replace them with underscores.
 - 
getProjectIdprotected String getProjectId() 
 
- 
 
-