[MGNLSSO-316] Invalidating/reloading SSO Yaml Config doesn't work Created: 18/Oct/23  Updated: 20/Oct/23  Resolved: 19/Oct/23

Status: Closed
Project: Single Sign On
Component/s: None
Affects Version/s: 3.1.7
Fix Version/s: 3.1.8

Type: Bug Priority: Neutral
Reporter: Nguyen Phung Chi Assignee: Evzen Fochr
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by MGNLSSO-265 Possibility to implement custom SsoCo... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Epic Link: SSO maintenance
Team: AdminX
Work Started:
Approved:
Yes

 Description   

Context

The reloading/invalidating SSO config mechanism was introduced in MGNLSSO-265, however it doesn't work due to the type check on the interface doesn't work https://git.magnolia-cms.com/projects/ENTERPRISE/repos/magnolia-sso/browse/magnolia-sso/src/main/java/info/magnolia/sso/config/Pac4jConfigProvider.java#99-105

Proposed solution

Some ideas we could do:

  • The reloading logic can extracted out of the provider and explicitly injected into the target codeĀ 
  • Split ConfigProvider into a ConfigReloader and ConfigProvider
  • Completely isolate the reloading logic out of e.g. Pac4jConfigProvider : whenever a computed pac4j config is needed - one can just consult the SSOConfig provider and check if the last resolved sso config equals the currently provided (and if not - update/re-resolve pac4j)
  • and all the resource origin listening logic can be concealed within sso provider itself

Generated at Mon Feb 12 10:53:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.