-
Bug
-
Resolution: Fixed
-
Neutral
-
3.0.0
-
None
-
None
-
-
Empty show more show less
-
AdminX 25, AdminX 26 Xmas & New year, AdminX 27, AdminX 28
-
5
Context
Intermittently, some PaaS instances could not start up successfully because it could not load the expected resource at /magnolia-sso/config.yaml. See the trace below
(side note: even if magnolia started up successfully, users would not be able to log in).
Root cause is unknown at this point, might be a race condition with light-module sync, nonetheless we may take some steps to mitigate the issue.
Currently, SSO config is not reloaded in v3.
Also, the "bridge" config path (noted above) overlaps with the module config decoration mechanism. As a result, while the typical resource-loading logs may appear (with or without definition problems), we assume this doesn't affect the SsoModule class itself, and the SsoConfigYamlBridge does not depend on this mechanism.
Considered options
- Load SSO config more lazily (not directly upon startup)
- Reload SSO config by observing the resource origin for config.yaml changes (potential sync issues might cure themselves without a restart?)
- Break away from the old module-config & decoration mechanism in v3. I'd propose we rename the magnolia module to just "sso" in module descriptor, to make sure the /magnolia-sso/config.yaml file is not attempted to be loaded by the module config registry, but only by the SSO bridge.
Stack trace
[ERROR] info.magnolia.cms.filters.ServletDispatchingFilter: Unable to load servlet class info.magnolia.sso.SsoCallbackServlet : Failed to create instance of [class info.magnolia.sso.SsoCallbackServlet] info.magnolia.objectfactory.MgnlInstantiationException: Failed to create instance of [class info.magnolia.sso.SsoCallbackServlet] at info.magnolia.objectfactory.guice.GuiceComponentProvider.newInstanceWithParameterResolvers(GuiceComponentProvider.java:138) ~[magnolia-core-6.2.24.jar:?] ... Caused by: info.magnolia.objectfactory.MgnlInstantiationException: Failed to resolve param [0] of type [class info.magnolia.sso.config.Pac4jConfigProvider] at info.magnolia.objectfactory.ObjectManufacturer.resolveParameters(ObjectManufacturer.java:146) ~[magnolia-core-6.2.24.jar:?] ... Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors: 1) Error injecting constructor, info.magnolia.sso.config.SsoConfigurationException: Failed to load SSO config from path [/magnolia-sso/config.yaml] at info.magnolia.sso.config.Pac4jConfigProvider.(Pac4jConfigProvider.java:79) at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindImplementation(GuiceComponentConfigurationModule.java:160) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> info.magnolia.objectfactory.guice.GuiceComponentProviderBuilder$1 -> info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule) ... Caused by: info.magnolia.sso.config.SsoConfigurationException: Failed to load SSO config from path [/magnolia-sso/config.yaml] at info.magnolia.sso.config.SsoConfigYamlBridge.get(SsoConfigYamlBridge.java:77) ~[magnolia-sso-3.0.0.jar:?] at info.magnolia.sso.config.Pac4jConfigProvider.(Pac4jConfigProvider.java:81) ~[magnolia-sso-3.0.0.jar:?] at info.magnolia.sso.config.Pac4jConfigProvider$$FastClassByGuice$$cad0476c.newInstance() ~[magnolia-sso-3.0.0.jar:?] ... Caused by: info.magnolia.resourceloader.ResourceOrigin$ResourceNotFoundException: No resource found for path /magnolia-sso/config.yaml in origin layered at info.magnolia.resourceloader.layered.LayeredResourceOrigin.getByPath(LayeredResourceOrigin.java:114) ~[magnolia-resource-loader-6.2.24.jar:?] at info.magnolia.resourceloader.layered.LayeredResourceOrigin.getByPath(LayeredResourceOrigin.java:72) ~[magnolia-resource-loader-6.2.24.jar:?] at info.magnolia.sso.config.SsoConfigYamlBridge.get(SsoConfigYamlBridge.java:74) ~[magnolia-sso-3.0.0.jar:?] at info.magnolia.sso.config.Pac4jConfigProvider.(Pac4jConfigProvider.java:81) ~[magnolia-sso-3.0.0.jar:?] at info.magnolia.sso.config.Pac4jConfigProvider$$FastClassByGuice$$cad0476c.newInstance() ~[magnolia-sso-3.0.0.jar:?] ...
- depends upon
-
MAGNOLIA-8674 Register definition from un-registered module when loading <module_name>/config.yaml
- Closed
- relates to
-
MGNLSSO-208 Check effective/parsed configuration via debug logs
- Open
1.
|
Implement | Completed | Nguyen Phung Chi | |
2.
|
Review | Completed | Evzen Fochr | |
3.
|
QA | Completed | Nguyen Phung Chi | |
4.
|
Pre-Integration QA | Completed | Evzen Fochr |