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

Print accurate status in tsh login output #44043

Merged
merged 1 commit into from
Jul 11, 2024
Merged

Conversation

rosstimothy
Copy link
Contributor

If tsh login was executed while the user had a valid session the resulting status shown to the user included data from the prior session. The root cause was the profile being passed to printLoginInformation was old. Any profiles retrieved prior to calling (TeleportClient) SaveProfile should be discarded and the profile should be retrieved again to reflect the new session. Other branches within the login logic were already correctly refreshing the profile.

Closes #33732.

Changelog: Ensure that tsh login outputs accurate status information for the new session.

If tsh login was executed while the user had a valid session the
resulting status shown to the user included data from the prior
session. The root cause was the profile being passed to
printLoginInformation was the old. Any profiles retrieved prior
to calling (TeleportClient)SaveProfile should be discarded and
the profile should be retrieved again to reflect the new session.

Closes #33732.
@rosstimothy rosstimothy marked this pull request as ready for review July 10, 2024 23:49
@github-actions github-actions bot added size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Jul 10, 2024
@github-actions github-actions bot requested review from Tener and zmb3 July 10, 2024 23:50
@rosstimothy rosstimothy added this pull request to the merge queue Jul 11, 2024
Merged via the queue into master with commit 8a71653 Jul 11, 2024
43 checks passed
@rosstimothy rosstimothy deleted the tross/tsh_login_status branch July 11, 2024 19:55
@public-teleport-github-review-bot

@rosstimothy See the table below for backport results.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v14 backport/branch/v15 backport/branch/v16 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 login reports stale status
3 participants