Commit graph

939 commits

Author SHA1 Message Date
Marek Posolda
18dbc74960
Adding namespaces for single-use cache entries for PAR and OAuth code (#471) (#47798)
closes #47719
closes CVE-2026-4282
closes CVE-2026-4325


(cherry picked from commit 9046f20112)

Signed-off-by: mposolda <mposolda@gmail.com>
2026-04-07 11:13:35 +02:00
RafaelWO
b6743de80d Add createdAfter/createdBefore filter to GET /admin/realms/{realm}/users
Add server-side filtering of users by creation timestamp on the admin
REST API. This avoids the need to retrieve all users and filter
client-side, which is inefficient for large realms.

Two optional query parameters are added to both the user list and count
endpoints. They accept either ISO-8601 date strings (yyyy-MM-dd) or
epoch milliseconds, consistent with the existing events API date
filtering via DateUtil.

Closes #43829

Signed-off-by: RafaelWO <weingartner.rafael@hotmail.com>
2026-04-06 10:10:54 -03:00
Alexey Skosyrskiy
56cdb6b8ef Optimize composite client role mappings endpoint and migrate test
Pre-compute the full effective role set once in
ClientRoleMappingsResource.getCompositeClientRoleMappings() using
RoleUtils.getDeepRoleMappings(), then filter by client. This replaces
the previous O(C*M*D) approach of calling user.hasRole() for every
client role, which recursively expanded composites without memoization.

RoleUtils.getDeepRoleMappings(RoleMapperModel) is introduced to handle
both RoleMapperModel implementations correctly: UserModel includes
group-inherited roles (matching UserModel.hasRole() semantics), while
GroupModel expands only its direct composite mappings.

The CompositeClientRoleMappingsTest is migrated from the deprecated
Arquillian framework to the new Keycloak test framework (JUnit 5).

Signed-off-by: Alexey Skosyrskiy <askosyrskiy@metropolis.io>
2026-03-25 17:24:16 -03:00
rmartinc
e9b27d04f5 Add option to store tokens in session for Identity Providers
Closes #47185

Signed-off-by: rmartinc <rmartinc@redhat.com>
2026-03-24 19:22:43 +01:00
Giuseppe Graziano
865edcea36 Client policies for identity brokering api
Closes #46585

Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com>
2026-03-24 19:00:51 +01:00
Pedro Igor
aba0b71ea2
Enforce realm admin roles and permission when managing resources
Some checks are pending
Weblate Sync / Trigger Weblate to pull the latest changes (push) Waiting to run
Closes #47072

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2026-03-17 20:30:25 +01:00
Peter Skopek
d11136f671 Separate password and OTP brute force protection to prevent OTP bypass attacks by default
Closes #46164

Signed-off-by: Peter Skopek <peter.skopek@ibm.com>

Update model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/changes/remote/updater/loginfailures/LoginFailuresUpdater.java

Co-authored-by: Pedro Ruivo <pruivo@users.noreply.github.com>
Signed-off-by: Peter Skopek <peter.skopek@ibm.com>

Add recovery codes to the list of brute force checked authenticators.

Closes #46164
Signed-off-by: Peter Skopek <peter.skopek@ibm.com>
2026-03-17 18:57:37 +01:00
Pedro Igor
f61822f15f
Brief user representation should not return attributes
Closes #46296

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2026-03-12 14:07:41 +01:00
vramik
3db694ca5b Search for organization group membership ignores search param
Closes #47051

Signed-off-by: vramik <vramik@redhat.com>
2026-03-11 10:26:27 -03:00
Martin Kanis
a6b31e879f
SCIM Track the last time a resource was modified
Closes #46223

Signed-off-by: Martin Kanis <mkanis@redhat.com>
2026-03-10 14:41:07 +01:00
Pedro Igor
884e46d125
Enable and disable SCIM API to a realm through the administration console
Closes #46755

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2026-03-03 10:16:30 +01:00
Stefan Guilhen
857b0e6925
Add support for filtering on SCIM endpoints
Closes #46221

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2026-02-27 12:20:01 -03:00
Thomas Darimont
2a7495b4f5
Allow specifying max allowed expiration of federated client assertion in the Identity Provider settings (#46629)
Some checks failed
Weblate Sync / Trigger Weblate to pull the latest changes (push) Has been cancelled
* Add support to specify max expiration time for client assertions in Identity Provider settings (#46304, #46626, #46627)

We now support the configuration of max client assertion expiration time for the following providers:
- OIDC Identity Provider
- SPIFFE Identity Provider
- Kubernetes Identity Provider

Added testFederatedClientAssertionMaxExpiration test.
Added UI test for saving and retrieving fedClientAssertionMaxExp for Kubernetes Identity Provider.

Fixes #46304 (SPIFFE)
Fixes #46626 (Kubernetes)
Fixes #46627 (OIDC)

Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>

* Move client auth tests to AbstractBaseClientAuthTest

This allows testing base, Kubernetes and Spiffe implementations.

Fixes #46630

Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>

---------

Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>
2026-02-27 07:05:10 +00:00
Vlasta Ramik
46f648dc95
Ability to retrive subgroups count for organization groups (#46534)
Closes #46445

Signed-off-by: vramik <vramik@redhat.com>
2026-02-24 14:26:49 +01:00
vramik
4beaaf2ab4 Expose organization group membership for a member
Closes #46454

Signed-off-by: vramik <vramik@redhat.com>
2026-02-24 09:02:53 -03:00
Pedro Igor
3e3a7befd1
Initial code for SCIM core and testsuite (#45978)
Closes #45712

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2026-02-23 18:22:25 +01:00
Pedro Ruivo
c438da8d8b
Use cached realm attributes for PAR and CIBA config
Some checks failed
Weblate Sync / Trigger Weblate to pull the latest changes (push) Has been cancelled
Closes #46100

Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Co-authored-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
2026-02-09 19:12:08 +01:00
Pedro Ruivo
02c6499d96
Deprecate unused methods in UserSessionProvider
Closes #45823

Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Co-authored-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
2026-02-06 19:04:19 +01:00
Pedro Ruivo
297d8ac95d
Refactor ClientResource for better performance
Closes #45838

Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Co-authored-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
2026-02-04 11:29:18 +01:00
Thomas Diesler
c08ed20f78
[OID4VCI] Add support for user did as subject id (#45008)
closes #45006


Signed-off-by: Thomas Diesler <tdiesler@ibm.com>
2026-01-30 17:29:47 +01:00
Martin Kanis
0433b0017d Organization Groups Import/Export
Closes #45507

Signed-off-by: Martin Kanis <mkanis@redhat.com>
2026-01-30 12:11:03 -03:00
Pedro Ruivo
bae3963d25
Refactor SessionsResource for better memory usage and performance
Closes #45727

Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Co-authored-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@ibm.com>
2026-01-29 11:38:54 +01:00
Alexander Schwartz
ea29c25f20
Additional restrictions when to issue a redirect to the caller on rolling updates
Closes #45574

Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
Co-authored-by: Pedro Ruivo <pruivo@users.noreply.github.com>
2026-01-23 07:33:41 -03:00
vramik
111ba36504 Organization Groups Core Backend & API
Closes #45562

Signed-off-by: vramik <vramik@redhat.com>
2026-01-22 09:39:24 -03:00
rmartinc
7e20b87136 Add abstract property for themes and do not display base for selection
Closes #41924

Signed-off-by: rmartinc <rmartinc@redhat.com>
2026-01-21 15:42:52 +01:00
Pedro Igor
c8a41dea99 Reverting format changes, updating docs, and only exposing the method to fetch first-factor credentials
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2026-01-19 08:30:47 -03:00
Nikita Bohuslavskyi
348670ae32 Align organization broker redirect after OTP setup
Closes #40510

Signed-off-by: Nikita Bohuslavskyi <nikita.bohuslavskyi@student.tuke.sk>
2026-01-19 08:30:47 -03:00
Pedro Igor
37ff64446b
Allow hide organization brokers when the user does not map to any organization during login
Closes #45422

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2026-01-15 15:19:43 +01:00
Thomas Diesler
d8b74e77ab
OID4VCI credentials have invalid subject id value (#45004)
closes #43854


Signed-off-by: Thomas Diesler <tdiesler@ibm.com>
2026-01-15 12:28:30 +01:00
Ricardo Martin
1aa1621eaa
Use MIME decoder instead of the default one to replace deprecated Base64 class
Closes #45226

Signed-off-by: rmartinc <rmartinc@redhat.com>
2026-01-09 16:38:09 +01:00
Christian Glasmachers
921b10ee80
Login failure cache: Evict entries after the configured failure reset time
Closes #44801

Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
Co-authored-by: Christian Glasmachers <Christian.Glasmachers-extern@deutschebahn.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@gmx.net>
Co-authored-by: Pedro Ruivo <pruivo@users.noreply.github.com>
2025-12-10 11:20:19 +01:00
forkimenjeckayang
3099cc2294
[OID4VCI]: Add UI for OID4VCI Protocol Mapper Configuration (#44390)
Closes: #43901


Signed-off-by: forkimenjeckayang <forkimenjeckayang@gmail.com>
2025-12-04 14:18:37 +01:00
rmartinc
ae7e7ba084 New Identity Provider condition for client policies
Closes #44442

Signed-off-by: rmartinc <rmartinc@redhat.com>
2025-12-03 08:50:31 +01:00
Stefan Guilhen
be714d935d Ensure GroupMemberLeaveEvent has a reference to the user leaving the group
Closes #44400

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2025-12-01 10:46:43 -03:00
Pedro Ruivo
3ed15e740a
Add new option to schedule user session expiration
Closes #44068

Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Signed-off-by: Ryan Emerson <remerson@ibm.com>
Co-authored-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Co-authored-by: Ryan Emerson <remerson@ibm.com>
2025-11-27 23:01:32 +01:00
Alexis Rico
b0b38176f0
Manage Organization Invites
Closes #38809

Signed-off-by: Alexis Rico <sferadev@gmail.com>
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Co-authored-by: Pedro Igor <pigor.craveiro@gmail.com>
2025-11-27 10:28:52 +01:00
rmartinc
ca205272ba Initial integration of the JWT Authorization Grant in client Policies
Using the downscope executor for testing
Closes #44201

Signed-off-by: rmartinc <rmartinc@redhat.com>
2025-11-24 19:37:07 +01:00
Giuseppe Graziano
3e8b2f8ab7
New JWT Authorization Grant Identity provider (#44176)
Closes #43570

Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com>
2025-11-19 09:18:23 +01:00
Stian Thorgersen
a2c1055f8d
Proposed import order (#43432)
* Add importOrder to Spotless

Closes #43235

Signed-off-by: stianst <stianst@gmail.com>

* Re-order imports with Spotless

Signed-off-by: stianst <stianst@gmail.com>

---------

Signed-off-by: stianst <stianst@gmail.com>
2025-11-14 09:34:49 +01:00
Pedro Igor
ded372a57f Adding utility class for working with throwables and updating the cause check to limit the number of iterations on the stacktrace
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2025-11-11 08:48:26 -03:00
Martin Kanis
c28cde359c Local user can't login when ldap error
Closes #43639

Signed-off-by: Martin Kanis <mkanis@redhat.com>
2025-11-11 08:48:26 -03:00
Stian Thorgersen
d8275fe5df
Remove wildcard imports (#44060)
Closes #44059

Signed-off-by: stianst <stianst@gmail.com>
2025-11-10 11:46:05 +01:00
Stian Thorgersen
b278dbbb3d
Allow identity provider configuration without defaults for user authentication (#43963)
Closes #43552

Signed-off-by: stianst <stianst@gmail.com>
2025-11-05 10:13:40 -03:00
Steven Hawkins
27252a14ae
fix: adding a single method to get the base uri (#43333)
* fix: adding a single method to get the base uri

closes: #43330

Signed-off-by: Steve Hawkins <shawkins@redhat.com>

* Update server-spi/src/main/java/org/keycloak/urls/HostnameProvider.java

Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Signed-off-by: Steven Hawkins <shawkins@redhat.com>

---------

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Signed-off-by: Steven Hawkins <shawkins@redhat.com>
Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
2025-11-05 12:46:09 +00:00
KONSTANTINOS GEORGILAKIS
1c0d4616a5
hide scopes from scopes_supported in discovery endpoint
Some checks are pending
Weblate Sync / Trigger Weblate to pull the latest changes (push) Waiting to run
Closes #10388

Signed-off-by: cgeorgilakis-grnet <cgeorgilakis@admin.grnet.gr>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@ibm.com>
2025-11-03 16:26:12 +00:00
Stian Thorgersen
1048c8d9c9
Filter out non-user authentication IdPs from account and login (#43798)
Closes #43553

Signed-off-by: stianst <stianst@gmail.com>
2025-10-31 12:40:04 +01:00
Tomáš Kyjovský
4c64b7189c
Deprecate org.keycloak.common.util.Base64
Closes #43370

Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Signed-off-by: 1867605+tkyjovsk@users.noreply.github.com
Co-authored-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@ibm.com>
2025-10-30 09:12:14 +01:00
Marek Posolda
2fc5419676
Avoid using UserCredentialManager from user storage extensions (#43695)
closes #43694

Signed-off-by: mposolda <mposolda@gmail.com>
2025-10-29 16:26:59 +01:00
Alexander Schwartz
2b51d6f4ac
Avoid holding on to the realm in cached configurations
Closes #43744

Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
2025-10-28 13:10:24 -03:00
Pedro Ruivo
468c063e27
Client session may be lost during session restart
Fixes #43349

Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Co-authored-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@ibm.com>
2025-10-14 11:01:16 +00:00