74350[FEATURE] Introduce configurable password policies
Commit message
Review
-
Code review CR +2 Done
- Oliver Hader +2
- Kevin Appelt +1
-
Verified V +2 Done
- Oliver Hader +2
- Kevin Appelt +1
- core-ci +1 CI
Issues 1
Files 16
- typo3/sysext/core/Classes/PasswordPolicy/Validator/Dto/ContextData.php2new+94 −0
- typo3/sysext/core/Classes/PasswordPolicy/Validator/AbstractPasswordValidator.php6new+111 −0
- typo3/sysext/core/Classes/PasswordPolicy/Validator/CorePasswordValidator.php1new+168 −0
- typo3/sysext/core/Classes/PasswordPolicy/Validator/NotCurrentPasswordValidator.phpnew+85 −0
- typo3/sysext/core/Classes/PasswordPolicy/PasswordPolicy.php10new+84 −0
- typo3/sysext/core/Classes/PasswordPolicy/PasswordPolicyAction.phpnew+27 −0
- typo3/sysext/core/Classes/PasswordPolicy/PasswordPolicyValidator.phpnew+89 −0
- typo3/sysext/core/Configuration/DefaultConfiguration.php4+24 −0
- typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml+6 −0
- typo3/sysext/core/Documentation/Changelog/12.0/Feature-97388-ConfigurablePasswordPolicies.rstnew+136 −0
- typo3/sysext/core/Resources/Private/Language/locallang_password_policy.xlfnew+47 −0
- typo3/sysext/core/Tests/Functional/PasswordPolicy/Validator/NotCurrentPasswordValidatorTest.phpnew+85 −0
- typo3/sysext/core/Tests/Functional/PasswordPolicy/PasswordPolicyValidatorTest.phpnew+165 −0
- typo3/sysext/core/Tests/Unit/PasswordPolicy/Validator/CorePasswordValidatorTest.phpnew+103 −0
- typo3/sysext/setup/Classes/Controller/SetupModuleController.php+39 −1
- typo3/sysext/setup/Resources/Private/Language/locallang.xlf+3 −0
Review log 6092
Show 4067 earlier messages
-
Torben Hansen uploaded patch set 1 04/18/22, 16:29
-
Torben Hansen uploaded patch set 2 04/18/22, 16:38
-
Torben Hansen uploaded patch set 3 04/18/22, 16:42
-
core-ci voted on patch set 1 V -1 04/18/22, 16:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26156
-
Oliver Klee commented on patch set 3 04/18/22, 16:47
First thoughts: In general, I think the new classes, methods and fields could use some comments on the type specifics, and on how to use the new code. (If it's hard to find out how to use the classes, they are are so useful.)NoSessionAvailableException.php:3Please let's make this file strict as well (so all new files are strict by default).PasswordPolicy.php:23Please let's have a short description for each class (where there is more to know about the class than what the class name already communicates).PasswordPolicy.php:30@param array<class-string<AbstractPasswordValidator>, array<string, mixed>> $validatorsPasswordPolicy.php:60Please let's have an @return annotation with more information about the array. -
core-ci voted on patch set 2 V -1 04/18/22, 16:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26157
-
core-ci voted on patch set 3 V -1 04/18/22, 16:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26158
-
Torben Hansen uploaded patch set 4 04/18/22, 16:57
-
Oliver Klee commented on patch set 4 04/18/22, 17:12
Oh, sorry, I missed the TODO about documenting the API. So please disregard my comments. -
core-ci voted on patch set 4 V +1 04/18/22, 17:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26159
-
Oliver Klee wrote 04/18/22, 18:54
Removed cc Oliver Klee. -
Torben Hansen rebased onto patch set 5 05/21/22, 10:22
-
core-ci voted on patch set 5 V +1 05/21/22, 10:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27371
-
Torben Hansen uploaded patch set 6 06/10/22, 17:30
-
Torben Hansen commented on patch set 6 06/10/22, 17:31
NoSessionAvailableException.php:3ReplyDonePasswordPolicy.php:23ReplyDonePasswordPolicy.php:30ReplyDonePasswordPolicy.php:60ReplyDone -
core-ci voted on patch set 6 V -1 06/10/22, 17:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27938
-
Torben Hansen rebased onto patch set 7 06/10/22, 17:48
-
core-ci voted on patch set 7 V -1 06/10/22, 17:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27939
-
Oliver Klee commented on patch set 7 06/10/22, 17:57
The unit test failure is unrelated - here's the workaround: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74871 -
Torben Hansen rebased onto patch set 8 06/11/22, 04:29
-
core-ci voted on patch set 8 V -1 06/11/22, 04:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27963
-
Torben Hansen uploaded patch set 9 06/11/22, 04:52
-
core-ci voted on patch set 9 V +1 06/11/22, 05:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27964
-
Torben Hansen uploaded patch set 10 06/12/22, 17:52
-
core-ci voted on patch set 10 V +1 06/12/22, 18:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27996
-
Torben Hansen marked it work in progress 06/13/22, 09:18
-
Torben Hansen rebased onto patch set 11 06/17/22, 10:18
-
core-ci voted on patch set 11 V +1 06/17/22, 10:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28133
-
Torben Hansen rebased onto patch set 12 06/20/22, 11:51
-
core-ci voted on patch set 12 V +1 06/20/22, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28255
-
Simon Schaufelberger rebased onto patch set 13 08/03/22, 20:54
-
core-ci voted on patch set 13 V -1 08/03/22, 21:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29803
-
Torben Hansen rebased onto patch set 14 08/10/22, 07:14
-
Torben Hansen uploaded patch set 15 08/10/22, 07:16
-
core-ci voted on patch set 15 V +1 08/10/22, 07:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29998
-
core-ci voted on patch set 14 V -1 08/10/22, 07:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29997
-
Torben Hansen rebased onto patch set 16 08/20/22, 16:49
-
core-ci voted on patch set 16 V +1 08/20/22, 16:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30333
-
Torben Hansen uploaded patch set 17 08/22/22, 17:30
-
core-ci voted on patch set 17 V -1 08/22/22, 17:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30356
-
Torben Hansen uploaded patch set 18 08/23/22, 12:19
-
core-ci voted on patch set 18 V -1 08/23/22, 12:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30375
-
Torben Hansen uploaded patch set 19 08/28/22, 12:16
-
core-ci voted on patch set 19 V +1 08/28/22, 12:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30502
-
Torben Hansen rebased onto patch set 20 08/28/22, 12:24
-
core-ci voted on patch set 20 V +1 08/28/22, 12:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30503
-
Torben Hansen rebased onto patch set 21 09/03/22, 04:22
-
core-ci voted on patch set 21 V +1 09/03/22, 04:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30608
-
Torben Hansen uploaded patch set 22 09/03/22, 11:42
-
Torben Hansen marked it ready for review 09/03/22, 11:44
-
core-ci voted on patch set 22 V +1 09/03/22, 11:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30609
-
Chris Müller uploaded patch set 23 09/03/22, 13:17
-
core-ci voted on patch set 23 V +1 09/03/22, 13:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30611
-
Torben Hansen rebased onto patch set 24 09/08/22, 07:04
-
core-ci voted on patch set 24 V +1 09/08/22, 07:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30795
-
Benni Mack commented on patch set 24 09/09/22, 10:04
AbstractPasswordValidator.php:261. Question: Should we use an interface instead of an AbstractValidator? 2. Question: Should we rely on Symfony Validator component and base everything on that? -
Torben Hansen commented on patch set 24 09/09/22, 11:40
AbstractPasswordValidator.php:26Reply> 1. Question: Should we use an interface instead of an AbstractValidator? No. The AbstractPasswordValidators contains some logic, that is required by the PasswordValidator and which would result in code duplication and possible implementation errors (e.g. forgotten htmlspecialchar() for return of requirements), if we would require 3rd party validators to implement the interface instead of extending the abstract class. Therefore also some functions in AbstractPasswordValidator has been declared as `final`, so the PasswordValidator can rely on the expected returned data. > 2. Question: Should we rely on Symfony Validator component and base everything on that? Although I like to use Symfony components, I currently do not see any real benefit of using Symfony Validator in case of the password validation component. Main reason for this is, that each Validator should also hold the message for the validators requirements, which would result in, that we again would need to create an `AbstractValidator` class based on Symfonys abstract `Constraint` mixed with our special class requirements in regards to context data (FE, BE, new username, ...). Not really the simplicity I would like to have in this area and IMO also too much if we introduce Symfony Validator just for the password validation component. -
Torben Hansen uploaded patch set 25 09/09/22, 12:43
-
core-ci voted on patch set 25 V +1 09/09/22, 12:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30930
-
Torben Hansen uploaded patch set 26 09/10/22, 11:29
-
core-ci voted on patch set 26 V +1 09/10/22, 11:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30941
-
Guido Schmechel commented on patch set 26 09/11/22, 11:55
Otherwise tested by me: Registered a new class, overwrote the policy and the requirements were also displayed in the BE. Nice implementation and, from the integrator's point of view, also a really good documentation. Great work :-)CorePasswordValidator.php:1UnresolvedWe have many repetitive labels in this class. Does it make sense to outsource these as private constants? -
Oliver Klee wrote 09/11/22, 15:05
Removed cc Oliver Klee. -
Thomas Löffler commented on patch set 26 CR +1 09/12/22, 15:14
Like it! -
Anja Leichsenring commented on patch set 27 09/19/22, 16:55
Published edit on patch set 26. -
core-ci voted on patch set 27 V +1 09/19/22, 17:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31282
-
Frank Nägler commented on patch set 27 09/21/22, 12:26
AbstractPasswordValidator.php:26Reply> also too much if we introduce Symfony Validator just for the password validation component. We use the symfony/validator package already if I remember correctly in extbase. From my point of view (and that is not a -1) we should start streamlining the validation in the core instead of implementing another validation solution. Validation happens in many places (FormEngine, Extbase, logins (FE/BE), EXT:form, ...), and everywhere a different kind of validator logic is used.
-
Torben Hansen commented on patch set 27 09/21/22, 12:50
AbstractPasswordValidator.php:26ReplyThere was a POC last year for symfony/validator in Extbase (see https://review.typo3.org/c/Packages/TYPO3.CMS/+/69689), but this has never been finished/merged nor has symfony/validator been introduced elsewhere. So we currently do not use the package anywhere. I agree, that having symfony/validator in TYPO3 core would be a nice benefit to streamline all validation in the named areas. But I would still not introduce it as part of this patch, since it would result in (much) work to manually rebase this patch every time a composer dependency in the core changes. If symfony/validator comes in seperately (and will be the main-validation component in TYPO3), I'm in and can change this patch to use symfony validators. -
Torben Hansen commented on patch set 27 09/22/22, 17:13
AbstractPasswordValidator.php:26ReplyAs discussed on slack: symfony/validator comes with an own translation handling for validation messages based on symfony/translation-contracts. So we should first have an integration of symfony/validator, where TYPO3 translation handling is considered, before we can use symfony/validator globally in TYPO3. -
Georg Ringer commented on patch set 27 09/22/22, 19:09
PasswordPolicy.php:26already used in ext:setup. I suggest to remove the comment and just leave the @internalPasswordPolicy.php:75imo can be removedContextData.php:40do we need the setters? -
Torben Hansen uploaded patch set 28 09/23/22, 06:16
-
Torben Hansen commented on patch set 28 09/23/22, 06:16
PasswordPolicy.php:26ReplyDonePasswordPolicy.php:75ReplyDoneContextData.php:40ReplyYes. I have plans to provide PSR-14 events in future implementations (e.g. password policy in DataHandler) to modify/enrich the ContextData DTO. -
core-ci voted on patch set 28 V +1 09/23/22, 06:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31473
-
Benni Mack commented on patch set 28 09/28/22, 13:52
DefaultConfiguration.php:1240let's use speaking properties for the options: * minimumLength => 8 * capitalCharacterRequired => true * lowerCaseCharacterRequired = true * digitCharacterRequired = true * specialCharacterRequired = true -
Torben Hansen rebased onto patch set 29 09/28/22, 13:57
-
core-ci voted on patch set 29 V +1 09/28/22, 14:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31662
-
Torben Hansen uploaded patch set 30 09/28/22, 14:15
-
Torben Hansen commented on patch set 30 09/28/22, 14:16
DefaultConfiguration.php:1240ReplyDone -
core-ci voted on patch set 30 V +1 09/28/22, 14:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31665
-
Benni Mack commented on patch set 30 09/28/22, 14:34
AbstractPasswordValidator.php:26ReplyDone -
Kevin Appelt voted on patch set 30 CR +1 10/02/22, 12:08
-
Oliver Hader commented on patch set 30 10/02/22, 15:57
DefaultConfiguration.php:1234Consistency: `lowerCase` but `capital` (instead of `upperCase`)? -
Oliver Hader voted on patch set 30 V +1 10/02/22, 16:14
-
Oliver Hader uploaded patch set 31 10/02/22, 16:20
-
Oliver Hader commented on patch set 31 10/02/22, 16:22
DefaultConfiguration.php:1234Reply Unresolved> Consistency: `lowerCase` but `capital` (instead of `upperCase`)? I changed this to `upperCaseCharacterRequired` now, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/74350/30..31 I hope that is okay. -
Oliver Hader voted on patch set 31 V +1 CR +1 10/02/22, 16:22
-
core-ci voted on patch set 31 V +1 10/02/22, 16:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31892
-
Kevin Appelt uploaded patch set 32 10/02/22, 18:51
-
Kevin Appelt commented on patch set 32 V +1 CR +1 10/02/22, 18:55
I only adjusted a few places where the naming was still inconsistent. capital => upper case lowercase => lower case -
core-ci voted on patch set 32 V +1 10/02/22, 19:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31907
-
Oliver Hader commented on patch set 32 V +2 CR +2 10/02/22, 20:36
Thx Kevin for adjusting the remaining parts... -
Oliver Hader merged patch set 33 10/02/22, 20:37