-
Notifications
You must be signed in to change notification settings - Fork 0
Secrets Management
Vlad Volkov edited this page Aug 28, 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.json
devDependencies
- Create
.env.dist
if your package require dynamic configuration - Populate
.env.dist
with required keys and complete paths to your secret as value see sample - Create
.env
with following content (it will not be replaced after pulling values from Vault):
VAULT_ENDPOINT=vault-public-endpoint-to-fetch-configurations-from
GITHUB_TOKEN=your-github-token-for-authenticating-vault
- Prepend that command in
start
script for your convenience:
{
"scripts": {
"start": "vault-env && webpack serve --mode=development"
}
}