-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Currently the config service supports 3 ways to provide a decryption key:
- in the config itself at
security.key(don't abuse this by checking that into your source control! - have a deployment script write a fileconfig/security.jsonwith the key in it) - in the environment variable
decryptionKey - 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.)