Skip to content

Hardware Key UX fixes#20849

Merged
Joerger merged 4 commits intomasterfrom
joerger/cache-profile-key-policy
Jan 30, 2023
Merged

Hardware Key UX fixes#20849
Joerger merged 4 commits intomasterfrom
joerger/cache-profile-key-policy

Conversation

@Joerger
Copy link
Copy Markdown
Contributor

@Joerger Joerger commented Jan 27, 2023

Changes:

  • Cache private key policy in profile
  • Fix tsh status and tsh logout when the user unplugs their Yubikey. tsh status now shows profile expired, matching the output when you delete the private key from disk.
$ tsh status
> Profile URL:        https://proxy.example.com:3080
  Logged in as:       dev
  Cluster:            root-cluster
  Roles:              
  Logins:             
  Kubernetes:         enabled
  Valid until:        2023-01-27 11:22:33.602155139 -0800 PST m=+0.068568995 [EXPIRED]
  Extensions:         

ERROR: Active profile expired.
  • Add extra prompt and longer timeout for tsh status cluster alert check when used with private key policy hardare_key_touch.
$ tsh status
> Profile URL:        https://proxy.example.com:3080
  Logged in as:       dev
  ...

Checking server for cluster alerts.
Tap your YubiKey

@Joerger Joerger requested a review from GavinFrazar January 27, 2023 19:23
@github-actions github-actions Bot added size/sm tctl tctl - Teleport admin tool tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Jan 27, 2023
@Joerger
Copy link
Copy Markdown
Contributor Author

Joerger commented Jan 27, 2023

Open question: would it be better for us to disable cluster alerts from tsh status when hardware_key_touch is in use? @fspmarshall WDYT

@fspmarshall
Copy link
Copy Markdown
Contributor

@Joerger seems reasonable to me. Making tsh status require interaction feels clunky.

Comment thread lib/client/api.go
Comment thread lib/client/api.go
@GavinFrazar
Copy link
Copy Markdown
Contributor

and do we want to backport this to v12?

Copy link
Copy Markdown
Contributor

@strideynet strideynet left a comment

Choose a reason for hiding this comment

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

Looks good - @GavinFrazar raises a good point on dealing with the private key policy returned from the ping response to handle situations where the CAP has changed. I'll leave that between you two to sort out, and will approve this PR assuming that is resolved.

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from xacrimon January 30, 2023 19:01
@Joerger Joerger added this pull request to the merge queue Jan 30, 2023
Merged via the queue into master with commit 731acf9 Jan 30, 2023
@public-teleport-github-review-bot
Copy link
Copy Markdown

@Joerger See the table below for backport results.

Branch Result
branch/v11 Failed
branch/v12 Failed

Joerger added a commit that referenced this pull request Jan 30, 2023
* Save private key policy in profile.

* Fix tsh status/logout with yubikey unplugged; fix cluster alert on tsh status with hardware_key_touch.

* Set private key policy from ping response.

* Skip cluster alerts on tsh status.
Joerger added a commit that referenced this pull request Jan 30, 2023
* Save private key policy in profile.

* Fix tsh status/logout with yubikey unplugged; fix cluster alert on tsh status with hardware_key_touch.

* Set private key policy from ping response.

* Skip cluster alerts on tsh status.
@Joerger Joerger deleted the joerger/cache-profile-key-policy branch January 30, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sm tctl tctl - Teleport admin tool 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.

5 participants