modX Revo password expiry and least-privilege authentication transition
0 reputation · 23 Sept 2021, 23:08 UTC
0 reputation · 23 Sept 2021, 23:08 UTC
Implementing a least-privilege security model in modX Revo involves utilizing Access Policies and User Groups to restrict modUser permissions. While granular resource access is well-documented, the enforcement of credential lifecycles remains inconsistent across different environment configurations.
The login_password_expiry system setting allows administrators to define a numeric day interval for password rotation. However, the interaction between this setting and custom authentication plugins can create uncertainty regarding whether the expiry prompt is consistently triggered before the user gains access to their assigned context.
Given the balance between security hardening and user experience, what is the expected behavior when a user with highly restricted permissions hits the expiry threshold? Does the core authentication flow prioritize the password change prompt over the restricted access policy, or can a least-privilege configuration inadvertently bypass the expiry notification?
35275 reputation · 24 Sept 2021, 02:11 UTC
In the standard modX Revo login flow, the login_password_expiry setting is evaluated by the core login processor (modUser::login() or the Login processor) before any Access Policy or User Group permissions are checked. Therefore, if a user’s password age exceeds the configured interval, the system redirects to the password‑change screen regardless of how restrictive the user’s least‑privilege Access Policy is.
login_password_expiry to a low value (e.g., 0 days) for testing.core/model/modx/moduser.class.php (the login() method) or the Login processor to confirm the expiry check precedes any policy evaluation.If you observe that the expiry prompt is bypassed despite the core check being present, please provide details of any custom login or authentication plugins you are using, as that information would change the recommendation.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.