Commit graph

265 commits

Author SHA1 Message Date
Alexander Schwartz
e46c879cde
Retry duplicate exceptions to handle concurrent client sessions
Closes #42278

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-09-02 10:43:03 -03:00
Pedro Ruivo
6bcaa63124
Concurrently update the remote caches
Closes #42096

Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
Co-authored-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
2025-08-25 16:39:17 +02:00
Martin Bartoš
e4f0bfc8e7
Make UPDATE_TIME unique for MIGRATION_MODEL table
Closes #40088

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
2025-06-18 13:08:42 +00:00
Pedro Igor
0188d276d8
Invalidate user cache entries when email or username are different from storage
Closes #40085

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@gmx.net>
2025-06-17 20:44:01 +00:00
Martin Bartoš
ad92af3c58
MigrationModel duplicate entry
Closes #39866

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@gmx.net>
Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
2025-06-11 10:54:29 +02:00
Pedro Ruivo
eafe08a73a
Create CacheEmbeddedConfigProvider
Closes #38497

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
2025-04-28 13:00:53 +02:00
Pedro Ruivo
d7b9a0691e
Fix test configuration for remote infinispan
Closes #39097

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2025-04-22 08:25:05 +02:00
Pedro Ruivo
636fffe0bc
Create CacheRemoteConfigProvider (#38570)
Closes #38496

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2025-04-16 17:08:43 +02:00
Michal Hajas
4dc4de7c12
Remove CACHE-EMBEDDED-REMOTE-STORE experimental feature
Closes #34160

Signed-off-by: Michal Hajas <mhajas@redhat.com>
2025-04-16 12:01:55 +00:00
vramik
602258d935 [FGAP] Switch the feature from Experimental to Supported
Closes #38651

Signed-off-by: vramik <vramik@redhat.com>
2025-04-08 13:00:47 -03:00
Pedro Ruivo
6aa3f9d5a7
Load all ProtoSchemas from the classpath
Closes #34971

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2025-03-27 15:41:01 +01:00
Alexander Schwartz
a0de3c26d7 Allow a token to be revoked twice
Closes #37621

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-03-03 10:49:41 -03:00
Pedro Igor
4b2d5ed472 Minor fixes, test coverage, and allow deleting local users
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2025-02-07 10:42:45 -03:00
Christian Janker
87db882a89 Do not remove users in LDAP when queries return an empty result
closes #34764

Signed-off-by: Christian Janker <christian.janker@gmx.at>
2025-02-07 10:42:45 -03:00
Alexander Schwartz
1cf51a700c Also cache client roles if looked up by name and not found
Closes #36919

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-02-03 18:12:41 -03:00
Alexander Schwartz
d9fe2dcc48 Cache empty results for role-by-name lookup
Closes #36919

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-02-03 18:12:41 -03:00
Arthenice
c20f7e50c7
docs: update JavaDoc for ImportSynchronization
The JavaDoc for ImportSynchronization was wrongfully referencing the
UserStorageProvider instead of the UserStorageProviderFactory.

Closes #36834

Signed-off-by: arthenice <wistful.arthenice@gmail.com>
2025-01-28 12:13:19 +01:00
Pedro Ruivo
26a3c09725 Upgrade Infinispan to 15.0.12.Final
Closes #36686

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2025-01-22 15:17:29 +01:00
Paul Schwabauer
7d8505a2dc
Remove usage of deprecated thread_dumps_threshold configuration (#36620)
Closes #36633

Signed-off-by: Paul Schwabauer <pschwabauer@intevation.de>
2025-01-21 15:16:23 +01:00
Stian Thorgersen
c1c147cb17
Restrict access to environment variables when at the server runtime (#36472)
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Co-authored-by: Pedro Igor <pigor.craveiro@gmail.com>
2025-01-15 09:36:19 +01:00
Stefan Guilhen
6f5077ddcb Increase thread sleep time when testing two different locks
Closes #35448

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2024-12-04 15:20:28 -03:00
Pedro Ruivo
86c475b9fc Invoking BaseUpdater.markDeleted() more than once cause the transient status to be lost
Fixes #35570

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-12-03 18:06:07 +01:00
Pedro Ruivo
ff939d6b28 Test AuthenticationSession optimization
Closes #35513

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-12-02 18:41:05 +01:00
Stefan Guilhen
9861acc2aa UserSessionProvider.removeUserSessions now removes all user sessions (both regular and offline)
Closes #31359

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2024-11-29 12:35:15 -03:00
Pedro Ruivo
9bd0cdc00f Flaky test: AuthenticationSessionTest
Enable transactions to handle conflicts.

Unrelated changes:
* Disable IP multicast (not available in MacOS by default)
* Bind JGroups to 127.0.0.1
* Remove FD_SOCK2 (single JVM tests do not require failure detection)

Closes #35087
Closes #35015

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-11-28 12:39:06 +01:00
Martin Bartoš
959ce9c483 Provide Tracing SPI
Closes #34711

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Co-authored-by: Alexander Schwartz <alexander.schwartz@gmx.net>
2024-11-28 10:45:31 +01:00
Pedro Ruivo
e143b022e5 Flaky test: AuthenticationSessionTest
Workaround for flaky test AuthenticationSessionTest#testConcurrentAuthenticationSessionsRemoval

Closes #35015

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-11-25 13:49:08 +01:00
Giuseppe Graziano
05adf19848
Authentication session with changelog transaction
Closes #23881
Closes #32658

Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com>
2024-11-15 14:10:15 +01:00
Alexander Schwartz
8be4237fd4
Fix failing test AdminEventQueryTest by adding required session parameter (#34612)
Closes #34611

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2024-11-04 12:28:59 +01:00
Pedro Ruivo
f507caae6c Deleting a user leads to ISPN marshalling exception
Fixes #34224

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-10-23 11:53:25 +02:00
Michal Hajas
d065be362a
Fix flaky UserSessionPersisterProviderTest
Closes #32892

Signed-off-by: Michal Hajas <mhajas@redhat.com>
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
2024-09-20 13:24:34 +02:00
Vlasta Ramik
4ce40be1af
Make the ORGANIZATION a default feature (#32404)
Closes #32395

Signed-off-by: vramik <vramik@redhat.com>
2024-09-18 12:19:28 +02:00
Pedro Ruivo
f67bec0417 Rename remote-cache Feature
Renamed to "clusterless"

Closes #32596

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-09-13 13:03:13 +02:00
Pedro Ruivo
ba861fc5d7 Remove version() projection from Ickle Queries
Closes #32590

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-09-03 18:07:32 +02:00
Stefan Guilhen
88cca10472 Rename IDPSpi to IdentityProviderStorageSpi
Closes #31639

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2024-08-26 15:10:09 -03:00
Michal Hajas
f5b2775939 Enable persistent sessions by default
Run CI with the feature disabled to test also the old settings
Closes #32265

Signed-off-by: Michal Hajas <mhajas@redhat.com>
2024-08-21 17:37:54 +02:00
Stefan Guilhen
aeb1951aba Replace calls to deprecated RealmModel IDP methods
- use the new provider instead

Closes #31254

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2024-08-15 10:55:36 -03:00
Pedro Ruivo
e13c9bf462 Retry remote cache operations with back off
Implement a retry mechanism for remote cache writes.

Fixes #32030

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-08-13 15:55:59 +02:00
Pedro Ruivo
07c92c85cb Drop AuthenticatedClientSessionStore from user sessions
New entities for client and user sessions, more query friendly.
The client sessions are found using query instead of storing them in the
user session entity.
Remove of sessions by its field is done based on queries.

Closes #30934

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-08-12 20:35:50 +02:00
Martin Kanis
e750b44e9d Flaky test: org.keycloak.testsuite.model.DBLockTest#testTwoLocksCurrently
Closes #25794

Signed-off-by: Martin Kanis <mkanis@redhat.com>
2024-08-07 09:00:37 -03:00
Michal Hajas
50c07c6e7c
Simplify configuration for MULTI_SITE
Closes #31807

Signed-off-by: Michal Hajas <mhajas@redhat.com>
2024-08-06 16:14:33 +00:00
Pedro Ruivo
3fbe26d2e1 Disable SessionTimeoutsTest for old cross-site code
The test is disabled for the embedded caches + remote store combination
(old cross-site code) due to the async event processing.

Events can be handled after the test changes the time offset, causing
the test to fail.

Fixes #31612

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-08-06 15:33:44 +02:00
Ryan Emerson
176ac3404a EmbeddedInfinispanSplitBrainTest fails with "IllegalState Session not bound to a realm"
Closes #31828

Signed-off-by: Ryan Emerson <remerson@redhat.com>
2024-08-01 13:58:41 +02:00
Ryan Emerson
8d7e18ec29 Clear local caches on split-brain heal
Closes #25837

Signed-off-by: Ryan Emerson <remerson@redhat.com>
2024-07-31 13:59:06 +02:00
Pedro Ruivo
17e30e9ec1 Persist revoke tokens with remote cache feature
Stores the revoked tokens into the database and preloads them during
startup.

Fixes #31760

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-07-31 11:02:38 +02:00
Pedro Ruivo
e62604b1ec ConditionalRemover interface for External Infinispan feature
Add a ConditionalRemover interface to remove entries from a RemoteCache
based on the key or value fields.
The default implementation provided by this PR uses streaming/iteration
to test and remove entries

On a side change, moved all the transactions to the same package and
created one transaction class per entity/cache to simplify code and
avoid writing "RemoteChangeLogTransaction" with a long list of types.

Fixes #31046

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-07-30 15:16:17 +02:00
Stefan Guilhen
17c01c9380 Enable new IDP Storage SPI in JPA model tests
Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2024-07-29 16:02:26 +02:00
Pedro Igor
87c279d645 Respect the username value format when processing federated users
Closes #31240

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-07-29 09:28:43 +02:00
Stefan Guilhen
c9f5a0aa32 Testsuite: ensure realm is set in session context
Closes #31636

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2024-07-26 11:11:44 -03:00
Alexander Schwartz
227c71f7f0
Persisting revoked access tokens
Closes #31296

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2024-07-26 11:46:14 +02:00