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

nk3 set-config: Add warning and confirmation prompt #479

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

robin-nitrokey
Copy link
Member

With the upcoming firmware release for the Nitrokey 3, changing some configuration values can have side effects, namely a reset of the opcard application. We will add new commands with additional information and warnings in the future. For the time being, this patch adds a warning to the set-config command, indicating that it may cause data loss and should only be used for testing and development.

@sosthene-nitrokey We want to release pynitrokey today for some NetHSM fixes. I’d like to include something like this even if we don’t have the proper commands for changing specific config values yet. What do you think?

@sosthene-nitrokey
Copy link
Contributor

Maybe we can have an allowlist of config changes that don't have side effects, and only warn for the others ?

With the upcoming firmware release for the Nitrokey 3, changing some
configuration values can have side effects, namely a reset of the opcard
application.  We will add new commands with additional information and
warnings in the future.  For the time being, this patch adds a warning
to the set-config command, indicating that it may cause data loss and
should only be used for testing and development.
@robin-nitrokey
Copy link
Member Author

I’ve added a whitelist that skips the warning and confirmation for known config values without side effects, currently only fido.disable_skip_up_timeout.

@daringer
Copy link
Collaborator

lgtm, I think this is a perfectly sane behavior for a cli tool to just warn, but keep a generic interface - also nicer to test - and for end-users (less-techy-users) nitrokey-app2 should be used anyways...

@robin-nitrokey robin-nitrokey merged commit c01c14f into master Nov 30, 2023
10 checks passed
@robin-nitrokey robin-nitrokey deleted the nk3-config branch November 30, 2023 11:14
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