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

Add new tctl bots update command #36496

Merged
merged 18 commits into from
Jan 22, 2024
Merged

Add new tctl bots update command #36496

merged 18 commits into from
Jan 22, 2024

Conversation

timothyb89
Copy link
Contributor

This adds a new command to update roles and logins for existing bots, with flags to both set and append as desired.

changelog: Add new tctl bots update command to update bot roles and logins

Closes #34262

This adds a new command to update roles and logins for existing bots,
with flags to both set and append as desired.

changelog: Add new `tctl bots update` command to update bot roles and logins
Also merges in some other misc docs changes for `tctl bots ...`
@timothyb89 timothyb89 marked this pull request as ready for review January 10, 2024 23:49
@github-actions github-actions bot requested a review from zmb3 January 10, 2024 23:50
@github-actions github-actions bot added size/md tctl tctl - Teleport admin tool labels Jan 10, 2024
@timothyb89 timothyb89 requested a review from strideynet January 10, 2024 23:50
Copy link

🤖 Vercel preview here: https://docs-r3txznhhz-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-oljes2xje-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-85fdrdbgs-goteleport.vercel.app/docs/ver/preview

@strideynet
Copy link
Contributor

Should we be using the new UpdateBot RPC for this instead ? Or is this so we can backport this further?

docs/pages/reference/cli/tctl.mdx Outdated Show resolved Hide resolved
docs/pages/reference/cli/tctl.mdx Outdated Show resolved Hide resolved
docs/pages/reference/cli/tctl.mdx Outdated Show resolved Hide resolved
Co-authored-by: Paul Gottschling <[email protected]>
Copy link

🤖 Vercel preview here: https://docs-1g7f28sxi-goteleport.vercel.app/docs/ver/preview

This switches to use the new `UpdateBot()` RPC instead of modifying
the bot user and role directly. Also, tweaks CLI messaging to be a
bit less chatty.
@timothyb89
Copy link
Contributor Author

Should we be using the new UpdateBot RPC for this instead ? Or is this so we can backport this further?

Ah, good call, truthfully I forgot we had an explicit update RPC now 😅.

Anyway, I've updated it to use the correct RPC.

Copy link

🤖 Vercel preview here: https://docs-8b9m8bos0-goteleport.vercel.app/docs/ver/preview

lib/utils/set/set.go Outdated Show resolved Hide resolved
lib/utils/set/set.go Outdated Show resolved Hide resolved
lib/utils/set/set.go Outdated Show resolved Hide resolved
Removes the Set package and unrolls all related function calls in
bots_command.
Copy link

🤖 Vercel preview here: https://docs-8klnr2zss-goteleport.vercel.app/docs/ver/preview

Copy link
Contributor

@jimbishopp jimbishopp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Tim! A couple of thoughts on this. Sorry for the last minute quarterbacking. :)

tool/tctl/common/bots_command.go Outdated Show resolved Hide resolved
This also makes a minimal API wrapper interface for mocking.
Copy link

🤖 Vercel preview here: https://docs-4gfq6ays6-goteleport.vercel.app/docs/ver/preview

Copy link

🤖 Vercel preview here: https://docs-au6zkinpw-goteleport.vercel.app/docs/ver/preview

Copy link
Collaborator

@zmb3 zmb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one docs nit.

docs/pages/reference/cli/tctl.mdx Outdated Show resolved Hide resolved
Copy link

🤖 Vercel preview here: https://docs-dsmwwjpgh-goteleport.vercel.app/docs/ver/preview

@timothyb89 timothyb89 added this pull request to the merge queue Jan 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 22, 2024
@timothyb89 timothyb89 added this pull request to the merge queue Jan 22, 2024
Merged via the queue into master with commit 8532972 Jan 22, 2024
40 checks passed
@timothyb89 timothyb89 deleted the timothyb89/tctl-update-bot branch January 22, 2024 22:45
@public-teleport-github-review-bot

@timothyb89 See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Machine ID: tctl support for modifying Bots roleset
9 participants