-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Make API Keys & Access Keys out of serverConfig or ProxyAuthConfig configurable via Env Vars
It's a good practice that separate API Keys & Access Keys config from other non-credential configs and make them configurable via environment variables.
This also allows those credential configs to be stored in specialised storage designed for credentials.
e.g. on k8s cluster, it's a good practice to store credentials in k8s secrets.
this can be done with the yargs
(or the dotenv-expand
solution @zoran995 suggested) we used at this moment:
terriajs-server/lib/options.js
Line 54 in d96739c
var yargs = require('yargs') |
e.g.
.option("sessionSecret", {
describe:
"The secret to use to sign session cookies. This can also be specified with the SESSION_SECRET environment variable.",
type: "string",
default:
process.env.SESSION_SECRET ||
process.env.npm_package_config_SESSION_SECRET,
demand: true
})
Acceptance Criteria
- Move out any API keys & Access Keys from
ServerConfig
andProxyAuthConfig
- Make all API keys & Access Keys configurable via environment variables
Metadata
Metadata
Assignees
Labels
No labels