You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Data Sharing Framework has an Inverted Time Comparison in OIDC JWKS and Token Cache
Moderate severity
GitHub Reviewed
Published
Apr 14, 2026
in
datasharingframework/dsf
•
Updated Apr 15, 2026
DSF BPE Server API v2 process plugins using FHIR client connections with configured OIDC authentication.
Summary
The OIDC JWKS and Metadata Document caches used an inverted time comparison (isBefore instead of isAfter), causing the cache to never return cached values. Every incoming request triggered a fresh HTTP fetch of the OIDC Metadata Document and JWKS keys from the OIDC provider.
The OIDC token cache for the FHIR client connections used an inverted time comparison (isBefore instead of isAfter), causing the cache to never invalidate. Every incoming request returned the same OIDC token even if expired.
Impact
Performance: Every OIDC-authenticated request added network round-trips to the OIDC provider, increasing latency
Reliability: Cached OIDC tokens become unusable after expiration and can only be invalidated by restart of the BPE.
If the OIDC provider is temporarily unreachable, all requests fail immediately instead of using cached keys
Load: Unnecessary load on the OIDC provider, potentially causing rate limiting
Fix (commits 31c2e974d, d3ca59b4d)
Fixed cache timeout comparison from isBefore to isAfter in BaseOidcClientWithCache (configuration and JWKS caches) and OidcClientWithCache (configuration, JWKS, and access token caches)
Added configurable cache timeouts via dev.dsf.server.auth.oidc.provider.client.cache.timeout.configuration.resource and dev.dsf.server.auth.oidc.provider.client.cache.timeout.jwks.resource (default: PT1H)
The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated.
Learn more on MITRE.
Affected Components
Summary
isBeforeinstead ofisAfter), causing the cache to never return cached values. Every incoming request triggered a fresh HTTP fetch of the OIDC Metadata Document and JWKS keys from the OIDC provider.isBeforeinstead ofisAfter), causing the cache to never invalidate. Every incoming request returned the same OIDC token even if expired.Impact
If the OIDC provider is temporarily unreachable, all requests fail immediately instead of using cached keys
Fix (commits 31c2e974d, d3ca59b4d)
isBeforetoisAfterinBaseOidcClientWithCache(configuration and JWKS caches) andOidcClientWithCache(configuration, JWKS, and access token caches)dev.dsf.server.auth.oidc.provider.client.cache.timeout.configuration.resourceanddev.dsf.server.auth.oidc.provider.client.cache.timeout.jwks.resource(default:PT1H)References