Commit graph

7938 commits

Author SHA1 Message Date
Steven Hawkins
bb10a2c81c
fix: combining / removing static and initialization logic (#46918)
closes: #46917

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Signed-off-by: Steven Hawkins <shawkins@redhat.com>
2026-04-07 13:52:37 -03:00
Stian Thorgersen
8a1c921415
Prevent creating policies if they don't reference only the owner resource (#496) (#47803)
Closes CVE-2026-4636

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Co-authored-by: Pedro Igor <pigor.craveiro@gmail.com>
2026-04-07 12:46:15 +02:00
Christopher Leigh
bf83d75191
Resolve scope (#43339)
* resolve org from scope instead of client session note (#42836)

Signed-off-by: Chris Leigh <3805338+Tungsten78@users.noreply.github.com>

* Keep track of current organization when refreshing tokens

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>

* Handling select organization when querying userinfo and introspection endpoints

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>

* More tests

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>

* Test to check prevent single to all

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>

* Error when changing scopes to ANY

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>

---------

Signed-off-by: Chris Leigh <3805338+Tungsten78@users.noreply.github.com>
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Co-authored-by: Pedro Igor <pigor.craveiro@gmail.com>
2026-04-07 12:17:13 +02:00
Marek Posolda
f29249f3d7
Improve performance of scope processing in TokenManager. Limit for maximum length of OIDC parameters in Token endpoint (#478) (#47799)
closes #47716
Closes CVE-2026-4634


(cherry picked from commit b455ee4f28)

Signed-off-by: mposolda <mposolda@gmail.com>
2026-04-07 11:17:17 +02:00
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
Pedro Ruivo
3af5de75a8
Stabilize EmbeddedInfinispanSplitBrainTest (#47645)
Closes #46883

Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Co-authored-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
2026-04-07 10:38:13 +02:00
Mike
8cda7d6f26 Fix NPE when synchronizing LDAP user attributes
Signed-off-by: Mike <mmelvin0@gmail.com>
2026-04-06 10:58:27 -03:00
Norbert Kelemen
1174c75fc2
Use KcAdmMain.CMD in test cases (#47709)
Signed-off-by: Norbert Kelemen <nkelemen18@nkelemen.hu>
2026-04-03 13:32:46 -04:00
kvfi
b6027fe65d Fix null username creation when OIDC/SAML attribute mappers references missing attribute
Closes #44598

Signed-off-by: kvfi <mail@ouafi.net>
Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2026-04-02 18:34:14 -03:00
Peter Skopek
356cd5ef41
Remove Liquibase dependency version from Keycloak root pom
closes #27986

Signed-off-by: Peter Skopek <peter.skopek@ibm.com>
2026-04-02 13:58:09 +02:00
Thomas Diesler
c296ae1b41
Align selenium version across test suites
closes #47679

Signed-off-by: Thomas Diesler <tdiesler@proton.me>
2026-04-01 16:37:33 +00:00
forkimenjeckayang
8f90f98ab6
[OID4VCI] Make cryptographic binding & proofs explicitly configurable and spec-compliant (#47257)
closes #45724


Signed-off-by: forkimenjeckayang <forkimenjeckayang@gmail.com>
2026-04-01 12:14:30 +02:00
Giuseppe Graziano
46d1c4fa5a Sender constrained tokens for token exchange
Closes #46092

Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com>
2026-04-01 10:23:51 +02:00
Ricardo Martin
2daea53e70
Support Java 25 with FIPS enabled (#47581)
Closes #47666

Signed-off-by: rmartinc <rmartinc@redhat.com>
2026-04-01 09:57:25 +02:00
Laurids Møller Jepsen
3e3191d60c Enable use of kc_idp_hint in Pushed Authorization Requests.
The client can select which Identity Provider to use for user authentication by including an Identity Provider alias in a "kc_idp_hint" parameter in a Pushed Authorization Request.

Closes #47229

Signed-off-by: Laurids Møller Jepsen <laurids.jepsen@cryptomathic.com>
2026-04-01 09:32:46 +02:00
Vlasta Ramik
4975ad53d0
Both Clusterless and Volatile-Session suites contains reference to removed test file
Closes #47646

Signed-off-by: vramik <vramik@redhat.com>
2026-03-31 19:30:50 +02:00
Yike Gao
b941902fcd
Fixed inconsistent auth error (#46607)
Closes #46517


Signed-off-by: Yike Gao <yikegao8@gmail.com>
2026-03-31 15:26:23 +02:00
Marie Daly
7ee34391b0
Resolve offlineTokenBrowserFlow flaky test and migrate test to JUnit5 (#47467)
closes #45881


Signed-off-by: Marie Daly <marie.daly1@ibm.com>
2026-03-30 20:04:52 +02:00
Thomas Diesler
8cb5f95894 [OID4VCI] Migrate OID4VCIssuerWellKnownProviderTest
Signed-off-by: Thomas Diesler <tdiesler@proton.me>
2026-03-27 16:26:55 +01:00
Ricardo Martin
f2c7c673df
Add SAML url attributes to the SecureClientUrisPatternExecutor (#47514)
Closes #46745


Signed-off-by: rmartinc <rmartinc@redhat.com>
2026-03-27 14:53:34 +01:00
Thomas Diesler
52485c0dd1 [OID4VCI-HAIP] Pass oid4vci-1_0-issuer-fail-invalid-key-attestation-signature
Signed-off-by: Thomas Diesler <tdiesler@proton.me>
2026-03-27 14:03:51 +01:00
Awambeng
eb1be61f95
[OID4VCI]: Migrate OID4VCI Authorization Code Flow tests to new framework (#47388)
Closes #46596


Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
2026-03-27 11:13:07 +01:00
Awambeng Rodrick
519ee7f82d test(oid4vc): migrate time normalization tests to new test suite
- Migrate time normalization tests from Arquillian to JUnit 5
- Add shared test base with common helpers
- Replace server-side execution with admin REST API (ManagedRealm)
- Remove old Arquillian tests

Closes #47437

Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>

Address review comments from @forkimenjeckayang

Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
2026-03-27 10:56:00 +01:00
Martin Kanis
6b18000d08 Remove unnecessary tests
Some checks are pending
Weblate Sync / Trigger Weblate to pull the latest changes (push) Waiting to run
Closes #43613

Signed-off-by: Martin Kanis <mkanis@redhat.com>
2026-03-25 17:27:15 -03:00
Or Nissan
a3cc3c40fc Domain matching case-insensitive in organization identity provider
Signed-off-by: Or Nissan <orn@semperis.com>
2026-03-25 17:27:15 -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
Alexey Skosyrskiy
94cc5934c4 fix spotless issues
Signed-off-by: Alexey Skosyrskiy <askosyrskiy@metropolis.io>
2026-03-25 17:24:16 -03:00
Alexey Skosyrskiy
b6d4defb7c Add call chain comment to test class javadoc
Signed-off-by: Alexey Skosyrskiy <askosyrskiy@metropolis.io>
2026-03-25 17:24:16 -03:00
Alexey Skosyrskiy
f24461a91e Fix copyright year to 2026
Signed-off-by: Alexey Skosyrskiy <askosyrskiy@metropolis.io>
2026-03-25 17:24:16 -03:00
Alexey Skosyrskiy
3ad31ab026 Add integration tests for composite client role mappings endpoint
Tests cover multi-client composite expansion, cross-client isolation,
nested composites, empty results, briefRepresentation behavior, and
composite flag correctness.

Closes #47157

Signed-off-by: Alexey Skosyrskiy <askosyrskiy@metropolis.io>
2026-03-25 17:24:16 -03:00
vramik
43864c1375 Disabled organization should not execute invitations
Closes #45760

Signed-off-by: vramik <vramik@redhat.com>
2026-03-25 17:04:23 -03:00
Ingrid Kamga
df92e7aac8
[OID4VCI] Generate pre-authorized codes using the JWT format (#46450)
Closes #45231


Signed-off-by: Ingrid Kamga <Ingrid.Kamga@adorsys.com>
Signed-off-by: Ingrid Kamga <xingridkamga@gmail.com>
2026-03-25 19:35:13 +01:00
Stian Thorgersen
9fbd26d363
Migrate events package to test framework (#47403)
Closes #47401

Signed-off-by: stianst <stianst@gmail.com>
2026-03-25 14:35:54 +01:00
forkimenjeckayang
931d232fa2
[OID4VCI] Migrate OID4VCAuthorizationDetailsFlowTestBase and subclasses to new testsuite (#47287)
closes #46597



Signed-off-by: forkimenjeckayang <forkimenjeckayang@gmail.com>
Signed-off-by: Thomas Diesler <tdiesler@proton.me>
Co-authored-by: Thomas Diesler <tdiesler@proton.me>
2026-03-25 10:31:52 +01:00
jimmychakkalakal
e46a33adcf
Migrate WebAuthnTransportLocaleTest to new framework (#47312)
Closes #46503


Signed-off-by: Jimmy Chakkalakal <jimmy.chakkalakal@ibm.com>
2026-03-25 09:06:53 +01:00
mposolda
68f5779230 CVE-2026-3429 Improper Access Control for LoA During Credential Deletion for the case of client overriden flow
closes #47069

Signed-off-by: mposolda <mposolda@gmail.com>
2026-03-24 13:44:05 +01:00
Stian Thorgersen
1deb03922e
Delete runonserver package from legacy testsuite (#47325)
Closes #47324

Signed-off-by: stianst <stianst@gmail.com>
2026-03-24 13:37:38 +01:00
Stian Thorgersen
c09aa9eabd
Delete tests checking feature availability (#47389)
These tests simply check if the sever-info returns if the feature is enabled or not, which really serves no value as it doesn't check if providers/endpoints are disabled/enabled as expected

Signed-off-by: stianst <stianst@gmail.com>
2026-03-24 13:29:59 +01:00
vramik
db7d4d550c Do not reflect the organization name in the error message
Closes #47084

Signed-off-by: vramik <vramik@redhat.com>
2026-03-24 09:28:23 -03:00
Jonathan Langlois
a35f2a8bdb Allow mapped user attributes to be reset when broker claims are removed
Closes #44824

Signed-off-by: Jonathan Langlois <jonathan.langlois@gov.bc.ca>
2026-03-24 09:01:38 -03:00
forkimenjeckayang
6e2ee6659e
Migrate OID4VCKeyAttestationTest to the new testsuite (#47289)
closes #46599

Signed-off-by: forkimenjeckayang <forkimenjeckayang@gmail.com>
2026-03-23 10:29:52 +01:00
Pedro Ruivo
9bd0a973b3 Add more logging to EmbeddedInfinispanSplitBrainTest
Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
2026-03-20 17:26:57 +00:00
Thomas Diesler
53e7bdf1fe
[OID4VCI] Secure-by-Default and Default Disablement of Pre-Authorized… (#47270)
closes #46396


Signed-off-by: Thomas Diesler <tdiesler@proton.me>
2026-03-20 17:30:29 +01:00
mposolda
302ff9f7c2 [OID4VCI] Small inconsistencies in some events
Some checks failed
Weblate Sync / Trigger Weblate to pull the latest changes (push) Has been cancelled
closes #47203

Signed-off-by: mposolda <mposolda@gmail.com>
2026-03-18 18:46:48 +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
Stian Thorgersen
c635cdf2d7
Migrate LoginTimeoutValidationTest (#47206)
Signed-off-by: stianst <stianst@gmail.com>
2026-03-17 15:21:23 +01:00
asafm
e0dfe8d5b1 Fix NPE on mixed-case email domain in Keycloak Organization
This commit addresses a NullPointerException that occurs when logging in with a mixed-case email domain in a Keycloak Organization. The root cause was a mismatch between how the JPA layer (case-insensitive) and the Infinispan cache layer (case-sensitive) handled domain name casing.

Key changes:
- Normalized the domain name to lowercase when generating Infinispan cache keys in InfinispanOrganizationProvider.
- Added defensive null checks when resolving organizations from the cache to prevent NullPointerException from stale cache entries.
- Added a new integration test testStaleCacheEntryDoesNotThrowNPE in OrganizationCacheTest to verify the fix.
- Fixed a flaky test (incorporated @martin-kanis commit)

Signed-off-by: asafm <asafm1989@gmail.com>
2026-03-17 10:11:21 -03:00
Christian Ja
2526548ce5
support locale in reset-credentials direct link
closes #44784

Signed-off-by: Christian Janker <christian.janker@gmx.at>
2026-03-17 13:49:14 +01:00
Awambeng
3add23020b
[OID4VCI]: Migrate NonceEndpointTest to the new test suite (#47186)
Closes #46598


Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
2026-03-17 12:16:08 +01:00
Marek Posolda
c4a630da6d
[OID4VCI] User self-issued credential: Issuance initiated from web po… (#46327)
closes #46196

Signed-off-by: mposolda <mposolda@gmail.com>
2026-03-17 08:41:16 +01:00