96556[TASK] Add authentication pipeline contracts
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Wouter Wolters +1
- Benni Mack +1
-
Verified V +2 Done
- Oli Bartsch +2
- Oliver Klee +1
- Wouter Wolters +1
- Benni Mack +1
- core-ci +1 CI
Issues 2
Files 22
- typo3/sysext/core/Classes/Attribute/AsAuthenticator.phpnew+44 −0
- typo3/sysext/core/Classes/Authentication/Pipeline/Authenticated.phpnew+53 −0
- typo3/sysext/core/Classes/Authentication/Pipeline/AuthenticationResult.phpnew+35 −0
- typo3/sysext/core/Classes/Authentication/Pipeline/AuthenticatorInterface.phpnew+38 −0
- typo3/sysext/core/Classes/Authentication/Pipeline/AuthenticatorManager.phpnew+71 −0
- typo3/sysext/core/Classes/Authentication/Pipeline/Challenge.phpnew+35 −0
- typo3/sysext/core/Classes/Authentication/Pipeline/Failure.phpnew+37 −0
- typo3/sysext/core/Classes/Authentication/Pipeline/NotApplicable.phpnew+28 −0
- typo3/sysext/core/Classes/Authentication/Pipeline/Realm.phpnew+128 −0
- typo3/sysext/core/Classes/Authentication/Principal.php+2 −2
- typo3/sysext/core/Classes/DependencyInjection/AuthenticatorPass.php2new+89 −0
- typo3/sysext/core/Configuration/Services.php+9 −0
- typo3/sysext/core/Configuration/Services.yaml+9 −0
- typo3/sysext/core/Tests/Functional/Authentication/Pipeline/AuthenticatorManagerTest.phpnew+86 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_authenticator/Classes/BlockingAuthenticator.phpnew+43 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_authenticator/Classes/HeaderAuthenticator.phpnew+50 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_authenticator/Configuration/Services.yamlnew+8 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_authenticator/composer.jsonnew+23 −0
- typo3/sysext/core/Tests/Unit/Authentication/Pipeline/AuthenticatorManagerTest.phpnew+197 −0
- typo3/sysext/core/Tests/Unit/Authentication/Pipeline/RealmTest.phpnew+147 −0
Review log 1926
Show 1 earlier messages
-
Oli Bartsch uploaded patch set 1 10/09/26, 10:18
-
core-ci voted on patch set 1 V +1 10/09/26, 10:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110581
-
Oli Bartsch rebased onto patch set 2
V +110/09/26, 13:01 -
core-ci voted on patch set 2 V -1 10/09/26, 13:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110605
-
Oli Bartsch rebased onto patch set 3
V -110/09/26, 20:49 -
core-ci voted on patch set 3 V +1 10/09/26, 21:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110718
-
Oli Bartsch uploaded patch set 4
V +110/12/26, 12:32 -
core-ci voted on patch set 4 V +1 10/12/26, 12:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110904
-
Oli Bartsch rebased onto patch set 5
V +110/12/26, 19:57 -
core-ci voted on patch set 5 V +1 10/12/26, 20:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110940
-
Benni Mack uploaded patch set 6
V +110/25/26, 13:31 -
Benni Mack commented on patch set 6 10/25/26, 13:37
I did some changes due to reworking Authorization as well: 1. Authenticators are bound to realms when they're registered. - They now register with a repeatable #[AsAuthenticator(realm: 'backend', priority: 10)]. 'frontend' covers the frontend of every site, and other names are custom realms such as 'api'. - A new compiler pass, AuthenticatorPass, builds a list of authenticators per realm, sorted by priority. It refuses services that don't implement the interface, registrations without a realm, and invalid realm names. - The manager only asks the authenticators of the requested realm, and loads them lazily from a service locator. - The old interface autoconfiguration (AsTaggedItem priority) is removed. The check that rejects a principal from another realm stays as a second line of defence. 2. supports() is gone; NotApplicable stays. 95284's legacy adapter only learns inside authenticate(), after running the old auth-service chain, that a request has no user. So only NotApplicable can express that. With realms bound at registration, the main job of supports() disappears anyway. 3. Badges are removed. Authenticated now carries attributes, like a Symfony security token: hasAttribute() and getAttribute(), which throws for an unknown name. The legacy user becomes e.g. ['legacyUser' => $user]. "Badge" stays free for the planned in-between object (the Passport). 4. AuthenticationManager is renamed to AuthenticatorManager. The token storage comes with the authorization checker commit later. -
Benni Mack voted on patch set 6 CR +1 V +1 10/25/26, 13:37
-
core-ci voted on patch set 6 V +1 10/25/26, 13:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112493
-
Wouter Wolters commented on patch set 6 10/25/26, 13:52
AuthenticatorPass.php:68! Realm::isBackend($realm) && ! Realm::isFrontend($realm) can this be used here? -
Oliver Klee voted on patch set 6 V +1 10/25/26, 14:07
-
Benni Mack commented on patch set 6 10/25/26, 17:05
AuthenticatorPass.php:68ReplyNot directly: isBackend()/isFrontend() are instance methods, and Realm::custom() refuses the reserved identifiers, so there's no Realm to ask yet. I've added Realm::fromIdentifier(), which maps a registered identifier to the backend, the general frontend or a custom realm, and the pass uses that now. No more string literals or comment there. -
Oli Bartsch commented on patch set 6 CR -1 10/25/26, 17:08
Reviewing -
Oli Bartsch uploaded patch set 7
CR +1V +110/25/26, 19:39 -
Oli Bartsch commented on patch set 7 CR +1 V +1 10/25/26, 19:40
Reply
Done -
Benni Mack voted on patch set 7 CR +1 V +1 10/25/26, 19:57
-
Wouter Wolters voted on patch set 7 CR +1 V +1 10/25/26, 20:00
-
core-ci voted on patch set 7 V +1 10/25/26, 20:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112537
-
Oliver Klee voted on patch set 7 V +1 10/25/26, 21:19
-
Oli Bartsch voted on patch set 7 CR +2 V +2 10/25/26, 22:11
-
Oli Bartsch merged patch set 8 10/25/26, 22:11