TYPO3 backend password lifetime not enforced for LDAP-authenticated users
0 reputation · 23 May 2021, 16:40 UTC
0 reputation · 23 May 2021, 16:40 UTC
We run TYPO3 (v12 LTS) with backend users split between internal accounts and accounts synchronized from LDAP. The Install Tool setting [FE][loginSecurity][password_lifetime] is configured to force periodic password changes, and internally authenticated users are correctly redirected to the password change form when their credentials expire.
Our goal is least-privilege, policy-compliant authentication: every backend account should be subject to a credential expiration boundary, regardless of which authentication service validates the login. From what we can tell, the password lifetime setting and the expiration timestamp appear to be evaluated only by the internal authentication service, so LDAP-authenticated users never see a forced password change at the TYPO3 level.
This leaves a gap in our design: should expiration be enforced by TYPO3, by the directory, or both?
Specifically:
34275 reputation · 24 May 2021, 04:23 UTC
Yes. In TYPO3 v12 LTS the password lifetime enforcement is intentionally scoped to TYPO3's own internal authentication service for backend users. It does not apply to users authenticated by an external service such as LDAP. LDAP-authenticated backend users will never be forced to change their password in the TYPO3 backend by the TYPO3 setting, because TYPO3 never validates the password itself.
Enforcement for externally authenticated accounts must live in the directory. Defense in depth is: TYPO3 lifetime for internal accounts, directory password policy for LDAP accounts.
Confirmed: TYPO3 evaluates password age via fields on the be_users record and the internal auth service. The backend equivalent of the setting you referenced is [BE][loginSecurity][passwordLifetime] in TYPO3 v12. When the internal service authenticates, TYPO3 checks the user's last password change timestamp and redirects to the forced change form.
Likely explanation for your gap: The auth service chain runs in priority order and stops at the first service that successfully authenticates. An LDAP backend auth service authenticates the bind against the directory and returns success. The internal service, and therefore the TYPO3-side expiry check, is never reached for those accounts. TYPO3 cannot rotate a password it does not store.
Yes by design. External auth services replace or precede the internal service. Password lifetime is a TYPO3-side property, not a directory property.
Yes. A sync extension that updates be_users on each login or scheduled run can overwrite or ignore the password/last-change fields. If it maps a directory attribute to password or pwd_change / password_change fields, expiry can be silently reset.
Verify this for your installation:
SELECT uid, username, password_change, tstamp FROM be_users WHERE username = 'testldap';password_change to an old date to simulate expiry.password_change or password changed back, your sync mapping overwrites TYPO3 fields.DatabaseBackendUserAuthentication service.Note: a directory expired password fails the bind. TYPO3 will not show its own password-change form. Users must change passwords via a directory-aware tool.
One diagnostic detail that changes the recommendation: which LDAP extension and auth service configuration are you using, e.g. TYPO3\CMS\Core\Authentication\AuthService priority and whether fallback to internal auth is enabled? The exact sync mapping and priority determine whether the internal service could ever run for LDAP users.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.