Added the support for regional secret creation/updation, deletion and fetch for secret manager service.
Updated the autoconfigure/secretmanager to create the regional client and secretmanager module to support the regional secret operation.
Added the optional property location in GcpSecretManagerProperties.java which will take region from application.properties file. Whenever the location is available, it will use to perform the operation on regional secret. If not provided the global stack will be served.
Updated the documentation for this additional property in the docs/src/main/asciidoc/secretmanager.adoc
Added the sample application for regional secret operations.
Added/Updated the unit and integration tests.
Note: Fixed the integration test testUpdateSecrets in the file secretmanager/it/SecretManagerTemplateIntegrationTests.java
Performed the below mentioned manual unit tests to validate the working of the global and regional secret operations.
Create secret with only secretId and payload
Create secret with existing secretId and payload
Create secret with secretId, payload and valid projectID
Create secret with secretId, payload and invalid projectID (project on which user doesn't have access)
Read an existing secret with secretId
Read a non-existing secret with secretId
Read a secret with secretId and existing version
Read a secret with secretId and disabled version
Read a secret with secretId and destroyed version
Read a secret with secretId and non-existing version
Read a secret with secretId and valid project
Read a secret with secretId and invalid project (project on which user doesn't have access)
Read a secret with secretId and existing version and valid project
Read a secret with secretId and existing version and invalid project
Read a secret with secretId and non-existing version and valid project
Read a secret with secretId and non-existing version and invalid project
Update an existing secret with only secretId and payload
Update an existing secret with secretId, payload and valid projectID
Update an existing secret with secretId, payload and invalid projectID (project on which user doesn't have access)
Delete an existing secret with secretId
Delete a non-existing secret with secretId
Delete a secret with secretId and valid projectId
Delete a secret with secretId and invalid projectId
Enable an existing secret and valid version
Enable an existing secret without version
Enable an existing secret and invalid version
Enable a non-existing secret
Disable an existing secret and valid version
Disable an existing secret without version
Disable an existing secret and invalid version
Disable a non-existing secret
Check if secret exists for existing secret
Check if secret exists for non-existing secret
Check if secret exists for existing secret & valid projectId
Check if secret exists for existing secret & invalid projectId
Read secret with secretId and other project using service account
Issue: #3331
Description:
Added the support for regional secret creation/updation, deletion and fetch for secret manager service.
Note: Fixed the integration test
testUpdateSecrets
in the filesecretmanager/it/SecretManagerTemplateIntegrationTests.java
Performed the below mentioned manual unit tests to validate the working of the global and regional secret operations.
@Value
annotationMore information about regional secrets: https://cloud.google.com/secret-manager/regional-secrets/data-residency