87391[FEATURE] Notify backend user on failed MFA verification attempts
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
-
Verified V +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/backend/Classes/EventListener/FailedMfaAttemptNotification.php10new+61 −0
- typo3/sysext/backend/Resources/Private/Templates/Email/Mfa/FailedMfaNotification.html9new+43 −0
- typo3/sysext/backend/Resources/Private/Templates/Email/Mfa/FailedMfaNotification.txtnew+19 −0
- typo3/sysext/core/Classes/Authentication/Event/MfaVerificationFailedEvent.php+5 −0
- typo3/sysext/core/Documentation/Changelog/14.0/Feature-105783-NotifyBackendUserOnFailedMFAVerificationAttempt.rst5new+28 −0
Review log 4963
Show 2938 earlier messages
-
Torben Hansen uploaded patch set 1 12/06/24, 17:41
-
core-ci voted on patch set 1 V +1 12/06/24, 17:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70719
-
Simon Schaufelberger commented on patch set 1 12/07/24, 00:32
-
Torben Hansen uploaded patch set 2
V +112/07/24, 04:44 -
Torben Hansen commented on patch set 2 12/07/24, 04:45
MfaController.php:66ReplyGood spot. I changed it to protected. -
core-ci voted on patch set 2 V +1 12/07/24, 04:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70735
-
Simon Schaufelberger uploaded patch set 3
V +112/07/24, 13:37 -
Simon Schaufelberger uploaded patch set 4 12/07/24, 13:39
-
core-ci voted on patch set 3 V +1 12/07/24, 13:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70743
-
core-ci voted on patch set 4 V +1 12/07/24, 13:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70744
-
Oliver Hader voted on patch set 4 CR +1 12/09/24, 11:45
-
Simon Schaufelberger voted on patch set 4 CR +1 V +1 12/10/24, 09:16
-
Garvin Hicking commented on patch set 4 CR +1 V +1 12/10/24, 09:59
Very nice! -
Andreas Kienast commented on patch set 4 V +1 12/10/24, 10:31
FailedMfaNotification.html:24I wonder whether it makes sense to add the server timezone as the user may have a different one. -
Torben Hansen uploaded patch set 5
CR +1V +112/10/24, 18:08 -
Torben Hansen commented on patch set 4 12/10/24, 18:08
FailedMfaNotification.html:24ReplyYes, that is a good idea. I added the shorthand timezone after the date. -
core-ci voted on patch set 5 V +1 12/10/24, 18:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70872
-
Torben Hansen uploaded patch set 6
V +112/10/24, 18:25 -
Simon Schaufelberger voted on patch set 6 CR +1 V +1 12/10/24, 18:29
-
core-ci voted on patch set 6 V +1 12/10/24, 18:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70875
-
Garvin Hicking voted on patch set 6 CR +1 V +1 12/10/24, 18:32
-
Andreas Kienast voted on patch set 6 CR +1 V +1 12/11/24, 07:34
-
Oli Bartsch commented on patch set 6 CR -1 12/12/24, 07:29
MfaController.php:138Instead of directly sending mails here, could we use the `MfaVerificationFailedEvent`?MfaController.php:250This does not belong here and should be moved to a dedicated service.Feature-105783-NotifyBackendUserOnFailedMFAVerificationAttempt.rst:23We should then also notify users on failed login attempts in general, right? -
Garvin Hicking commented on patch set 6 CR 0 12/12/24, 07:42
Feature-105783-NotifyBackendUserOnFailedMFAVerificationAttempt.rst:23ReplyA normal failed login attempt wouldn't mean that the password is compromised (which it would be in case of a mismatching MFA PIN), and where login rate limiting would apply. I'd argue this would create too much spam possibility; in that case the "positive login notification" would be more helpful for people who want to get notified (user setting "Notify me by email when somebody logs in from my account"). -
Oli Bartsch commented on patch set 6 12/12/24, 08:01
Feature-105783-NotifyBackendUserOnFailedMFAVerificationAttempt.rst:23Reply> which it would be in case of a mismatching MFA PIN Why does this mean that the password has been compromised? I think it's the same as the password. A user might just enter the wrong one, e.g. because it's expired or just transposed digits. > "Notify me by email when somebody logs in from my account" So we might just implement this instead of the notify on MFA failed attempt? -
Torben Hansen commented on patch set 6 12/12/24, 08:03
Feature-105783-NotifyBackendUserOnFailedMFAVerificationAttempt.rst:23ReplyIt is common security practice to notify a user on failed MFA attempts. This option must not be opt-in (like the suggested "Notify me..." option, which a user always must enable manually). There is basically less to none spam possibility here, since the MFA provider will be locked after 3 failed attempts. A maximum of 3 notification emails to the user in case of compromised account credentials is more than valid in order to raise awareness, that account credentials did possible leak somewhere. -
Torben Hansen uploaded patch set 7
CR +1V +112/12/24, 08:40 -
Torben Hansen uploaded patch set 8 12/12/24, 08:42
-
Torben Hansen commented on patch set 8 12/12/24, 08:43
MfaController.php:138ReplyDoneMfaController.php:250ReplyDoneFeature-105783-NotifyBackendUserOnFailedMFAVerificationAttempt.rst:23ReplyIn changed the wording in the RST, so it is more clear, that the feature is useful for backend user accounts with active MFA setup. -
core-ci voted on patch set 7 V -1 12/12/24, 08:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71012
-
Torben Hansen uploaded patch set 9 12/12/24, 08:48
-
core-ci voted on patch set 8 V -1 12/12/24, 08:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71013
-
core-ci voted on patch set 9 V +1 12/12/24, 08:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71016
-
Garvin Hicking commented on patch set 9 CR +1 V +1 12/12/24, 10:57
Thanks for the rework! -
Simon Schaufelberger commented on patch set 9 12/12/24, 12:18
MfaController.php:60please revert this useless changeFailedMfaAttemptNotification.php:39defining the event here is not necessary, or? -
Simon Schaufelberger commented on patch set 9 12/12/24, 12:21
FailedMfaAttemptNotification.php:39Replyit's also not defined in InitializeCodeEditorInEditFileForm -
Torben Hansen uploaded patch set 10
CR +1V +112/12/24, 13:02 -
Torben Hansen commented on patch set 9 12/12/24, 13:03
MfaController.php:60ReplyDoneFailedMfaAttemptNotification.php:39ReplyDone.
-
core-ci voted on patch set 10 V +1 12/12/24, 13:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71028
-
Simon Schaufelberger voted on patch set 10 CR +1 V +1 12/12/24, 13:09
-
Garvin Hicking voted on patch set 10 CR +1 V +1 12/12/24, 14:16
-
Oli Bartsch commented on patch set 10 12/12/24, 15:59
FailedMfaAttemptNotification.php:48We should prevent undefined array key access here.FailedMfaAttemptNotification.php:54Should we add the name here if available ('realName' or `username`).FailedMfaNotification.html:7Since this is dispatched for every kind of MFA, "verification code" might be misleading e.g. for passkey attempts. -
Torben Hansen uploaded patch set 11
CR +1V +112/13/24, 06:51 -
Torben Hansen commented on patch set 11 12/13/24, 06:52
FailedMfaAttemptNotification.php:48ReplyDoneFailedMfaAttemptNotification.php:54ReplyDoneFailedMfaNotification.html:7ReplyI changed the term to `multi-factor authentication` -
core-ci voted on patch set 11 V +1 12/13/24, 06:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71056
-
Garvin Hicking commented on patch set 12
V +112/13/24, 08:46Published edit on patch set 11. -
Garvin Hicking voted on patch set 12 CR +1 V +1 12/13/24, 08:48
-
core-ci voted on patch set 12 V +1 12/13/24, 08:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71060
-
Oli Bartsch uploaded patch set 13
CR +1V +112/13/24, 09:07 -
Oli Bartsch voted on patch set 13 CR +1 V +1 12/13/24, 09:07
-
core-ci voted on patch set 13 V +1 12/13/24, 09:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71061
-
Garvin Hicking voted on patch set 13 CR +1 V +1 12/13/24, 09:21
-
Guido Schmechel voted on patch set 13 CR +1 V +1 12/13/24, 20:46
-
Georg Ringer commented on patch set 13 12/15/24, 18:53
FailedMfaAttemptNotification.php:48IMO ?? is not needed, this is a DB field and not a uc field, therefore it is always set, also below with emailFailedMfaNotification.html:15IMO we should use Site name, it could be mixed with the hostname of serverFailedMfaNotification.html:24can't we use 1 f:format:date? -
Garvin Hicking commented on patch set 13 12/15/24, 21:44
FailedMfaNotification.html:24ReplyI thought the same, but the customized "ddmmyy" format is only used when no format is given. We do not (yet) have a way to append the time to the customized default date. Hence IMO we need to have two calls here for now to separate "base date" and time. -
Andreas Kienast commented on patch set 13 12/16/24, 07:21
FailedMfaAttemptNotification.php:48ReplyIt's not only about "not there", but also about having a fallback to a string value if the left-hand operand is NULL. I checked the database, both fields are not nullable by default, so it might be safe to remove null coalescing here. -
Torben Hansen uploaded patch set 14
CR +1V +112/16/24, 08:08 -
Torben Hansen commented on patch set 13 12/16/24, 08:09
FailedMfaAttemptNotification.php:48ReplyDoneFailedMfaNotification.html:15ReplyDone. I additionally added the hostname after the sitename.FailedMfaNotification.html:24ReplyNothing we can change here currently. -
core-ci voted on patch set 14 V +1 12/16/24, 08:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71162
-
Oli Bartsch voted on patch set 14 CR +1 V +1 12/16/24, 08:55
-
Garvin Hicking voted on patch set 14 CR +1 V +1 12/16/24, 10:10
-
Oli Bartsch voted on patch set 14 CR +2 V +2 12/16/24, 10:41
-
Oli Bartsch merged patch set 15 12/16/24, 10:41
MfaController.php:66