8000 Server info reports loginFailures cache as FAILED when login-failures:v2 is enabled · Issue #55572 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Server info reports loginFailures cache as FAILED when login-failures:v2 is enabled #55572

Backlog

Description

@costa-chown

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?

  1. 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.
  2. Open the admin console, user menu → Realm info → Provider info → connectionsInfinispan, or call GET /admin/serverinfo and look at providers.connectionsInfinispan.providers.default.operationalInfo.
  3. loginFailures:Cache is FAILED.

Anything else?

  • DefaultInfinispanConnectionProviderFactory: createEmbeddedCacheManager removes LOGIN_FAILURE_CACHE_NAME when LOGIN_FAILURES_V2 is enabled; addEmbeddedOperationalInfo iterates over all of CLUSTERED_CACHE_NAMES.
  • Infinispan 16.0.15 HealthImpl.getHealth returns InvalidCacheHealth when getNamedComponentRegistry(name) is null; InvalidCacheHealth.getStatus() is always FAILED.
  • A possible fix: only report caches that the cache manager defines (cacheManager.getCacheNames() / cacheExists), or skip the names removed for login-failures:v2 and stateless.

Activity

  1. costa-chown commented on Nov 26, 2026

    @costa-chown
    Author

    Fix in #55573: the server info now reports only clustered caches that have a configuration, so loginFailures no longer shows up as FAILED with login-failures:v2 (nor the removed caches with stateless). Checked on 26.8.1 with the change applied: the other caches stay HEALTHY, no loginFailures entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0