Skip to content

Make API Keys & Access Keys out of serverConfig or ProxyAuthConfig configurable via Env Vars #148

@t83714

Description

@t83714

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:

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 and ProxyAuthConfig
  • Make all API keys & Access Keys configurable via environment variables

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions