-
Notifications
You must be signed in to change notification settings - Fork 0
Secrets Management
Vlad Volkov edited this page Sep 30, 2021
·
24 revisions
For authentication, generate Github Token as discussed
/secrets/projects/:project
| Project | Description |
|---|---|
| Project | Name of current project - used as only one root for all dependent configurations and credentials |
:provider/:service/:environment
| Parameter | Description |
|---|---|
| Provider | Represents third party which provides configuration |
| Service | Optionally, application name in case of multiple |
| Environment | Optionally, environment name (could be one of: development
|
kebab-case
Consistent naming desired, as well as environment naming convention. Also, credentials are grouped by application, avoiding extra prefixing
APP_GOOGLE_CLIENT_SECRET environment variable
projects/app/google/client-secret secret path
To populate, perform next steps:
- Add @bn-digital/vault in
package.jsondevDependencies - Create
.env.distif your package require dynamic configuration - Populate
.env.distwith required keys and complete paths to your secret as value see sample - Create
.envwith following content (it will not be replaced after pulling values from Vault):
VAULT_ENDPOINT=https://%vault-url%
GITHUB_TOKEN=%github-token%- Prepend that command in
startscript for your convenience:
{
"scripts": {
"start": "vault-env && webpack serve --mode=development"
}
}