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

2FA not completely restored after disaster recovery #6109

Closed
nrauso opened this issue Apr 5, 2020 · 10 comments
Closed

2FA not completely restored after disaster recovery #6109

nrauso opened this issue Apr 5, 2020 · 10 comments
Labels
bug A defect of the software verified All test cases were verified successfully

Comments

@nrauso
Copy link

nrauso commented Apr 5, 2020

After a disaster recovery procedure, the 2FA feature is enabled but not honored for NS users (both privileged and normal).

Steps to reproduce

  • Enable 2FA for NS users;
  • Restore system with disaster recovery procedure;
  • Check if 2FA works.

Expected behavior

2FA should works as before.

Actual behavior

2FA is configured but not honored.

This happens because 2FA config files (/etc/nethserver/otp.secret,/etc/nethserver/cockpit.otp.force and /etc/nethserver/sshd.otp.force) are empty or inexistent.
The workaround is to run:

signal-event otp-save

Components

  • nethserver-backup-data-1.7.1-1.ns7.noarch
  • nethserver-restore-data-2.0.6-1.ns7.noarch
@nrauso nrauso added the bug A defect of the software label Apr 5, 2020
@stephdl
Copy link

stephdl commented Apr 6, 2020

how solve this ?

drop an action to trigger otp-save, do you know what is the event name of the disaster recovery

@gsanchietti
Copy link
Member

how solve this ?

Just expand all required templates inside the post-restore-config or post-restore-data event:
https://docs.nethserver.org/projects/nethserver-devel/en/latest/events.html#standard-events-and-their-arguments

@stephdl
Copy link

stephdl commented Apr 6, 2020

post-restore-config maybe better associated, thank

@nrauso
Copy link
Author

nrauso commented Apr 6, 2020

But 2FA users files are in backup-data, not in backup-config: @stephdl you should handle the connected events inside the post-restore-data, shouldn't you?

@DavidePrincipi DavidePrincipi added this to ⚙ Developing in NethServer 7 Apr 7, 2020
gsanchietti pushed a commit to NethServer/nethserver-cockpit that referenced this issue Apr 7, 2020
gsanchietti pushed a commit to NethServer/nethserver-openssh that referenced this issue Apr 7, 2020
@nethbot
Copy link
Member

nethbot commented Apr 7, 2020

in 7.7.1908/testing:

@nethbot
Copy link
Member

nethbot commented Apr 7, 2020

in 7.7.1908/testing:

@gsanchietti
Copy link
Member

Test case

  • Check the bug is not reproducible

@gsanchietti gsanchietti added the testing Packages are available from testing repositories label Apr 7, 2020
@nrauso nrauso self-assigned this Apr 7, 2020
@nrauso
Copy link
Author

nrauso commented Apr 7, 2020

Tested: VERIFIED

All configured 2FA are now correctly restored.

@nrauso nrauso removed their assignment Apr 7, 2020
@nrauso nrauso added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Apr 7, 2020
@nethbot
Copy link
Member

nethbot commented Apr 8, 2020

in 7.7.1908/updates:

@nethbot
Copy link
Member

nethbot commented Apr 8, 2020

in 7.7.1908/updates:

NethServer 7 automation moved this from ⚙ Developing to 🗑 Done Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect of the software verified All test cases were verified successfully
Projects
No open projects
NethServer 7
🗑 Done
Development

No branches or pull requests

4 participants