Skip to content

Allow the config decryption key to be retrieved by a user-provided function #104

@seanpk

Description

@seanpk

Currently the config service supports 3 ways to provide a decryption key:

  1. in the config itself at security.key (don't abuse this by checking that into your source control! - have a deployment script write a file config/security.json with the key in it)
  2. in the environment variable decryptionKey
  3. interactively on the command line

Writing a file to disk, or setting an environment variable with the decryption key, leaves that key available to several exploits to use.

Let's add support for retrieving the key from a callback function the developer can write to get the key from whatever secure storage they choose to implement.

Also, then, since in clustered mode the decryption key is passed to each worker as an environment variable, we should look at alternatives, for all cases, to that method.
Further, since the decryption key is exported from the config service (and kept in memory), we should look for an alternative to that too. (NOTE: even though this will change the exports of the config service, it is not a documented export and should not be considered a breaking change.)

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