Koha/debian
David Cook 5cef65a87f Bug 30843: Add mfa_range configuration option for TOTP
This change adds a mfa_range configuration option for TOTP
to koha-conf.xml, and overrides the "verify" method from
Auth::GoogleAuth in order to provide a new default for "range"

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=TwoFactorAuthentication
3. Change the syspref to "Enable"
4. Go to
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
5. Click "More" and "Manage two-factor authentication"
6. Register using an app
7. In an Incognito window, go to
http://localhost:8081/cgi-bin/koha/mainpage.pl
8. Sign in with the "koha" user
9. Note down a code from your Authenticator app
10. Wait until after 60 seconds and try it
11. Note it says "Invalid two-factor code"
12. Try a new code from the app
13. Note that it works

14. Add <mfa_range>10</mfa_range> to /etc/koha/sites/kohadev/koha-conf.xml
15. Clear memcached and koha-plack --restart kohadev
16. Sign in with the "koha" user
17. Note down a code from your Authenticator app
18. Wait 4 minutes and then try it
19. Note that it works

20. Disable your two-factor authentication and click to re-enable it
21. Use a code older than 60 seconds when registering for the two
factor authentication
22. Note that the code works

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a0955946e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2023-10-05 08:36:20 -10:00
..
docs Bug 31964: add a man page for koha-z3950-responder 2023-09-07 14:27:39 -10:00
scripts Bug 34653: Make koha-foreach return the correct status code 2023-09-25 09:28:42 -10:00
source Bug 32994: Remove compiled files from src (2) 2023-02-22 10:03:25 -03:00
templates Bug 30843: Add mfa_range configuration option for TOTP 2023-10-05 08:36:20 -10:00
bd-to-depends
build-git-snapshot Bug 33629: allow pbuilder to use network via build-git-snapshot 2023-05-05 09:13:15 -03:00
changelog Update debian/changelog file: 22.12.00-3 2023-02-20 09:44:12 -03:00
clean Bug 32994: Remove compiled files from src (2) 2023-02-22 10:03:25 -03:00
compat
control Update debian/control file: 22.12.00-3 on deb9 (1b6e9c7b) 2023-02-20 09:44:13 -03:00
control.in Bug 14251: Add weasyprint dependency 2023-03-27 11:54:14 +02:00
copyright
koha-common.bash-completion Bug 33108: Teach koha-list filter elasticsearch 2023-03-20 09:39:46 -03:00
koha-common.config
koha-common.cron.d
koha-common.cron.daily
koha-common.cron.hourly
koha-common.cron.monthly
koha-common.default
koha-common.dirs
koha-common.docs
koha-common.init Bug 33108: (follow-up) Don't let restart die if ES indexer not running 2023-03-20 09:39:48 -03:00
koha-common.install Bug 33108: koha-es-indexer added 2023-03-20 09:39:45 -03:00
koha-common.links
koha-common.logrotate
koha-common.postinst Bug 32612: (QA follow-up) Remove more unneeded appender lines 2023-02-03 10:30:04 -03:00
koha-common.preinst
koha-common.README.Debian
koha-common.service Bug 33371: Add [Install] section to koha-common.service 2023-06-01 11:57:12 -03:00
koha-common.templates
koha-core.bash-completion Bug 33108: Teach koha-list filter elasticsearch 2023-03-20 09:39:46 -03:00
koha-core.config
koha-core.default
koha-core.dirs
koha-core.docs
koha-core.init Bug 32922: (follow-up) Fix two additional occurences 2023-02-20 09:44:07 -03:00
koha-core.install Bug 33108: koha-es-indexer added 2023-03-20 09:39:45 -03:00
koha-core.links
koha-core.logrotate
koha-core.postinst Bug 32612: (QA follow-up) Remove more unneeded appender lines 2023-02-03 10:30:04 -03:00
koha-core.preinst
koha-core.templates
koha-full.postinst
koha-post-install-setup
koha.apache-ports
koha.config
koha.dirs
koha.install
koha.postinst
koha.postrm
koha.prerm
koha.README.Debian
list-deps Bug 29882: remove unrequired package definitions in list-deps script 2022-09-07 13:17:59 -07:00
README.build
rules Bug 33168: (follow-up) Swap spaces for tabs 2023-04-04 11:26:20 +02:00
unavailable.html
update-control

In order to build .deb packages, following debian packages need to be present
(installed): 
devscripts
pbuilder
dh-make
fakeroot

As root (or sudo) execute:
pbuilder create

Executing build-git-snapshot without any arguments will leave package and the
rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly
recommended that --buildresult option is used.