[v9] Allow users to request database certificates in Machine ID (#11904) #12195
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #11904 for branch/v9
This adds a new destination-level config option to
tbot.yaml
thatallows users to request database access for a particular destination
certificate. Behind the scenes, this triggers generates two
impersonated certs: the first identity is generated to request the
specified roles and resolve the database config, then is replaced
with a new identity using those roles plus a fully-formed
RouteToDatabase
request.Database requests are made by adding a destination entry like the
following to
tbot.yaml
:We currently don't support proxying or generating db-specific config
files. See #11596 for an
identityfile
implementation that can help.Additionally, we don't currently have a
tsh proxy
equivalent so thelegacy MySQL handlers need to be enabled, which is not the case by
default in Teleport 9. However, that same PR can export a
tsh-compatible identity file for the datbase identity which can be
passed along to
tsh -i ...
and presumably used with its proxycommands. We plan to follow-up with another PR to improve this UX.
Try to fix flaky test
Address review feedback
Update tool/tbot/renew.go
Co-authored-by: Roman Tkachenko roman@goteleport.com
Co-authored-by: Roman Tkachenko roman@goteleport.com