Closed cseickel closed 1 year ago
Hi @cseickel, thanks for the suggestions. All are valid points in my opinion.
To add on top of 3.:
${{}}
) and just inject env vars once connecting to the db. That would probably be enough for now.That's an approximate TODO for this issue, I would love to hear your thoughts about it.
Other than that I'll start working on that as soon as I have some extra time.
I think we go with the first syntax option you mentioned (${{}}) and just inject env vars once connecting to the db. That would probably be enough for now.
I agree that seems like the simplest way to go about it, and users can do a lot to roll their own solutions that inject env variables. One thing that may trip you up there is if you are checking the variables from an external (go) process, will it see the same env variables that are in nvim's process? If not then it might not work out.
For # 3, on further thought it would probably be a maintenance nightmare. It might be simpler to just integrate your own secret storage with an encrypted file. I'm sure there are go libraries you can use, and the input could just be an interactive prompt if the password was not set in the config.
One thing that may trip you up there is if you are checking the variables from an external (go) process, will it see the same env variables that are in nvim's process? If not then it might not work out.
I thought about that, yeah - one can also have a plugin that messes with vim.env
jn lua - so we would need to read env in lua in my opinion - I'd still like to test go first - it might even work.
I also thought about an encrypted file - sounds like a good Idea to me!
Hey, @cseickel I implemented some functionality we discussed here in this PR: #9.
I would appreciate if you look at it / try it out / give any kind of feedback whatsoever.
Thanks :D
closed with #9
This is kind of 3 parter:
It would be ideal if it could pull a password from pass on linux, and/or read them from environment variables. I use doppler a lot at work, so it would be convenient for me to just configure connections using environment variable substitution and then I can run nvim with doppler to get those variables. for example:
or maybe if you just have your own internal way of specifying placeholders for secrets, you can then add a separate section for secrets, like: