You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/09/03 13:54:00 UTC

[jira] [Closed] (OFBIZ-13519) security.login.externalLoginKey.enabled is never checked by checkExternalLoginKey() and cannot be changed live

     [ https://issues.apache.org/jira/browse/OFBIZ-13519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Pathak closed OFBIZ-13519.
---------------------------------
    Fix Version/s: Upcoming Branch
                   24.09.08
       Resolution: Fixed

> security.login.externalLoginKey.enabled is never checked by checkExternalLoginKey() and cannot be changed live
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-13519
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13519
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/webapp
>    Affects Versions: Upcoming Branch, 24.09.07
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Major
>             Fix For: Upcoming Branch, 24.09.08
>
>
> ExternalLoginKeysManager.isExternalLoginKeyEnabled(request) (ExternalLoginKeysManager.java:241) caches the security.login.externalLoginKey.enabled property in a private static field on first read and never re-reads it. Any later change to the property -- via the properties file, or a live SystemProperty override through webtools (which normally takes effect immediately, no restart) -- has no effect on this class for the rest of the process's life; only a JVM restart picks it up.
> Separately, checkExternalLoginKey(request, response) (ExternalLoginKeysManager.java:163) -- the consumption path wired into the default <preprocessor> chain used by the large majority of controller.xml files -- never calls isExternalLoginKeyEnabled() at all. The flag is only checked at the two key-generation call sites (RequestHandler.makeLink(), ScreenRenderer.java), never at redemption.
> Net effect: an admin who disables security.login.externalLoginKey.enabled expecting the cross-app SSO mechanism to stop live gets no change in behavior, since the consumption path was never gated by the flag in the first place, and the flag itself can't be refreshed without a restart regardless.
> Suggested fix:
> - Re-read isExternalLoginKeyEnabled per call instead of caching it for the process's lifetime (or invalidate the cached field on a SystemProperty/property-cache change).
> - Have checkExternalLoginKey() call isExternalLoginKeyEnabled(request) and short-circuit to "success" without consuming the key when disabled, mirroring the check already done at the generation sites.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)