-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add gcp secret manager provider Signed-off-by: Bence Csati <[email protected]> * docs: add gcp, update other docs Signed-off-by: Bence Csati <[email protected]> * chore: update nix Signed-off-by: Bence Csati <[email protected]> * fix(gcp): Remarks Signed-off-by: Bence Csati <[email protected]> * fix(test): get env path for args test Signed-off-by: Bence Csati <[email protected]> * fix(README): Add AWS SSM to supported providers Signed-off-by: Bence Csati <[email protected]> --------- Signed-off-by: Bence Csati <[email protected]>
- Loading branch information
Showing
18 changed files
with
585 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Google Cloud Provider | ||
|
||
## Overview | ||
|
||
The Google Cloud Provider in Secret-Init can load secrets from Google Cloud Secret Manager. This provider interfaces with Google Cloud Secret Manager's API, to fetch and load secrets. | ||
|
||
## Prerequisites | ||
|
||
- Golang `>= 1.21` | ||
- Makefile | ||
- Access to GCP services | ||
|
||
## Environment setup | ||
|
||
```bash | ||
# Secret-init requires atleast this environment variable to be set properly | ||
export GOOGLE_APPLICATION_CREDENTIALS | ||
``` | ||
|
||
## Define secrets to inject | ||
|
||
```bash | ||
# Export environment variables | ||
export MYSQL_PASSWORD=gcp:secretmanager:projects/123456789123/secrets/bank-vaults_secret-init_test_mysql_password/versions/2 | ||
export UNVERSIONED_SECRET=gcp:secretmanager:projects/123456789123/secrets/bank-vaults_secret-init_test | ||
# NOTE: If version is not supplied then latest will be used. | ||
|
||
# NOTE: Secret-init is designed to identify any secret-reference that starts with "gcp:secretmanager" | ||
``` | ||
|
||
## Run secret-init | ||
|
||
```bash | ||
# Build the secret-init binary | ||
make build | ||
|
||
# Run secret-init with a command e.g. | ||
./secret-init env | grep 'MYSQL_PASSWORD\|UNVERSIONED_SECRET' | ||
``` | ||
|
||
## Cleanup | ||
|
||
```bash | ||
# Remove binary | ||
rm -rf secret-init | ||
|
||
# Unset the environment variables | ||
unset MYSQL_PASSWORD | ||
unset UNVERSIONED_SECRET | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.