-
Notifications
You must be signed in to change notification settings - Fork 10
./config/secrets loading interface and order needs to match the ./config loading interface and order #19
Comments
My understanding was that unlike other environment which can have inheritance we actively want to discourage developers from sharing secrets between environments. Hence that approach. |
I think a consistent interface is worth more than guiding the user towards certain behavior. |
I understand your position. I think consistency of interface is important but sharing or leaking secrets between environments is something we actively consider an anti-pattern. The interface for specify things per |
The original common.json was a mistake. Even if we added one you would still need to ask Langley for this feature. At this point we should favor having no more moves. The semantics are already complicated enough. Just let it be. |
@rajeshsegu think very, very carefully about what you just said. Your saying you want to deploy the same secrets, the same passwords to a development machine; a public machine on the Internet AND to a production machine; a private machine in the data center. This means your putting our production secrets on the public internet. Congratulations. |
@Raynos this is a configuration loader. There's nothing in the code that secures or ensures security of your secrets. The way the secrets are offloaded and secured and then consumed by various machines has nothing to do at all with zero-config. |
@Raynos Think about things like twitter { consumer_key, consumer_secret, .. }, s3 { accessKeyId, secretAccessKey }, googleMapsApiKey{} which is not going to be different for either development or production. Is the right design to generate multiple keys for development & production ? ( not sure how flexible it is ) If your argument is right, these details would live inside config/common.json or just be redundant in multiple secrets. |
I think we need to change the current interface of loading secrets in the context of environments.
We used to load
config/secrets/secrets.json
regardless of NODE_ENV, but after #17,secrets/secrets.json
gets loaded iff NODE_ENV === 'production'The interface to load the 'normal, non-secret config' is pretty nice:
config/common.json
foo
, loadconfig/foo.json
Adding secrets, now we have this:
config/common.json
foo
, loadconfig/foo.json
foo
, loadconfig/secrets/secrets-foo.json
...production
, in that caseconfig/secrets/secrets.json
There's no reason to complicate the secrets interface. Why not do this???:
config/common.json
foo
, loadconfig/foo.json
config/secrets/common.json
foo
, loadconfig/secrets/foo.json
cc @sh1mmer @Raynos @mlmorg
The text was updated successfully, but these errors were encountered: