Skip to content

fix tsh logout flags#47255

Merged
GavinFrazar merged 3 commits intomasterfrom
gavinfrazar/fix-tsh-logout-flags
Oct 10, 2024
Merged

fix tsh logout flags#47255
GavinFrazar merged 3 commits intomasterfrom
gavinfrazar/fix-tsh-logout-flags

Conversation

@GavinFrazar
Copy link
Copy Markdown
Contributor

@GavinFrazar GavinFrazar commented Oct 6, 2024

Changelog: Fixed a bug where tsh logout failed to parse flags passed with spaces.

Fixes #33681

Before

$ tsh logout --user gavin.frazar@goteleport.com --proxy=gavin-leaf.cloud.gravitational.io
ERROR: unexpected argument: gavin.frazar@goteleport.com

$ tsh logout --user=gavin.frazar@goteleport.com --proxy gavin-leaf.cloud.gravitational.io
ERROR: unexpected argument: gavin-leaf.cloud.gravitational.io

After

$ tsh logout --user gavin.frazar@goteleport.com --proxy gavin-leaf.cloud.gravitational.io:443
Logged out gavin.frazar@goteleport.com from gavin-leaf.cloud.gravitational.io.

@github-actions github-actions Bot added size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Oct 6, 2024
Copy link
Copy Markdown
Contributor

@tigrato tigrato left a comment

Choose a reason for hiding this comment

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

Not related but can you also fix this log message:

Specify --proxy and --user to remove keys for specific user from a proxy or neither to log out all users from all proxies.

After reading it 10 times, I can't understand what it means

@GavinFrazar
Copy link
Copy Markdown
Contributor Author

Not related but can you also fix this log message:

Specify --proxy and --user to remove keys for specific user from a proxy or neither to log out all users from all proxies.

After reading it 10 times, I can't understand what it means

how's this?

$ ~/code/teleport/build/tsh logout --user=gavin
Specify --proxy to log out user "gavin" from a specific proxy or remove the --user flag to log out all users from all proxies.

$ ~/code/teleport/build/tsh logout --proxy=gavin-leaf.cloud.gravitational.io:443
Specify --user to log out a specific user from "gavin-leaf.cloud.gravitational.io" or remove the --proxy flag to log out all users from all proxies.

@GavinFrazar GavinFrazar requested a review from tigrato October 7, 2024 18:06
Comment thread tool/tsh/common/tsh.go
@GavinFrazar GavinFrazar added this pull request to the merge queue Oct 10, 2024
Merged via the queue into master with commit 906218f Oct 10, 2024
@GavinFrazar GavinFrazar deleted the gavinfrazar/fix-tsh-logout-flags branch October 10, 2024 17:49
@public-teleport-github-review-bot
Copy link
Copy Markdown

@GavinFrazar See the table below for backport results.

Branch Result
branch/v14 Create PR
branch/v15 Create PR
branch/v16 Create PR

mvbrock pushed a commit that referenced this pull request Oct 16, 2024
* fix tsh logout flags

* reword logout error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tsh logout flags do not work.

3 participants