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

warn user before running nitropy fido2 update on nitrokey 3 devices? #536

Open
pjhfggij opened this issue Apr 26, 2024 · 2 comments
Open

Comments

@pjhfggij
Copy link

pjhfggij commented Apr 26, 2024

I'm under impression that nitropy fido2 update isn't supposed to be used to update Nitrokey series 3 keys and attempts to do so may lead to unexpected behaviors of the device. To be clear running this hasn't damaged my device in any noticeable way, but wouldn't it be good if pynitrokey warned users before they do that (by detecting device type and warning against it) to avoid any potential confusion?

@pjhfggij pjhfggij changed the title warn user before nitropy fido2 update ? warn user before running nitropy fido2 update on nitrokey 3 devices? Apr 26, 2024
@robin-nitrokey
Copy link
Member

Thanks for the report! Running nitropy fido2 update on a Nitrokey 3 should not do any damage, but indeed it would be better to fail early. There are some other fido2 subcommands that only work for the Nitrokey FIDO2 device and not for the Nitrokey 3, e. g. nitropy fido2 status. We plan to split the fido2 subcommand into one subcommand for general FIDO2 operations (i. e. working with the Nitrokey FIDO2 or Nitrokey 3), and one subcommand specifically for the Nitrokey FIDO2.

@pjhfggij
Copy link
Author

pjhfggij commented Apr 26, 2024

yeah, I think that names can be a bit confusing right now, nitropy fido2 status output as well only yielded:

Critical error:
An unhandled exception occurred
        Exception encountered: CtapError('CTAP error: 0x01 - INVALID_COMMAND')

instead of mentioning something along device is not supported that would be easier for the user to reason about. Splitting fido2 into subcommands sounds like a good idea.

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

No branches or pull requests

2 participants