Repository navigation
Description
Area
infinispan
Bug Description
With the default feature login-failures:v2, the embedded Infinispan provider no longer defines the loginFailures cache (DefaultInfinispanConnectionProviderFactory.createEmbeddedCacheManager removes it). addEmbeddedOperationalInfo still asks Infinispan for the health of every name in CLUSTERED_CACHE_NAMES, which includes loginFailures. Infinispan returns an InvalidCacheHealth for a cache without a component registry, whose status is always FAILED.
The admin console therefore shows loginFailures:Cache = FAILED under Realm info → Provider info → connectionsInfinispan, on a healthy cluster where nothing failed. The same value is in GET /admin/serverinfo. It looks like a broken cache to anyone checking a clustered setup.
Version
26.8.1
Regression
- The issue is a regression
Since login-failures:v2 became the default (#52126 / #52128); before, the cache existed and was reported as HEALTHY.
Expected behavior
loginFailures is not listed when the cache does not exist (login-failures:v2, or stateless, which removes all clustered caches but work), or it is listed with a value that does not read as an error.
Actual behavior
"connectionsInfinispan": { "providers": { "default": { "operationalInfo": {
"clusterSize": "3",
"loginFailures:Cache": "FAILED",
"sessions:Cache": "HEALTHY",
"authenticationSessions:Cache": "HEALTHY",
...
}}}}The same with a single instance (clusterSize: 1). LOGIN_FAILURES_V2 is enabled, LOGIN_FAILURES_V1 disabled, STATELESS disabled; the table login_failure exists and nothing is logged about the cache.
How to Reproduce?
- Start Keycloak 26.8.1 in production mode with the default cache (
--cache=ispn,--cache-stack=jdbc-ping) and default features, one or more instances. - Open the admin console, user menu → Realm info → Provider info →
connectionsInfinispan, or callGET /admin/serverinfoand look atproviders.connectionsInfinispan.providers.default.operationalInfo. loginFailures:CacheisFAILED.
Anything else?
DefaultInfinispanConnectionProviderFactory:createEmbeddedCacheManagerremovesLOGIN_FAILURE_CACHE_NAMEwhenLOGIN_FAILURES_V2is enabled;addEmbeddedOperationalInfoiterates over all ofCLUSTERED_CACHE_NAMES.- Infinispan 16.0.15
HealthImpl.getHealthreturnsInvalidCacheHealthwhengetNamedComponentRegistry(name)is null;InvalidCacheHealth.getStatus()is alwaysFAILED. - A possible fix: only report caches that the cache manager defines (
cacheManager.getCacheNames()/cacheExists), or skip the names removed forlogin-failures:v2andstateless.
Metadata
Metadata
Assignees
Labels
Type
Fields
Projects
- StatusShow more project fieldsOpen
Activity
costa-chown commentedon Nov 26, 2026
Fix in #55573: the server info now reports only clustered caches that have a configuration, so
loginFailuresno longer shows up asFAILEDwithlogin-failures:v2(nor the removed caches withstateless). Checked on 26.8.1 with the change applied: the other caches stayHEALTHY, nologinFailuresentry.