-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature]: Support config via ENV to better protect secrets #8295
Comments
I'd like to work on this issue. I will keep you updated on my progress :) |
@chevdor Interested in finding out more information on how you set env variables for rpcuser and rpcpassword in the bitcoin.conf fle. I can't find anything related to this in the docs. |
@ronballesteros I spotted this in some sample config. If you consider |
Thanks @chevdor. Interesting. I can't seem to get it to work in my lab. I have this set in my bitcoin.conf:
When I curl from another pod, I get that failed password attempt:
Am I missing something? |
I am using k8s as well. I have a configmap for the config and a secret for.. well the secrets :) There are a few other options that come to play with RPC and this issue is likely not the place to troubleshoot bitcoin.conf issues but here are a few hints, you can refer to the doc for more details about those:
|
If you're using k8s, you might want to check out this tool: https://github.com/lightninglabs/lndinit We use it in our infra to handle provision+init of all our lnd nodes via config maps and secrets: https://github.com/lightninglabs/lndinit?tab=readme-ov-file#example-use-case-2-kubernetes |
Interesting, thanks for the link @Roasbeef |
Is your feature request related to a problem? Please describe.
bitcoind
allows definining its config using ENV.For instance:
That allows not having the BTC_RPCUSER and BTC_RPCPASSWORD in clear text in the config.
At runtime,
bitcoind
is resolving those env.lnd does not do this, forcing to pass the secrets in clear text in the config file.
Describe the solution you'd like
Just like
bitcoind
, it would be great if lnd could resolve variables, at least for secrets.Describe alternatives you've considered
An alternative would be to add
envsubst
to the Docker image but this is rather clunky...The text was updated successfully, but these errors were encountered: