Closed pataquets closed 3 years ago
@pataquets I'm not sure this is a great idea, because otherwise gradually users will want more and more configuration options exposed as environment variables. Maybe we can find a more general method here that's more compatible with existing use?
Note also that there is the cfg_sn_password_eval
config option which runs a command to get the password, so the password doesn't need to be stored in the config file.
Personally providing a way to eval the username too would be useful. I'm not sure how I feel about needing to have my username in my dotfiles.
I see your point, @swalladge. However, I think that enabling the env var option just for these it's an acceptable exception, since both options are sensitive values, although some might consider usernames not to be, I lean more in considering username also sensitive info. If you find this applies to cfg_sn_password_eval
option, I'll be glad to add it, btw.
Anyway, there are not that many options that would prevent anyone else adding their own, if needed. I must admit I don't fully understand your concern here, since I fail to see how a 'more general method' would be, due to my limited Python experience.
Also, this PR is more targeted to enable a self-contained, Docker image build and run method (to follow up next as a PR), which would enable another running method, with 'just Docker required' (no Python/Pip/whatever required). I was aware of cfg_sn_password_eval
, but it made this use-case more complex, thou.
@pataquets thanks for your contribution!
Don't mention it, @swalladge. Happy to be able to give back and thank you for sharing such an useful software.
Useful both for Docker usage and for existing enviornment variable secrets workflows.
Works the same as
EDITOR
, overriding anything if present.