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

Expose RoleSet.EnumerateDatabaseUsers to Teleport Terminal #12070

Merged
merged 3 commits into from
Apr 21, 2022

Conversation

ravicious
Copy link
Member

@ravicious ravicious commented Apr 19, 2022

The Web UI and Teleport Terminal show a list of allowed logins when the user click the "Connect" button next to a server.

image

We wish to display a similar list in Teleport Terminal for database users (gravitational/webapps.e#177).

I actually have a PoC implementation ready on the ravicious/teleterm-db-users branch of the webapps repo. The readme in packages/teleterm includes instructions on how to launch the dev version of Teleterm, but this PR is simple enough where I don't expect you to go through that process if you've never built Teleterm on your machine.

Teleport.Terminal.database.users.mov

To do this, we're going to use RoleSet.EnumerateDatabaseUsers introduced in #10458. We need to add an RPC method to the tsh daemon service that returns a list of database users. Teleport Terminal will request this list only when the user actually clicks on the button.

I considered fetching the list of allowed users together with the list of available databases. however we fetch cluster resources pretty often in Teleterm and I was worried that it might slow down this action if the cluster has a lot of databases.

This PR adds that RPC method so that Teleport Terminal can fetch the db users when needed.


The first commit updates proto files, so there's a lot of autogenerated code there.

@ravicious ravicious marked this pull request as ready for review April 19, 2022 16:22
@github-actions github-actions bot requested review from atburke and rosstimothy April 19, 2022 16:22
@ravicious ravicious requested review from Tener and removed request for atburke April 19, 2022 16:26
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

Successfully merging this pull request may close these issues.

4 participants