Closed sh1mmer closed 9 years ago
The loading of secrets.json is restricted to only apply to production environments. Secrets inheritance has been removed to encourage services to keep secrets for different environments fully separate.
According to the code, zero-config
still loads secrets-NODE_ENV
files, but now it's out of config/secrets
directory?
All the secrets files are now in config/secrets
not just the secrets/secrets.json
file.
It does still load secrets-<NODE_ENV>.json
files but only when the NODE_ENV is not production.
If they're in config/secrets
, why not simply use NODE_ENV.json
as the filenames?
@mlmorg standard approach.
Well zero-config already uses config/env.json
(not config-env.json
) why not just do config/secrets/env.json
?
Well ok then. :+1:
lgtm except minor comment. please bump major when cutting version
lgtm. #shipit
I'm going to land this and cut a new version.
This PR makes 3 changes. It is considered a breaking change to the library.
config/secrets
folder. This encourages the best practice of isolating secrets in a single place that can be easily removed at build time for projects that may still have secrets in source control.secrets.json
is restricted to only apply to production environments. Secrets inheritance has been removed to encourage services to keep secrets for different environments fully separate.NODE_ENV
environment variable is normalized to ensure thatPRODUCTION
andproduction
both work as intended.cc @Raynos @lxe @mlmorg @aegarbutt