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

YubiKey ignores cancellation of PIV PIN/touch requests #47810

Open
gzdunek opened this issue Oct 22, 2024 · 0 comments
Open

YubiKey ignores cancellation of PIV PIN/touch requests #47810

gzdunek opened this issue Oct 22, 2024 · 0 comments
Labels
bug teleport-connect Issues related to Teleport Connect. tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Comments

@gzdunek
Copy link
Contributor

gzdunek commented Oct 22, 2024

When a YubiKey is used as a hardware key and prompts the user for a PIN or touch, attempting to cancel the request in either tsh or Teleport Connect does not stop the YubiKey from blinking.
This issue comes from two main problems:

  • The signer.Sign interface does not accept a Context, so it's not possible to cancel the call easily.
    • A current workaround is to abandon the call using abandonableSign when the context is canceled. This however does not cancel the request itself and the YubiKey is still blinking.
  • The go-piv library (used for YubiKey communication) does not expose any API that would allow us to break the pending request.
    Attempting to close the YubiKey connection with YubiKey.Close() did not cause the device to stop blinking.

There is also a chance that this mechanism is intentional on the YubiKey side, so it's not possible to cancel the request programmatically.
The key will eventually reach a timeout (after a few seconds) and unlock itself, but until it does, the user may need to tap it twice, as observed in #47652 (comment).

If possible, we should attempt to cancel the request; otherwise, we can add to the error message something like "the key itself may wait for PIN/touch for a few more seconds".

@gzdunek gzdunek added bug teleport-connect Issues related to Teleport Connect. tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug teleport-connect Issues related to Teleport Connect. tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

No branches or pull requests

1 participant