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

[v10] Implement the Touch ID credential picker #14643

Merged
merged 2 commits into from
Jul 19, 2022

Conversation

codingllama
Copy link
Contributor

Implement the Touch ID credential picker.

During passwordless authentication, when more than one login is present in
Enclave credentials, tsh now asks the end user to pick their desired login.
Credential picker terminal prompts are preceded by a system Touch ID prompt,
which is then reused for authentication, provided less than 10 seconds pass in
the meantime.

I've done a couple of refactors to make the CredentialInfo structs similar
between the webauthncli and touchid packages, so it's easier to trace
parallels between them.

To avoid double-prompting users during Touch ID authentication we have to set a
grace period in the underlying LAContext and share it between the functions.
Note that AuthContextGuard (native) uses the LAContext explicitly, whereas
Authenticate (native) uses it through the SecItemCopyMatching query dictionary.

#14493:

  • Refactor touchid.CredentialInfo
  • Refactor wancli.CredentialInfo
  • Move fido2_prompt*.go to prompt*.go
  • Define the touchid credential picker API
  • Add Touch ID credential picker tests
  • Implement touchid credential picker

#13901:

  • Allow explicit Touch ID prompts

Backports #14492 and #14493.

Closes #13901.

Allow explicit Touch ID prompts to be triggered via Go code, which will be used
to guard the (upcoming) credential picker prompt.

To avoid double-prompting users during Touch ID authentication we have to set a
grace period in the underlying LAContext and share it between the functions.
Note that AuthContextGuard (native) uses the LAContext explicitly, whereas
Authenticate (native) uses it through the SecItemCopyMatching query dictionary.

No UX visible changes are made in the PR, despite the fact that prompting occurs
a bit earlier.

#13901

* Allow explicit Touch ID prompts
Implement the Touch ID credential picker.

During passwordless authentication, when more than one login is present in
Enclave credentials, `tsh` now asks the end user to pick their desired login.
Credential picker terminal prompts are preceded by a system Touch ID prompt,
which is then reused for authentication, provided less than 10 seconds pass in
the meantime.

I've done a couple of refactors to make the `CredentialInfo` structs similar
between the `webauthncli` and `touchid` packages, so it's easier to trace
parallels between them.

#13901

* Refactor touchid.CredentialInfo
* Refactor wancli.CredentialInfo
* Move fido2_prompt*.go to prompt*.go
* Define the touchid credential picker API
* Add Touch ID credential picker tests
* Implement touchid credential picker
@codingllama codingllama changed the title Implement the Touch ID credential picker [v10] Implement the Touch ID credential picker Jul 19, 2022
@github-actions github-actions bot added the tsh tsh - Teleport's command line tool for logging into nodes running Teleport. label Jul 19, 2022
@codingllama codingllama enabled auto-merge (squash) July 19, 2022 16:35
@github-actions github-actions bot removed the request for review from capnspacehook July 19, 2022 16:46
@codingllama codingllama merged commit 29c3f24 into branch/v10 Jul 19, 2022
@codingllama codingllama deleted the codingllama/v10-touchid-picker branch July 19, 2022 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 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.

3 participants