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 support for Hardware Key PIN to Teleport Connect #34415

Closed
Joerger opened this issue Nov 9, 2023 · 5 comments
Closed

Add support for Hardware Key PIN to Teleport Connect #34415

Joerger opened this issue Nov 9, 2023 · 5 comments
Assignees
Labels
c-cpd Internal Customer Reference feature-request Used for new features in Teleport, improvements to current should be #enhancements mfa Issues related to Multi Factor Authentication teleport-connect Issues related to Teleport Connect.

Comments

@Joerger
Copy link
Contributor

Joerger commented Nov 9, 2023

Screenshot from 2023-11-09 11-19-27

Connect already implements an MFA prompt and a passwordless login prompt. The challenge here would be to refactor api/utils/keys/yubikey.go to not use api/utils/prompt directly, but rather accept some kind of an interface, where tsh would use api/utils/prompt and tsh daemon would speak with the Electron app somehow.

That's another thing to figure out. The passwordless login prompt already implements prompting for PIN and picking credentials. However, this is implemented through the Electron app making a bidirectional streaming RPC to tshd. First, a bidirectional stream might not be necessary, since the messages are always send in a specific order and are finite (this is the case for passwordless login too). Second, from a quick look it seems that for PIV it'd have to be done just like the MFA prompt, where the tshd initiates an RPC to the Electron app. That's because in the case of passwordless login, the user explicitly selects passwordless login as the login option. But PIV is used automatically within TeleportClient.SSHLogin based on a response from the auth server.

@Joerger Joerger added the feature-request Used for new features in Teleport, improvements to current should be #enhancements label Nov 9, 2023
@ravicious
Copy link
Member

ravicious commented Jan 24, 2024

@oshati just reported on Slack a customer running into a problem with hardware_key_touch where on login in Connect they run into "private key policy not met: hardware_key_touch". I was able to reproduce it with both hardware_key_touch and hardware_key.

The docs say that hardware keys are supported in Connect. However, if the process works the way it was described by Brian on Slack, I'm not sure if it ever worked in Connect:

When you set require_session_mfa on the role, there is no way to know the requirement before logging in the first time. So the user tries to login, gets the error, and then we use the error to determine the role requirement. Then, relogin is initiated to pass the requirement.

lib/teleterm doesn't handle that error in any way AFAIK.

On top of this, during login tsh daemon asks for multiple key taps, but Connect doesn't reflect that in the UI in any way. The login modal assumes that only one tap of the key is needed.


Related:

@ravicious
Copy link
Member

I imagine the issue was originally opened in the context of hardware_key_touch_and_pin not being supported, since it requires an additional prompt for PIN. But I cannot seem to get the other two options to work in Connect too.

@rust0k
Copy link

rust0k commented Jan 30, 2024

one more error 3 INVALID_ARGUMENT: private key policy not met: hardware_key_touch. , but in policy require_session_mfa: hardware_key_touch. Teleport connect 14.1.5

@oshati oshati added the c-cpd Internal Customer Reference label Feb 5, 2024
@zmb3 zmb3 added mfa Issues related to Multi Factor Authentication teleport-connect Issues related to Teleport Connect. labels Feb 27, 2024
@gzdunek gzdunek self-assigned this Aug 8, 2024
@ravicious
Copy link
Member

@gzdunek @Joerger Can this be closed now?

@gzdunek
Copy link
Contributor

gzdunek commented Nov 19, 2024

Ah, I incorrectly tagged the issues to close in #47652. It can be closed.

@gzdunek gzdunek closed this as completed Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-cpd Internal Customer Reference feature-request Used for new features in Teleport, improvements to current should be #enhancements mfa Issues related to Multi Factor Authentication teleport-connect Issues related to Teleport Connect.
Projects
None yet
Development

No branches or pull requests

6 participants