89491[FEATURE] Introduce Sudo-Mode Events
Commit message
Review
-
Code review CR +2 Done
- Oliver Hader +2
- Benjamin Franzke +1
- Andreas Kienast +1
-
Verified V +2 Done
- Oliver Hader +2
- Benjamin Franzke +1
- Andreas Kienast +1
- core-ci +1 CI
Issues 1
Files 11
- typo3/sysext/backend/Classes/Controller/Security/SudoModeController.php3+9 −0
- typo3/sysext/backend/Classes/Hooks/DataHandlerAuthenticationContext.php+18 −6
- typo3/sysext/backend/Classes/Http/RouteDispatcher.php+12 −5
- typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessClaim.php+3 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessFactory.php+10 −4
- typo3/sysext/backend/Classes/Security/SudoMode/Access/TableAccessSubject.php+1 −1
- typo3/sysext/backend/Classes/Security/SudoMode/Event/SudoModeRequiredEvent.phpnew+42 −0
- typo3/sysext/backend/Classes/Security/SudoMode/Event/SudoModeVerifyEvent.phpnew+57 −0
- typo3/sysext/backend/Classes/ServiceProvider.php+1 −0
- typo3/sysext/backend/Tests/Unit/Http/RouteDispatcherTest.php+17 −0
- typo3/sysext/core/Documentation/Changelog/12.4.x/Feature-106743-IntroduceSudoModeEvents.rst6new+151 −0
Review log 3443
Show 1318 earlier messages
-
Oliver Hader uploaded patch set 1 05/20/25, 18:45
-
core-ci voted on patch set 1 V -1 05/20/25, 19:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79254
-
Oliver Hader commented on patch set 1 05/21/25, 06:59
Forgot the event class... -
Oliver Hader uploaded patch set 2
V -105/21/25, 06:59 -
core-ci voted on patch set 2 V -1 05/21/25, 07:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79273
-
Torben Hansen commented on patch set 2 05/21/25, 08:04
BeforeVerificationRequiredEvent.php:31I think we can use Constructor Property Promotion here. -
Oliver Hader uploaded patch set 3
V -105/22/25, 18:11 -
Oliver Hader commented on patch set 3 05/22/25, 18:13
BeforeVerificationRequiredEvent.php:31ReplyDone -
core-ci voted on patch set 3 V +1 05/22/25, 18:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79387
-
Oliver Hader commented on patch set 4
V +105/25/25, 07:30Published edit on patch set 3. -
core-ci voted on patch set 4 V +1 05/25/25, 07:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79455
-
Garvin Hicking commented on patch set 4 05/25/25, 18:37
What do you think about a more verbose name like "BeforeAuthenticationVerificationEvent" or something like that, to indicate what is being verified? First I thought it could be related to FAL or configuration integrity...? -
Georg Ringer commented on patch set 4 05/25/25, 18:39
Feature-106743-IntroduceBeforeVerificationRequiredEvent.rst:31IMO an empty line required belowFeature-106743-IntroduceBeforeVerificationRequiredEvent.rst:45should we use the attribute even though in 12.4 this is not available? or at least we need to take care about that in the backport then -
Garvin Hicking commented on patch set 4 05/25/25, 18:48
Reply
(or "BeforeStepUoVerification", "BeforeSudoAuthentication"?) -
Oliver Hader uploaded patch set 5
V +105/26/25, 09:17 -
Oliver Hader commented on patch set 5 05/26/25, 09:19
Reply
It's `BeforeStepUpAuthenticationEvent` now - I hope the scope is clearer now.Feature-106743-IntroduceBeforeVerificationRequiredEvent.rst:31ReplyDoneFeature-106743-IntroduceBeforeVerificationRequiredEvent.rst:45ReplyThx for that hint. I've dropped the PHP attribute and added an example for `Services.yaml` -
core-ci voted on patch set 5 V -1 05/26/25, 09:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79475
-
Oliver Hader commented on patch set 5 CR -1 05/26/25, 10:37
I feel like an additional event in `\TYPO3\CMS\Backend\Security\SudoMode\PasswordVerification` is missing to actually do custom step-up verifications...
-
Oliver Hader uploaded patch set 6
CR -1V -105/26/25, 12:51 -
core-ci voted on patch set 6 V -1 05/26/25, 12:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79490
-
Oliver Hader uploaded patch set 7
V -105/26/25, 13:26 -
core-ci voted on patch set 7 V +1 05/26/25, 13:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79493
-
Simon Schaufelberger commented on patch set 7 05/26/25, 16:25
Feature-106743-IntroduceSudoModeEvents.rst:91list is very old and should be changed to [] -
Oliver Hader uploaded patch set 8
V +105/26/25, 19:19 -
Oliver Hader commented on patch set 8 05/26/25, 19:20
Feature-106743-IntroduceSudoModeEvents.rst:91ReplyDone -
Oliver Hader commented on patch set 8 05/26/25, 19:20
Reply
Done -
core-ci voted on patch set 8 V +1 05/26/25, 19:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79514
-
Simon Schaufelberger wrote 05/26/25, 20:22
Removed cc Simon Schaufelberger. -
Benjamin Franzke voted on patch set 8 CR +1 V +1 05/27/25, 05:10
-
Torben Hansen voted on patch set 8 CR +1 05/27/25, 06:19
-
Oli Bartsch commented on patch set 8 05/27/25, 09:53
SudoModeVerifiedEvent.php:26Are there any benefits in using additional getter methods instead of just using public properties? Same for the other event. -
Benjamin Franzke commented on patch set 8 05/27/25, 10:43
SudoModeVerifiedEvent.php:26ReplyI guess there is no reason but consistency. I think we had this topic a few times and some mergers (do not remember who) argued we should stick with getters (unfortunately I can not find a source/link) in events for consistency. and yes, we already have exceptions and I prefer public properties as well, but I personally don't mind if someone adds code with getters at the moment…SudoModeVerifiedEvent.php:28Should we tag this with the attribute `\SensitiveParameter`? -
Oli Bartsch commented on patch set 8 05/27/25, 11:02
SudoModeVerifiedEvent.php:26ReplyAcknowledged -
Benjamin Franzke commented on patch set 8 05/27/25, 11:18
SudoModeController.php:161"Verified" implies it already happened, but it didn't yet. Shouldn't we name this `SudoModeVerifyEvent`?SudoModeVerifiedEvent.php:28Replynvm, does not help if the event object is passed as argument to another function. -
Benjamin Franzke uploaded patch set 9
CR +1V +105/27/25, 11:48 -
Benjamin Franzke commented on patch set 9 05/27/25, 11:48
SudoModeController.php:161ReplyDone -
core-ci voted on patch set 9 V +1 05/27/25, 11:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79561
-
Oliver Hader commented on patch set 9 05/27/25, 12:08
SudoModeController.php:161Reply`Verify` is better, thanks for adjusting -
Andreas Kienast commented on patch set 9 05/27/25, 13:03
Feature-106743-IntroduceSudoModeEvents.rst:88Should this be `continue` as we're in a loop handling multiple subjects? Or is it required that all subjects match the conditions?Feature-106743-IntroduceSudoModeEvents.rst:95Same applies here. -
Oliver Hader commented on patch set 9 05/27/25, 13:09
Feature-106743-IntroduceSudoModeEvents.rst:88Reply`return` is expected in this example - stop at the first occurrence of something that cannot be handledFeature-106743-IntroduceSudoModeEvents.rst:95ReplySame as above. If there is one table, that is not `be_users`, this event listener is not supposed to take any decision on all subject of the given claim. -
Andreas Kienast voted on patch set 9 CR +1 V +1 05/27/25, 13:12
-
Oliver Hader voted on patch set 9 CR +2 V +2 05/27/25, 13:22
-
Oliver Hader merged patch set 10 05/27/25, 13:23