90099[FEATURE] Allow to utilize password validators in Install Tool
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Georg Ringer +1
- Guido Schmechel +1
- Lina Wolf +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Garvin Hicking +2
- Georg Ringer +1
- Guido Schmechel +1
- Lina Wolf +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 3
Files 13
- Build/Scripts/setupAcceptanceComposer.sh+2 −2
- Build/Sources/TypeScript/install/module/password-strength.ts+2 −0
- typo3/sysext/core/Classes/PasswordPolicy/PasswordPolicyAction.php+1 −0
- typo3/sysext/core/Classes/PasswordPolicy/PasswordService.php9new+58 −0
- typo3/sysext/core/Classes/ServiceProvider.php+6 −0
- typo3/sysext/core/Configuration/DefaultConfiguration.php+14 −0
- typo3/sysext/core/Documentation/Changelog/14.1/Feature-90099-AllowToUtilizePasswordValidatorsInInstallTool.rstnew+72 −0
- typo3/sysext/core/Tests/Acceptance/Application/InstallTool/AbstractCest.php+1 −1
- typo3/sysext/install/Classes/Command/PasswordSetCommand.php5+50 −3
- typo3/sysext/install/Classes/Controller/SettingsController.php+6 −3
- typo3/sysext/install/Classes/ServiceProvider.php+5 −1
- typo3/sysext/install/Resources/Private/Templates/Login/ShowLogin.fluid.html+3 −0
- typo3/sysext/install/Tests/Functional/Command/PasswordSetCommandTest.php+86 −4
Review log 5981
Show 3756 earlier messages
-
Garvin Hicking uploaded patch set 1 07/18/25, 22:26
-
Garvin Hicking updated the commit message in patch set 2 07/18/25, 22:31
-
core-ci voted on patch set 1 V -1 07/18/25, 22:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81940
-
core-ci voted on patch set 2 V -1 07/18/25, 22:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81941
-
Garvin Hicking updated the commit message in patch set 3
V -107/19/25, 09:10 -
core-ci voted on patch set 3 V -1 07/19/25, 09:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81957
-
Rozbeh Chiryai Sharahi uploaded patch set 4
V -107/19/25, 09:27 -
core-ci voted on patch set 4 V +1 07/19/25, 09:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81958
-
Rozbeh Chiryai Sharahi uploaded patch set 5
V +107/19/25, 10:39 -
core-ci voted on patch set 5 V -1 07/19/25, 10:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81959
-
Rozbeh Chiryai Sharahi uploaded patch set 6
V -107/19/25, 10:58 -
core-ci voted on patch set 6 V -1 07/19/25, 11:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81960
-
Garvin Hicking uploaded patch set 7
V -107/21/25, 08:54 -
core-ci voted on patch set 7 V -1 07/21/25, 09:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82034
-
Garvin Hicking uploaded patch set 8
V -107/21/25, 09:36 -
Garvin Hicking uploaded patch set 9 07/21/25, 09:39
-
core-ci voted on patch set 8 V -1 07/21/25, 09:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82042
-
core-ci voted on patch set 9 V -1 07/21/25, 09:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82043
-
Garvin Hicking commented on patch set 10
V -107/21/25, 11:26Published edit on patch set 9. -
Garvin Hicking commented on patch set 11 07/21/25, 11:27
Published edit on patch set 10. -
Garvin Hicking commented on patch set 12 07/21/25, 11:29
Published edit on patch set 11. -
core-ci voted on patch set 10 V -1 07/21/25, 11:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82059
-
core-ci voted on patch set 11 V -1 07/21/25, 11:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82060
-
core-ci voted on patch set 12 V -1 07/21/25, 11:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82061
-
Garvin Hicking uploaded patch set 13
V -107/21/25, 12:46 -
core-ci voted on patch set 13 V +1 07/21/25, 12:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82062
-
Garvin Hicking uploaded patch set 14
V +107/21/25, 14:32 -
core-ci voted on patch set 14 V +1 07/21/25, 14:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82067
-
Torben Hansen commented on patch set 14 07/21/25, 17:29
PasswordPolicyUsage.php:24I'm not sure, if we need this enum. Actually, the ` $GLOBALS['TYPO3_CONF_VARS']['SYS']['passwordPolicies']` contains password policies (defined as an array). I)t can for example contain a password policy for frontend and a different for backend users. Naming is totally free here (e.g. users may call ot `foo-password-policy`), so having a dedicated enum for just 2 usecases seems too much IMO. Additionally, the name of the class does not reflect the real scope of the used strings. -
Garvin Hicking commented on patch set 14 07/21/25, 17:50
PasswordPolicyUsage.php:24ReplyMy reasoning here was that "default" already is more of an identifier than a random string and I wanted to ensure certain "hardcoded" strings to be identifically and typed for the PasswordService class, also so that in the future we could distinguish between user-space entries and core-space entries. Do you maybe have a better classname? Naming things is hard. ;-) -
Garvin Hicking updated the commit message in patch set 15
V +107/26/25, 19:28 -
core-ci voted on patch set 15 V +1 07/26/25, 19:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82363
-
Rozbeh Chiryai Sharahi commented on patch set 15 CR +1 V +1 08/08/25, 09:46
Tested settings password via cli and via install tool (logged-in and via /typo3/install.php) Also having a install-tool configured in additional.php causes an error and abort as intended by code. -
Rozbeh Chiryai Sharahi commented on patch set 15 CR 0 V 0 08/08/25, 09:53
ShowLogin.html:60This should be bin/typo3 install:password:set -
Rozbeh Chiryai Sharahi uploaded patch set 16
V +108/08/25, 09:55 -
Rozbeh Chiryai Sharahi commented on patch set 16 CR +1 V +1 08/08/25, 09:56
ShowLogin.html:60ReplyDone -
core-ci voted on patch set 16 V +1 08/08/25, 10:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83006
-
Rozbeh Chiryai Sharahi commented on patch set 16 CR 0 V 0 08/08/25, 10:04
PasswordPolicyUsage.php:24ReplyI am fine with having an ENUM for those default keys, however ... If the password-policies array is supposed to be extendible to anything more than install, backend, frontend, the enum might cause a problem on PasswordService as the service has the enum as parameter type. In such case it would not be possible to use password-service for anything else than those enum cases. -
Rozbeh Chiryai Sharahi commented on patch set 16 08/08/25, 10:32
PasswordPolicyUsage.php:24ReplyPasswordPolicy class currently uses the enum PasswordPolicyAction. I think in current state of the class PasswordPolicy any additional password-policy-usage is anyway hard to achieve, as it would most probably lead to the need of a new PasswordPolicyAction, unless you can by chance reuse one of those actions. Should we address that? One idea without big impact: Do not use enums as parameter types (for instance PasswordPolicy and PasswordService) -
Rozbeh Chiryai Sharahi uploaded patch set 17
V +108/08/25, 10:38 -
core-ci voted on patch set 17 V +1 08/08/25, 10:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83007
-
Elias Häußler commented on patch set 17 08/29/25, 07:49
PasswordService.php:29Would it be useful to start using the `#[\SensitiveParameter]` attribute here (and in line 46 as well)? -
Garvin Hicking commented on patch set 17 08/29/25, 08:28
PasswordService.php:29ReplyGood idea, need to look into this. Thanks! -
Stefan Froemken commented on patch set 18
V +108/29/25, 12:12Published edit on patch set 17. -
Stefan Froemken commented on patch set 18 08/29/25, 14:17
PasswordService.php:43Remove "return" annotations if it has no additional informationPasswordService.php:51PasswordPolicyValidator has state, but is not declared as shared:false. Should we add that or should we switch to "new" here?PasswordSetCommand.php:76Regardless of equal or non-equal passwords in these files: after setting the new password you still can not login into the InstallTool. That's why I prefer to move that check AFTER setting the new password and inform the user accordingly.Services.yaml:45Why? You don't load it via GeneralUtility -
Garvin Hicking uploaded patch set 19 09/10/25, 14:18
-
Georg Ringer commented on patch set 19 09/10/25, 14:28
Feature-90099-AllowToUtilizePasswordValidatorsInInstallTool.rst:53I would suggest to remove that "feature" and throw an exception if no validators are configured! It could be still possible to then adopt the minimumlength to e.g. 3 or so but this requires specific actions - removing all validators could happen easier by accident -
Garvin Hicking commented on patch set 19 09/10/25, 14:29
PasswordPolicyUsage.php:24ReplyAfter some more rounds of sleep I think the ENUM also does introduce more trouble than it tries to solve, I've removed it from the implementation.PasswordService.php:29ReplyDonePasswordService.php:43ReplyDonePasswordService.php:51ReplyI would like to address this in a dedicated patch.PasswordSetCommand.php:76ReplyHm, I think changing the password in a case where this is not effective is not good; it would create a non-effective change. Changing the password would need to be done in a different file, so this is a hard failure in my eyes.Services.yaml:45ReplyDone -
Garvin Hicking commented on patch set 19 09/10/25, 14:30
Feature-90099-AllowToUtilizePasswordValidatorsInInstallTool.rst:53ReplyIMO it's a valid usecase in dev environments to remove the validators... -
core-ci voted on patch set 19 V +1 09/10/25, 14:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84785
-
Torben Hansen commented on patch set 19 09/11/25, 06:09
Feature-90099-AllowToUtilizePasswordValidatorsInInstallTool.rst:53ReplyYes, this is a valid use case and unsetting a password policy should have impact in all places, where password policies are used. -
Stefan Froemken commented on patch set 19 V -1 09/12/25, 07:17
I have updated the installTool validators to my needs. 24 chars minimum. If I now use the CLI to set a new auto-generated password, the command will fail, as auto-generation will not use the validator settings to provide a new password: ➜ typo3_git git:(main) ddev typo3 install:password:set Password (leave empty for auto generation): Generated password: ;l4{F91?S4=3J\i- Your password could not be used. The following validation rules did not pass: - The password is too short. Minimum length is 24 chars (corePasswordValidator.minimumLength) Failed to run typo3 install:password:set: exit status 1PasswordService.php:33Why does php-cs-fixer does not complain about the missing comma here anymore?! -
Garvin Hicking commented on patch set 20
V +109/12/25, 07:51Published edit on patch set 19. -
Garvin Hicking commented on patch set 20 09/12/25, 07:52
Reply
Hm that is a conceptual problem of course. A validator only validates, but does not generate. So we have no idea of what a validator might check and how to generate something that matches. We could do that for the core validator with the "minimumlength" option though. Would that be sufficient? I think auto generation still has its use, and at least the command says that it fails like that.... Do you have suggestions maybe?PasswordService.php:33ReplyI think it only enforces it for array keys and not method parameters. I'll update this though, thanks. -
Garvin Hicking commented on patch set 20 09/12/25, 07:54
Reply
Hm, additional configured validators might override the minimum length, so that would also be half-complete. Maybe we should better allow a config directive to set the length of the generated password?! -
core-ci voted on patch set 20 V +1 09/12/25, 08:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84887
-
Stefan Froemken commented on patch set 20 09/12/25, 14:31
Reply
You're right, the password length should **not** be read from validator configuration. The validators are part of user entered passwords and not part of auto-generated passwords. The validator options should never be part of the auto-generated password. It should never happen that someone disables an option and we deliver insecure passwords for installtool. And, if we allow configuring the length, it still should never be less than TYPO3 default of 16 chars. Ideas: * Deactivate validators for auto-generated passwords * Add a console srgument to set the length of auto-generated passwords (> 16 chars). Needs Feature RST * Add a new option in passwordPolicies to set the length of auto-generated passwords (> 16 chars). Needs Feature RST -
Garvin Hicking commented on patch set 20 09/12/25, 15:04
Reply
Your list sounds good to me, I'll try to find time to implement this here! Thank you! -
Garvin Hicking uploaded patch set 21
V +112/12/25, 10:31 -
Garvin Hicking commented on patch set 21 12/12/25, 10:32
Reply
I've now adjusted this. A new "--pasword-length" argument is now available for this to affect password generator autocreation.Feature-90099-AllowToUtilizePasswordValidatorsInInstallTool.rst:53ReplyDone -
core-ci voted on patch set 21 V +1 12/12/25, 10:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92127
-
Lina Wolf commented on patch set 21 CR +1 V +1 12/12/25, 11:55
Tested both the console command and the install tool function. In the install tool, the error messages are hard to see but this is not related to this change -
Guido Schmechel commented on patch set 21 12/12/25, 18:44
Just a minor detail. But basically everything worked out for me and the +1 will follow in the next run :-)validation -
Garvin Hicking updated the commit message in patch set 22
CR +1V +112/12/25, 18:55 -
core-ci voted on patch set 22 V +1 12/12/25, 19:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92163
-
Guido Schmechel voted on patch set 22 CR +1 V +1 12/12/25, 19:18
-
Lina Wolf voted on patch set 22 CR +1 V +1 12/13/25, 02:08
-
Garvin Hicking commented on patch set 22 12/14/25, 18:32
Reply
Done -
Rozbeh Chiryai Sharahi voted on patch set 22 CR +1 01/10/26, 10:46
-
Simon Schaufelberger commented on patch set 22 01/10/26, 16:35
PasswordSetCommand.php:40why suddenly protected? This is a final class and can't be extended. -
Garvin Hicking commented on patch set 22 01/10/26, 17:39
PasswordSetCommand.php:40ReplyI think this is due to the merge automatics after the protected>private patch spree was merged. A bit odd though, I'd have expected a merge conflict then. Meh. Guess I have to lose all votes now 😭 -
Garvin Hicking uploaded patch set 23
CR +1V +101/10/26, 17:56adjuts private vs protected -
Garvin Hicking commented on patch set 23 01/10/26, 17:57
PasswordSetCommand.php:40ReplyDone -
core-ci voted on patch set 23 V +1 01/10/26, 18:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93214
-
Simon Schaufelberger voted on patch set 23 CR +1 V +1 01/10/26, 19:06
-
Guido Schmechel voted on patch set 23 CR +1 V +1 01/10/26, 20:34
-
Georg Ringer voted on patch set 23 CR +1 V +1 01/12/26, 22:36
-
Lina Wolf voted on patch set 23 CR +1 V +1 01/14/26, 09:19
-
Elias Häußler wrote 01/14/26, 09:28
Removed cc Elias Häußler. -
Garvin Hicking voted on patch set 23 CR +2 V +2 01/14/26, 10:17
-
Garvin Hicking merged patch set 24 01/14/26, 10:17