Koha-clms/Koha
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
..
Account
…
Acquisition
…
App
…
ArticleRequest
…
Auth Bug 30843: Add mfa_range configuration option for TOTP 2023-10-05 08:36:20 -10:00
Authority
…
BackgroundJob Bug 34789: Update usage throughout Koha modules and Vue components 2023-09-18 10:27:46 -10:00
Biblio
…
BiblioUtils
…
Cache
…
Cash
…
Charges
…
Checkouts
…
Club
…
CodeList/Unimarc
…
Config
…
Course
…
Database
…
ERM Bug 34789: Update usage throughout Koha modules and Vue components 2023-09-18 10:27:46 -10:00
Edifact
…
Exceptions Bug 32942: (QA follow-up) Moving Suggestion->STATUS check to Suggestion::store 2023-09-20 20:01:17 -10:00
Exporter
…
ExternalContent
…
Filter/MARC
…
Hold
…
Illrequest
…
Import
…
Indexer
…
Item
…
Library
…
List
…
MetadataRecord
…
Middleware
…
Misc
…
Notice
…
Number
…
OAI/Server
…
Object
…
Objects
…
Old Bug 34609: Add biblio method to Old::Hold 2023-09-07 14:35:37 -10:00
Patron Bug 34731: (follow-up) Fix conditional variable declaration 2023-09-14 07:54:48 -10:00
Patrons Bug 34617: Preserve calculated expiration dates if set to update on import whether column included or not 2023-09-07 20:09:53 -10:00
Plugins
…
REST Bug 30843: Add mfa_range configuration option for TOTP 2023-10-05 08:36:20 -10:00
RecordProcessor
…
Result
…
SMS
…
SMTP Bug 34622: Fix store default query 2023-09-20 20:06:10 -10:00
Schema Bug 34789: DBIC file 2023-09-18 10:27:46 -10:00
SearchEngine Bug 33406: Filter out some known isolated trouble makers 2023-09-17 22:49:50 -10:00
Serial
…
Sitemapper
…
Subscription
…
SuggestionEngine
…
Tags
…
Template/Plugin
…
Ticket
…
UI Bug 34266: Default to biblioitems.itemtype only if it's a valid itemtype 2023-09-07 20:11:04 -10:00
Util
…
XSLT
…
Z3950Responder
…
pdfformat
…
Account.pm Bug 34620: Do not throw expection if payment type is writeoff 2023-09-07 20:42:15 -10:00
ActionLog.pm
…
ActionLogs.pm
…
AdditionalContent.pm
…
AdditionalContents.pm
…
AdditionalField.pm
…
AdditionalFieldValue.pm
…
AdditionalFieldValues.pm
…
AdditionalFields.pm
…
AdvancedEditorMacro.pm
…
AdvancedEditorMacros.pm
…
ApiKey.pm
…
ApiKeys.pm
…
ArticleRequest.pm
…
ArticleRequests.pm
…
AudioAlert.pm
…
AudioAlerts.pm
…
AuthUtils.pm
…
AuthorisedValue.pm
…
AuthorisedValueCategories.pm
…
AuthorisedValueCategory.pm
…
AuthorisedValues.pm
…
Authorities.pm
…
Authority.pm
…
BackgroundJob.pm
…
BackgroundJobs.pm
…
Biblio.pm
…
BiblioFramework.pm
…
BiblioFrameworks.pm
…
BiblioUtils.pm
…
Biblioitem.pm
…
Biblioitems.pm
…
Biblios.pm
…
Cache.pm
…
Caches.pm
…
Calendar.pm
…
Checkout.pm
…
Checkouts.pm
…
CirculationRule.pm
…
CirculationRules.pm Bug 32271: (QA follow-up) Correction to 'can_be_blank' logic 2023-08-07 20:05:46 -10:00
Cities.pm
…
City.pm
…
ClassSortRule.pm
…
ClassSortRules.pm
…
ClassSource.pm
…
ClassSources.pm
…
ClassSplitRule.pm
…
ClassSplitRules.pm
…
Club.pm
…
Clubs.pm
…
Config.pm
…
CookieManager.pm
…
Course.pm
…
Courses.pm
…
CoverImage.pm
…
CoverImages.pm
…
CsvProfile.pm
…
CsvProfiles.pm
…
CurbsidePickup.pm
…
CurbsidePickupIssue.pm
…
CurbsidePickupIssues.pm
…
CurbsidePickupOpeningSlot.pm
…
CurbsidePickupOpeningSlots.pm
…
CurbsidePickupPolicies.pm
…
CurbsidePickupPolicy.pm
…
CurbsidePickups.pm
…
Database.pm
…
DateUtils.pm
…
Desk.pm
…
Desks.pm
…
EDI.pm
…
Edifact.pm
…
Email.pm
…
Encryption.pm
…
Exception.pm
…
Exceptions.pm
…
ExternalContent.pm
…
FrameworkPlugin.pm
…
Hold.pm Bug 34333: Add Koha::Hold->cancellation_requested 2023-09-18 11:42:11 -10:00
Holds.pm
…
I18N.pm
…
Illbackend.pm Bug 34223: (follow-up) Ensure consistent ordering of statuses 2023-09-14 08:23:44 -10:00
Illcomment.pm
…
Illcomments.pm
…
Illrequest.pm
…
Illrequestattribute.pm
…
Illrequestattributes.pm
…
Illrequests.pm
…
ImportBatch.pm
…
ImportBatchProfile.pm
…
ImportBatchProfiles.pm
…
ImportBatches.pm
…
Item.pm Bug 34787: Fix typo gorup 2023-09-17 22:37:39 -10:00
ItemType.pm
…
ItemTypes.pm
…
Items.pm
…
KeyboardShortcut.pm
…
KeyboardShortcuts.pm
…
Libraries.pm
…
Library.pm
…
Linktracker.pm
…
Localization.pm
…
Localizations.pm
…
Logger.pm
…
Manual.pm
…
MarcOverlayRule.pm
…
MarcOverlayRules.pm
…
MarcSubfieldStructure.pm
…
MarcSubfieldStructures.pm
…
MessageAttribute.pm
…
MessageAttributes.pm
…
MetaSearcher.pm
…
MetadataIterator.pm
…
MetadataRecord.pm
…
MoreUtils.pm
…
OAuth.pm
…
OAuthAccessToken.pm
…
OAuthAccessTokens.pm
…
Object.pm
…
Objects.pm
…
Patron.pm Bug 34731: Don't call SendQueuedMessages if message_id is bad 2023-09-14 07:54:48 -10:00
Patrons.pm
…
Plugins.pm
…
ProblemReport.pm
…
ProblemReports.pm
…
PseudonymizedTransaction.pm
…
PseudonymizedTransactions.pm
…
Quote.pm
…
Quotes.pm
…
RDF.pm
…
Rating.pm
…
Ratings.pm
…
Recall.pm
…
Recalls.pm
…
RecordProcessor.pm
…
Report.pm
…
Reports.pm
…
Review.pm
…
Reviews.pm
…
Schema.pm
…
Script.pm
…
SearchEngine.pm
…
SearchField.pm
…
SearchFields.pm
…
SearchFilter.pm
…
SearchFilters.pm
…
SearchMarcMap.pm
…
SearchMarcMaps.pm
…
Serial.pm
…
Serials.pm
…
SharedContent.pm
…
SimpleMARC.pm
…
Sitemapper.pm
…
Statistic.pm
…
Statistics.pm
…
StockRotationItem.pm
…
StockRotationItems.pm
…
StockRotationRota.pm
…
StockRotationRotas.pm
…
StockRotationStage.pm
…
StockRotationStages.pm
…
Subscription.pm
…
Subscriptions.pm
…
Suggestion.pm Bug 32942: (follow-up) Restore missing statuses 2023-09-20 20:01:18 -10:00
SuggestionEngine.pm
…
Suggestions.pm
…
Tag.pm
…
Tags.pm
…
Ticket.pm Bug 34731: Don't call SendQueuedMessages if message_id is bad 2023-09-14 07:54:48 -10:00
Tickets.pm
…
Token.pm Bug 34163: Handle both anonymous userenv when generating CSRF tokens 2023-09-14 07:58:01 -10:00
TrackedLink.pm
…
TrackedLinks.pm
…
UploadedFile.pm
…
UploadedFiles.pm
…
Uploader.pm
…
Virtualshelf.pm
…
Virtualshelfcontent.pm
…
Virtualshelfcontents.pm
…
Virtualshelfshare.pm
…
Virtualshelfshares.pm
…
Virtualshelves.pm
…
Z3950Responder.pm
…
Z3950Server.pm
…
Z3950Servers.pm
…