GPT-6.1 Sol · Balanced

add-caching-support-for-identityproviderstorageprovider-getforlogin-operations-keycloak

Keycloak · Java · M · 100–299 lines · 3 files

The normal review, with one generalist agent. Judge: Claude Haiku 5.5.

Gold bugs found
0 of 2
Comments published
2
Comments matching a bug
0
Comments not matching
2
Cost of this PR
$1.004

Published comments (2)

mediumbugmodel/infinispan/src/main/java/org/keycloak/models/cache/infinispan/idp/InfinispanIdentityProviderStorageProvider.java:236-240

Cache expansion republishes invalidated login results under a fresh revision — Removed login eligibility or organization associations can remain cached if another transaction invalidates `query` before its searches are copied into `IdentityProviderListQuery`. Validate the previous revision before reusing searches, or omit them and pass `startupRevision` to `cache.addRevisioned`.

mediumbugmodel/infinispan/src/main/java/org/keycloak/models/cache/infinispan/idp/InfinispanIdentityProviderStorageProvider.java:405-406

Organization-disabled providers can retain stale login cache membership — Setting `hideOnLogin=true` while an organization is disabled can leave a provider cached and expose it when the organization is re-enabled, because `original.isEnabled()` already returns false. Copy `original` and `updated` into plain `IdentityProviderModel` instances before applying `getLoginPredicate()` to compare persisted eligibility.

Gold bugs found (0)

None.

Gold bugs missed (2)

lowThe test registers cleanup for the literal alias "alias" instead of the created IDP aliases, so the created identity providers are never cleaned up.
highAdding the organization/BROKER_PUBLIC check to the shared LoginFilter.getLoginPredicate also changes IdentityProviderBean.federatedProviderPredicate, so with organizations disabled a user's linked IdP that has an organizationId but is not public is no longer shown on the login page.