Skip to content
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

PostgreSQL should emit connection strings #317

Open
nevir opened this issue Jun 4, 2015 · 23 comments
Open

PostgreSQL should emit connection strings #317

nevir opened this issue Jun 4, 2015 · 23 comments
Labels
community-sentiment Tracking high-profile issues from the community ecosystem enhancement

Comments

@nevir
Copy link

nevir commented Jun 4, 2015

It'd be valuable to have the PostgreSQL backend (and other database backends) emit full connection strings; maybe via a template.

Currently we've gotta wire together that information from multiple locations (e.g. retrieve the address & db name in consul, and user/pass from vault), even though vault should have most/all of the info required

maybe a vault read MOUNT/connection/ROLE?

@jefferai jefferai added this to the 0.6.0 milestone Mar 14, 2016
@jefferai
Copy link
Member

Adding to the 0.6 milestone as we have some work around postgres planned for that. I can't promise that this will actually be added, but I want to make sure that we don't forget about it so that it is in the discussion.

@pearkes pearkes closed this as completed Apr 19, 2016
@jefferai jefferai reopened this Apr 19, 2016
@jefferai jefferai modified the milestones: 0.6.1, 0.6.0 May 27, 2016
@vishalnayak
Copy link
Contributor

If this issue is only about reading the configured parameters, it will be fixed by #1515

@vishalnayak
Copy link
Contributor

Fixed by #1515

@jefferai
Copy link
Member

I think this is a different ask -- the connection strings being asked for here will have information about the generated user, not the higher level connection information valid for the static admin user.

@jefferai jefferai reopened this Jun 21, 2016
@jefferai jefferai modified the milestones: 0.6.1, 0.6.2 Jul 18, 2016
@jefferai jefferai modified the milestones: 0.6.2, next Sep 19, 2016
@jefferai jefferai modified the milestones: near-term, future Oct 26, 2016
@schuylr
Copy link

schuylr commented Nov 21, 2016

+1 but for MySQL backend, please. I noticed the issue labels don't cover this backend even though you closed another issue for MySQL concerning this as a duplicate.

@jefferai
Copy link
Member

Issue labels don't really matter in this context :-)

@schuylr
Copy link

schuylr commented Nov 22, 2016

Making sure. Thanks :)

Here's another gotcha, what if I need the Vault server to use one hostname/IP or connection string, whereas my application uses a different hostname? Use cases involve multiple AWS VPCs that I've peered together using IPSec and custom hostnames to tunnel AWS RDS instances, where my apps all have direct access to their own RDS no matter what. A definable custom string would be handy for this, although I can always just store this in another generic backend.

@serverhorror
Copy link

serverhorror commented Feb 28, 2018

We could check that hostname is non-loopback and not a local socket

Please don't!
How would you know the local layout of a random company using vault?
It might be intentional

@jefferai jefferai modified the milestones: not-scheduled, 0.9.6, 0.10 Mar 14, 2018
@jefferai jefferai modified the milestones: 0.10, 0.10.1, 0.11 Apr 10, 2018
@chrishoffman chrishoffman modified the milestones: 0.11, not-scheduled Aug 16, 2018
@Andrey9kin
Copy link

Any plans to get this one going? Surprised that there are not that many people asking for it. Is there a workaround? I mean something better than building connection string yourself using received temp creds

@jefferai
Copy link
Member

jefferai commented Dec 6, 2018

@Andrey9kin Not currently, there's very little demand - a handful of requests over the years. If someone wanted to work on a PR we could help with making sure the design is right.

@Andrey9kin
Copy link

@jefferai how hard could it be? ;) doesn't feel like something big. I guess extend plugins/helper/database/credsutil/sql.go to return one more value and then roll from there, right?

@Andrey9kin
Copy link

or perhaps it should be more specific since databases have a different format for connection strings...

@adamdecaf
Copy link
Contributor

Yea, we never decided on a response format.

@therealgambo
Copy link

I think returning the connection_url of the database would be a decent start, not sure if handling the construction of the DSN should be done by vault or leave it to the application making the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-sentiment Tracking high-profile issues from the community ecosystem enhancement
Projects
None yet
Development

No branches or pull requests