-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 REQUEST] Nested / Wildcard path for database roles #3230
Comments
I don't like option A - I think option B is more consistent with the Vault API in how you can "tune" mounts. In this case option B would allow you to "tune" a database connection after it has already been created. I'm very surprised that the new database backend did not include this capability from the start. It seems like the old, deprecated backends (the MySQL secret backend for example) forced you to create the database connection first, then create roles. Each time a role was created it was automatically added to the connection. With the new database secret backend, this forces you to create the roles first and then create the connection with |
@Xopherus What exactly is it you think is missing? You can update the connection information at any time you please, including
They didn't; you could use whatever order you pleased and update either at any time.
It doesn't; you can update both roles and connection information at any time you want. My understanding of the OP's ask is that he wants more flexibility for globbing than simply setting |
Note: I forgot in my last comment there that there is already a PR to do what we assume is the OP's ask, at #3387 |
@jefferai the biggest hurdle I see is that Also fwiw, I don't think globbing is necessarily a bad idea - it's probably good to prepend your roles with tags if you want certain roles to be assigned to certain connections. But if you don't know that from the start, or if your roles evolve over time, globbing won't really help you - assuming that you use a similar setup to provision your vault cluster. |
This could be changed. It just needs to be brought to our attention as a use case, which has not happened before. |
Would you like a separate issue opened for further discussion @jefferai? I'd be happy to try and explain further. |
It's not an issue of not understanding, it's that nobody has requested it before, hence it was neither in our design goals nor implemented afterwards to this point. Please open a new issue, as this one has been completed. |
I have an automated workflow, and it would like to use the Database Provider to create roles that it can then issue tokens against.
Currently when you set up the database config, you specify the roles, e.g...
vault write database/config/mysql ..... allowed_roles='dev1,live,test'
This is limited in that the roles need to be known in advance. In my use case I need to create roles later on that would use the same user/connection, but have different grants for dynamic data setup later, e.g. databases.
I see two possible solutions that would would enable such a use case:
Option A)
Wildcard roles and nested role paths:
Option B)
A command / endpoint to amend the allowed roles post the config being created.
I like Option A.
Would you be interested in supporting this? If yes, is there somebody who could implement it?
Thanks, and fingers crossed! :)
The text was updated successfully, but these errors were encountered: