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

Allow explicit Touch ID prompts #14492

Merged
merged 5 commits into from
Jul 18, 2022
Merged

Allow explicit Touch ID prompts #14492

merged 5 commits into from
Jul 18, 2022

Conversation

codingllama
Copy link
Contributor

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

lib/auth/touchid/api_darwin.go Outdated Show resolved Hide resolved
lib/auth/touchid/api_darwin.go Show resolved Hide resolved
lib/auth/touchid/context.m Outdated Show resolved Hide resolved
lib/auth/touchid/context.m Outdated Show resolved Hide resolved
lib/auth/touchid/api_darwin.go Outdated Show resolved Hide resolved
lib/auth/touchid/api_darwin.go Show resolved Hide resolved
@codingllama codingllama force-pushed the codingllama/touchid-guard branch from def5b95 to 0f0e7d2 Compare July 15, 2022 14:42
@codingllama
Copy link
Contributor Author

Thanks for the quick review, @espadolini. PTAL?

@codingllama
Copy link
Contributor Author

Friendly ping @capnspacehook ?

@codingllama
Copy link
Contributor Author

Friendy ping @capnspacehook ?

@codingllama codingllama force-pushed the codingllama/touchid-guard branch from 0f0e7d2 to 7ab54c5 Compare July 18, 2022 14:29
@codingllama codingllama enabled auto-merge (squash) July 18, 2022 16:28
@codingllama codingllama force-pushed the codingllama/touchid-guard branch 4 times, most recently from f28fde8 to bee523a Compare July 18, 2022 18:49
@codingllama codingllama force-pushed the codingllama/touchid-guard branch from bee523a to 055aea4 Compare July 18, 2022 21:05
@codingllama codingllama merged commit 7dbefc2 into master Jul 18, 2022
@codingllama codingllama deleted the codingllama/touchid-guard branch July 18, 2022 22:28
codingllama added a commit that referenced this pull request Jul 19, 2022
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
codingllama added a commit that referenced this pull request Jul 19, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants