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 error blocks using Teleport Connect #30030

Closed
stevenGravy opened this issue Aug 4, 2023 · 6 comments · Fixed by #47652
Closed

Yubikey error blocks using Teleport Connect #30030

stevenGravy opened this issue Aug 4, 2023 · 6 comments · Fixed by #47652
Assignees
Labels
bug c-cpd Internal Customer Reference teleport-connect Issues related to Teleport Connect.

Comments

@stevenGravy
Copy link
Contributor

stevenGravy commented Aug 4, 2023

Expected behavior:

An error would allow dismissing the issue or at least give further information.

Current behavior:

After upgrading to 13.3.1 experiencing a lockout to access any functionality. Had to remove the user data directory. I have backed up the user data dir. Putting it back in the error is repeated.

image

Bug details:

  • Teleport version: 13.3.1
  • Recreation steps

I don't know exactly what's causing this. I can share the data dir which repeatedly causes this.

@stevenGravy stevenGravy added bug teleport-connect Issues related to Teleport Connect. labels Aug 4, 2023
@gzdunek
Copy link
Contributor

gzdunek commented Aug 4, 2023

The problem happens because we have Storage.ReadAll() in StartHeadlessWatchers() which is called during the app initialization. Storage.ReadAll() returns an error when ybukiey is not connected. We should catch this error instead of crashing the app.

The workaround is to have yubikey connected when starting the app.

@ravicious
Copy link
Member

@stevenGravy Do you use hardware-based private keys?

@gzdunek What should we do after catching the error? Storage.ReadAll is mostly used to get the list of all profiles on startup, which lets us see which profiles have valid keys and which require login. I suppose in this situation we could consider the profile to not have a valid key and force the user to log in again?

@Joerger Do you know what's the state of hardware-based PK support in Connect? I looked at RFD 80 and it seems like Connect supports only the login happy path and ssh, but no db proxies, right?

@gzdunek
Copy link
Contributor

gzdunek commented Aug 7, 2023

@gzdunek What should we do after catching the error? Storage.ReadAll is mostly used to get the list of all profiles on startup, which lets us see which profiles have valid keys and which require login. I suppose in this situation we could consider the profile to not have a valid key and force the user to log in again?

Yes, it seems to me that it should work this way, when the user tries to interact with that profile, they will be prompted to log in again (as usual).

@stevenGravy
Copy link
Contributor Author

@stevenGravy Do you use hardware-based private keys?

@gzdunek What should we do after catching the error? Storage.ReadAll is mostly used to get the list of all profiles on startup, which lets us see which profiles have valid keys and which require login. I suppose in this situation we could consider the profile to not have a valid key and force the user to log in again?

@Joerger Do you know what's the state of hardware-based PK support in Connect? I looked at RFD 80 and it seems like Connect supports only the login happy path and ssh, but no db proxies, right?

I had been trying hardware based keys for a period. I had taken it off the user's roles at one point.

@oshati oshati added the c-cpd Internal Customer Reference label Feb 5, 2024
@zmb3
Copy link
Collaborator

zmb3 commented Jun 25, 2024

@ravicious @Joerger can we close this as a duplicate of #34415?

@Joerger
Copy link
Contributor

Joerger commented Jun 25, 2024

@zmb3 This is separate - We need to add some UX improvements here when the user removes the yubikey where their private key is stored. The user should be prompted with a better error message to either log out or connect their yubikey and retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c-cpd Internal Customer Reference teleport-connect Issues related to Teleport Connect.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants