Ability to separately specify configs of same source/client #408
Closed
allen-liaoo
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
|
So, is the crux of the issue that you want to have config files in git but don't want to be committing files with secrets in them? I've been down the "multiple json objects merged with nested levels" road before and its a huge headache i don't want to have to relive. Would env interpolation within config files address this issue? Like: [
{
"name": "myLastFmClient",
"enable": true,
"configureAs": "client",
"data": {
"apiKey": "[[FM_KEY_1]]",
"secret": "[[FM_SECRET_1]]",
"redirectUri": "http://localhost:9078/lastfm/callback"
}
},
]I think this would be the easiest route. They would be interpolated from (arbitrary) environmental variables. I could also include env loading like docker secrets from a directory |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice to be able to separately specify configs of the same source/client in different config files/across config types, i.e. splitting the configs of a source or client into two files (which are later merged) or specify a specific config item in environment variables while keeping other configs of the same source or client in a json file.
This way, we can keep configs such as API keys, tokens, etc. secret while tracking other configs via a vcs, for example.
Currently, if you specify a source/client json object, the secret configs are usually required (i.e. data.apiKey is required in lastfm config). I think one can still achieve this for unnamed source/client via purely using environment variables, but not for all source/client i.e. last fm source (non-endpoint). Also, as far as I know, env vars also lack some more advanced configs.
One option is to merge configs of the same name and type (source or client) across configs files, and optionally allow files like lastfm-1.json, lastfm-2.json.
Another option is to add file path configs, i.e. data.apiKeyFile for lastfm's config.
Beta Was this translation helpful? Give feedback.
All reactions