vim-dadbod-ui icon indicating copy to clipboard operation
vim-dadbod-ui copied to clipboard

support using var calls in connect strings to hide passwords.

Open walkabout21 opened this issue 1 year ago • 4 comments

An oracle connect string format is user/password@host . With dadbod you can set a connection to be something like user/$password/host so the password can be kept in a password manager loaded into a var to be consumed at runtime for login. Currently setting up a connect string in dadbod ui for oracle does not appear to support adding a /password to the connect string instead of manually adding a password at connect time.

walkabout21 avatar Jul 03 '23 20:07 walkabout21

hey, I experienced some similar Issue, you can actually use some password manager for that case, I'm using pass and I have defined the connections as something like this:

let g:myconn = trim(system('pass myconn | head -n1'))
let g:dbs = [
\ { 'name': 'myconn'    , 'url': myconn },
\ ]

A different story is that you can still retrieve the plain password in the dbs variable (or whatever you define) but I'm guessing is only inside the vim instance that you are running (?). I guess that obfuscate the passwords or drop them somehow after the connection is successful would be a better option but probably requires a PR (and I don't know that much about vim scripting 😅 )

This one is working fine for me, hope it helps!

SergioShz avatar Aug 09 '23 11:08 SergioShz

@SergioShz have you tested using pass with the ui when creating a new connection? I've set up the connections with dadbod in my init before, but I wanted to be able to set a password to a var or pass call when creating the connection via the ui.

walkabout21 avatar Aug 09 '23 13:08 walkabout21

nop, I didn't. It seems a bit more complicated than just calling pass from the init script 😞

SergioShz avatar Aug 17 '23 21:08 SergioShz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 16 '23 21:09 stale[bot]