Jonathan Druart
b93e15c235
Bug 28786 added the ability to turn on a two-factor authentication, using a One Time Password (OTP). Once enabled on the system, librarian had the choice to enable or disable it for themselves. For security reason an administrator could decide to force the librarians to use this second authentication step. This patch adds a third option to the existing syspref, 'Enforced', for that purpose. QA notes: the code we had in the members/two_factor_auth.pl controller has been moved to REST API controller methods (with their tests and swagger specs), for reusability reason. Code from template has been moved to an include file for the same reason. Test plan: A. Regression tests As we modified the code we need first to confirm the existing features are still working as expected. 1. Turn off TwoFactorAuthentication (disabled) and confirm that you are not able to enable and access the second authentication step 2. Turn it on (enabled) and confirm that you are able to enable it in your account 3. Logout and confirm then that you are able to login into Koha B. The new option 1. Set the pref to "enforced" 2. You are not logged out, logged in users stay logged in 3. Pick a user that does not have 2FA setup, login 4. Notice the new screen (UI is a bit ugly, suggestions welcomed) 5. Try to access Koha without enabling 2FA, you shouldn't be able to access any pages 6. Setup 2FA and confirm that you are redirected to the login screen 7. Login, send the correct pin code => You are fully logged in! Note that at 6 we could redirect to the mainpage, without the need to login again, but I think it's preferable to reduce the change to C4::Auth. If it's considered mandatory by QA I could have a look on another bug report. Sponsored-by: Rijksmuseum, Netherlands Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
||
---|---|---|
.. | ||
accountline-details.pl | ||
apikeys.pl | ||
boraccount.pl | ||
cancel-charge.pl | ||
default_messageprefs.pl | ||
deletemem.pl | ||
discharge.pl | ||
discharges.pl | ||
files.pl | ||
holdshistory.pl | ||
housebound.pl | ||
ill-requests.pl | ||
mancredit.pl | ||
maninvoice.pl | ||
member-flags.pl | ||
member-password.pl | ||
member.pl | ||
memberentry.pl | ||
members-home.pl | ||
members-update-do.pl | ||
members-update.pl | ||
merge-patrons.pl | ||
mod_debarment.pl | ||
moremember.pl | ||
notices.pl | ||
patronimage.pl | ||
pay.pl | ||
paycollect.pl | ||
print_overdues.pl | ||
printfeercpt.pl | ||
printinvoice.pl | ||
printnotice.pl | ||
printslip.pl | ||
purchase-suggestions.pl | ||
readingrec.pl | ||
recallshistory.pl | ||
routing-lists.pl | ||
search.pl | ||
setstatus.pl | ||
statistics.pl | ||
summary-print.pl | ||
two_factor_auth.pl | ||
update-child.pl |