66630[TASK] Introduce sudo mode for install tool accessed via backend
Commit message
Review
-
Code review CR +2 Done
- Oliver Hader +2
- Markus Klein +1
- Torben Hansen +1
-
Verified V +2 Done
- Oliver Hader +2
- Markus Klein +1
- Torben Hansen +1
- TYPO3com +1 CI
Issues 1
Files 10
- typo3/sysext/core/Documentation/Changelog/9.5.x/Important-92836-IntroduceSudoModeForInstallToolAccessedViaBackend.rstnew+62 −0
- typo3/sysext/core/Tests/Acceptance/Install/Mysql/BlankPageCest.php+3 −3
- typo3/sysext/core/Tests/Acceptance/Install/Mysql/IntroductionPackageCest.php+3 −3
- typo3/sysext/core/Tests/Acceptance/Install/AbstractIntroductionPackage.php+14 −0
- typo3/sysext/install/Classes/Controller/BackendModuleController.php21+241 −12
- typo3/sysext/install/Classes/Service/SessionService.php3+2 −2
- typo3/sysext/install/Classes/ServiceProvider.php+1 −0
- typo3/sysext/install/Configuration/Backend/Routes.phpnew+14 −0
- typo3/sysext/install/Resources/Private/Language/BackendModule.xlf+21 −0
- typo3/sysext/install/Resources/Private/Templates/BackendModule/BackendUserConfirmation.html2new+71 −0
Review log 4259
Show 2434 earlier messages
-
Oliver Hader uploaded patch set 1 11/13/20, 17:44
-
Oliver Hader updated the commit message in patch set 2 11/13/20, 17:44
-
TYPO3com voted on patch set 1 V +1 11/13/20, 17:58 Completed build in 13m 49s on Fri, 13 Nov, 05:58 PM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7292
-
TYPO3com voted on patch set 2 V +1 11/13/20, 18:03 Completed build in 15m 02s on Fri, 13 Nov, 06:03 PM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7293
-
Markus Klein commented on patch set 2 11/13/20, 22:12
If I'm not mistaken, it was once decided (mainly in the docs) that words like Frontend, Backend, Install Tool and Core are proper nouns.currentlyBackendModuleController.php:78true as 3rd paramBackendModuleController.php:204should we still have this rsaauth stuff in master?SessionService.php:89be very cautious with this stuff. It took me hours fiddling around with this PHP internal (sorry) mess. I hope I remember this correctly, but calling session_status() already mangles the PHP session state somehow and in in the end the cookies are set too early or not removed or or or. If this is just a "drive by" change, I would highly suggest to NOT do this. -
Oliver Hader commented on patch set 2 11/14/20, 09:31
Reply Unresolved
Never heard about that...Reply
AckBackendModuleController.php:78ReplyAckSessionService.php:89ReplyThere is no other way doing this when relying in `SID`... in case any other process did some session handling (and took care of closing/finishing it) the game is over already... For instance ext:rsaauth split storage is putting data into its own session - thus defines `SID`. I could not find any evidence on your statement concerning `session_status()` - feel free to share your experience code-wise here... ``` echo '<?php\nvar_dump(session_status());' | php-cgi70 X-Powered-By: PHP/7.0.33 Content-type: text/html; charset=UTF-8 <pre class='xdebug-var-dump' dir='ltr'> <small>-:2:</small><small>int</small> <font color='#4e9a06'>1</font> </pre>% ``` * does not send any session cookie (use `session_start()` instead, to see the difference) * responds with `PHP_SESSION_NONE` (1) which is correct -
Oliver Hader updated the commit message in patch set 3 11/14/20, 09:31
-
Oliver Hader commented on patch set 4 11/14/20, 09:33
Published edit on patch set 3. -
Oliver Hader commented on patch set 4 11/14/20, 09:36
BackendModuleController.php:204ReplyStill can be removed later - this way it's easier to maintain back-ports to 10.4 and 9.5 -
TYPO3com voted on patch set 3 V +1 11/14/20, 09:45 Completed build in 13m 43s on Sat, 14 Nov, 09:45 AM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7299
-
TYPO3com voted on patch set 4 V +1 11/14/20, 09:51 Completed build in 16m 08s on Sat, 14 Nov, 09:51 AM Test Summary: 73621 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7300
-
Christian Kuhn commented on patch set 4 11/14/20, 11:46
BackendModuleController.php:204ReplyFine with me if that helps with the backport process. I'd however love to not see any rsaauth related code to end up in master (I don't care too much about v10 in this case): The extension has been dropped in v10, looking at https://github.com/TYPO3-CMS/rsaauth there does not even seem to exist a v10 compatible version, so I guess it would be very fine to at least kick that stuff from the master version of the patch before merge. Is that ok with you, Oli? -
Oliver Hader commented on patch set 4 11/14/20, 12:33
> Patch Set 4: > > (1 comment)BackendModuleController.php:204Replyext:rsaauth has been extracted to https://github.com/friendsOfTYPO3/rsaauth (which claims to be compatible with v10) I'm totally fine with removing those rsaauth parts from core master branch once this change is accepted -
Oliver Hader uploaded patch set 5 11/14/20, 13:01
-
Oliver Hader commented on patch set 5 11/14/20, 13:03
BackendModuleController.php:204Reply UnresolvedCreate back-ports for v10 and v9 & removed occurrences of rsaauth from master patch... -
TYPO3com voted on patch set 5 V +1 11/14/20, 13:12 Completed build in 11m 36s on Sat, 14 Nov, 01:12 PM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7304
-
Oliver Hader uploaded patch set 6 11/14/20, 15:04
-
TYPO3com voted on patch set 6 V -1 11/14/20, 15:16 Completed build in 12m 29s on Sat, 14 Nov, 03:16 PM Test Summary: 1 of 74108 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7306
-
TYPO3com voted on patch set 6 V +1 11/14/20, 15:22 Completed build in 30m 32s on Sat, 14 Nov, 03:22 PM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7306
-
Torben Hansen commented on patch set 6 V -1 11/14/20, 18:48
BackendModuleController.php:222UnresolvedAs soon as one of the auth services in the service chain require an additional security factor (e.g. OTP - e.g. ext:cf_google_authenticator or ext:sf_yubikey) or even no password (external auth service - e.g ext:openid), authentication will never be successful. Maybe we would pass an variable to authUser() to identify, that the auth request is initiated by sudo mode, so 3rd party auth services can skip the authentication (e.g. return 100)BackendModuleController.php:250Should be checked for instanceof AbstractAuthenticationService, since 3rd party extensions usually extend AbstractAuthenticationService. Currently, this ends up in an endless loop when you have a 3rd party authentication service installed which extends AbstractAuthenticationService. -
Oliver Hader commented on patch set 6 11/15/20, 12:26
BackendModuleController.php:250ReplyI see the point, and it's fortunate... external services like LDAP use the same "authentication" API as MFA extensions are doing... It would be possible to introduce a "verification" scope - however LDAP et al still would not work -
Oliver Hader commented on patch set 6 11/15/20, 12:44
BackendModuleController.php:250ReplyI checked some of those MFA apps which are only implementing for the scope of "login" (using corresponding login provider). So actually they should also check whether the current login status is `login` - if not, it's not of their business to intercept the authentication chain -
Torben Hansen commented on patch set 6 11/15/20, 13:53
BackendModuleController.php:250ReplySo you suggest that those extensions should check in e.g. authUser() as following: if ($this->login['status'] !== LoginType::LOGIN) { return 100; } If yes, I think we should add a RST to ensure extension authors of MFA auth services know how to adjust extensions, since the SUDO mode will currently not work, if an auth service is installed that does not check the login status. -
Torben Hansen commented on patch set 6 11/15/20, 18:27
BackendModuleController.php:250ReplyIf auth service processing is not fully suitable, maybe the install tool password can be used as an alternative for the users password to confirm the sudo? -
Oliver Hader uploaded patch set 7 11/15/20, 22:23
-
Oliver Hader uploaded patch set 8 11/15/20, 22:28
-
TYPO3com voted on patch set 7 V -1 11/15/20, 22:35 Completed build in 12m 11s on Sun, 15 Nov, 10:35 PM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7326
-
TYPO3com voted on patch set 8 V -1 11/15/20, 22:42 Completed build in 14m 07s on Sun, 15 Nov, 10:42 PM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7327
-
Oliver Hader commented on patch set 8 11/15/20, 22:44
BackendModuleController.php:250Reply UnresolvedChecking this part again, actually expose a bug in current chain handling (changed now). For "additional" authentication services like the extensions you mentioned, skipping seems to be fine - as long as the relevant data (the hashed password) is available statically. Any other service that involves remote processing is probably not solvable right now - there's no API for defining "re-entry points" - I bet most of these extensions (OpenID et al) are using "hacks" for the purpose of having an "alternative login form". Having a switch to use the install tool password seems to be okay (it was like that until v9). -
Oliver Hader voted on patch set 8 CR -1 11/15/20, 22:44
-
Oliver Hader uploaded patch set 9 11/15/20, 22:53
-
TYPO3com voted on patch set 9 V +1 11/15/20, 23:08 Completed build in 14m 40s on Sun, 15 Nov, 11:08 PM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7328
-
Andreas Kienast commented on patch set 9 V +1 11/16/20, 07:27
BackendModuleController.php:153Unresolvedbacken*d* userBackendModuleController.php:224This seems to be superfluous, `authUser()` is declared to return an integer already.BackendModuleController.php:274Can we use of DI here? -
Oliver Hader uploaded patch set 10 11/16/20, 09:50
-
Oliver Hader commented on patch set 10 11/16/20, 09:55
BackendModuleController.php:224Reply UnresolvedWe don't have an interface for that... thus, any service can return anythingBackendModuleController.php:274Reply UnresolvedIt would not solve anything, since the IoC pattern would not solve anything for a static component like the install tool... -
Oliver Hader uploaded patch set 11 11/16/20, 09:55
-
Oliver Hader uploaded patch set 12 11/16/20, 10:00
-
TYPO3com voted on patch set 10 V +1 11/16/20, 10:09 Completed build in 14m 40s on Mon, 16 Nov, 10:09 AM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7331
-
Andreas Kienast commented on patch set 12 11/16/20, 10:11
BackendModuleController.php:292UnresolvedIs moving this line _before_ the is_object() check intended? -
TYPO3com voted on patch set 11 V -1 11/16/20, 10:13 Completed build in 14m 06s on Mon, 16 Nov, 10:13 AM Test Summary: 1 of 74108 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7332
-
TYPO3com voted on patch set 12 V +1 11/16/20, 10:18 Completed build in 14m 55s on Mon, 16 Nov, 10:18 AM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7333
-
Oliver Hader uploaded patch set 13 11/16/20, 10:57
-
TYPO3com voted on patch set 13 V +1 11/16/20, 11:10 Completed build in 13m 23s on Mon, 16 Nov, 11:10 AM Test Summary: 73622 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7335
-
Oliver Hader uploaded patch set 14 11/16/20, 11:37
-
TYPO3com voted on patch set 14 V +1 11/16/20, 11:50 Completed build in 12m 51s on Mon, 16 Nov, 11:50 AM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7336
-
Alexander Schnitzler voted on patch set 14 V +1 11/16/20, 11:56
-
Markus Klein commented on patch set 14 11/16/20, 12:34
SessionService.php:89Reply UnresolvedAlright thanks for you digging. I'll apply the patch and do some tests with it regarding "cookie survival". -
Georg Ringer uploaded patch set 15 11/16/20, 12:39
-
Georg Ringer voted on patch set 15 V +1 CR +1 11/16/20, 12:40
-
Torben Hansen commented on patch set 15 V +1 CR +1 11/16/20, 12:44
Just one minor typo and one suggestion for UX improvement (see comment for BackendUserConfirmation.html).BackendModuleController.php:209UnresolvedMinor typo for "installt"BackendUserConfirmation.html:36Suggestion for UX improvement: Can we automatically get the focus into this field? Would save a mouse click or even several keyboard tabs when navigating with keyboard only. -
TYPO3com voted on patch set 15 V +1 11/16/20, 12:51 Completed build in 12m 02s on Mon, 16 Nov, 12:51 PM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7340
-
Georg Ringer uploaded patch set 16 11/16/20, 13:22
-
TYPO3com voted on patch set 16 V +1 11/16/20, 13:57 Completed build in 20m 08s on Mon, 16 Nov, 01:57 PM Test Summary: 73623 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7348
-
Oliver Hader commented on patch set 16 11/16/20, 13:57
BackendUserConfirmation.html:36Reply UnresolvedI tried with `autofocus` in additional attributes - it was rendered in generated HTML, however did not have any effect. Besides that I found a remark on not using `autofocus` at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#htmlattrdefautofocus I'd suggest to address that at a later point... -
Oliver Hader voted on patch set 16 CR +1 11/16/20, 14:08
-
Markus Klein voted on patch set 16 V +1 CR +1 11/16/20, 14:53
-
Torben Hansen voted on patch set 16 V +1 CR +1 11/16/20, 14:59
-
Oliver Hader commented on patch set 16 V +2 CR +2 11/16/20, 15:16
Thx folk for your reviews! :+1: -
Oliver Hader merged patch set 17 11/16/20, 15:17