Skip to content

Conversation

LDVG
Copy link

@LDVG LDVG commented Jun 29, 2022

NOTE: This PR is a continuation of #310; marked as draft until #310 is merged/closed.

For verify-required and resident options, ssh-keygen always prompts for a PIN. If the authenticator does not have a PIN set, the user is presented with an "invalid format" error message.

Instead of preemptively asking for a PIN, determine whether it's required by examining the authenticator's return value. If a PIN is required but not set, optionally set a new PIN. Otherwise, print a more informative error message to the user.

LDVG added 5 commits November 7, 2022 09:47
To lookup a discoverable SSH credential, some form of user verification
is required. If the device supports a PIN, return a suitable error.
Define an error to indicate to the user that a PIN is required but not
set on the authenticator. Joint work with @martelletto.
To use a verify-required credential, some form of UV has to be
configured. If the device supports a PIN and has no form of UV set,
return SSH_SK_ERR_PIN_NOT_SET. Joint work with @martelletto.
No-op if PIN has already been set. Joint work with @martelletto.
On a SSH_ERR_DEVICE_PIN_NOT_SET error, assist user in setting a PIN.
Joint work with @martelletto.
@LDVG LDVG marked this pull request as ready for review November 7, 2022 10:21
@LDVG
Copy link
Author

LDVG commented Nov 7, 2022

Rebased since #310 and parts of #302 were merged. The latter dropped preemptive prompts for the authenticator PIN which means this PR now primarily aims to help the user enroll a PIN when creating resident or verify-required credentials.

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.

1 participant