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

mysql backend - allow providing hostname (for CT) #1441

Closed
jippi opened this issue May 23, 2016 · 4 comments
Closed

mysql backend - allow providing hostname (for CT) #1441

jippi opened this issue May 23, 2016 · 4 comments

Comments

@jippi
Copy link
Contributor

jippi commented May 23, 2016

Hi,

A problem I'm currently having is that the mysql secret backend only provides a username ({{.Data.username}} in CT) and password ({{.Data.password}} in CT)

Providing a connection string usually also include a hostname though, and some arbitrary attributes like database and so on.

It would be nice if you could attach these kind of meta-data keys to the data returned from a mysql secret lease - e.g. {{.Data.hostname}}, {{.Data.port}} and {{.Data.database}} and so on

For example if my CT request credentials for a read-only access account, it could bind the hostname to slave.mysql.service.consul (provided by me in POST /mysql/roles/- will allow for more dumb CT as it wouldn't have to read the hostname from a clear-text key/value, allowing the consuming developer to just use the returned data and no outside knowledge about the system(s) to get things working correctly

Example:

POST /mysql/roles/p_read_only { sql: "bla bla", hostname: slave.mysql.service.consul, port: 3306, database: production }
POST /mysql/roles/i_read_only { sql: "bla bla", hostname: slave.mysql.service.consul, port: 3306, database: insights }
POST /mysql/roles/p_writeable { sql: "bla bla", hostname: master.mysql.service.consul, port: 3308, database: production }

@jefferai
Copy link
Member

Neat idea. @LLBennett something to keep in mind!

@jefferai jefferai added this to the future milestone May 23, 2016
@jippi
Copy link
Contributor Author

jippi commented Feb 27, 2018

I worked around this in different ways the last 2 years, probably not worth a fix in Vault

@jippi jippi closed this as completed Feb 27, 2018
@StyleT
Copy link
Contributor

StyleT commented Feb 28, 2018

@jippi Hi! I think that this issue still causes additional complexity during Vault adoption... Maybe you can reopen this issue?

@jefferai Hi! Do you guys have any plans to fix it?

@serverhorror
Copy link

I think this might be related to #317. In the overall scheme it seems that it would be nice to be able to define the output string(s) in one way or another.

I know the title says PostgreSQL but it sounds to be a very much the same request, no?

@pbernal pbernal removed this from the not-scheduled milestone May 26, 2020
mgritter pushed a commit that referenced this issue Sep 8, 2020
* Added stub class for activity logging. (#1435)
* Define activity fragments and starter methods for manipulating them. (#1441)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants