Commit Graph

2520 Commits

Author SHA1 Message Date
Alexander Schwartz
a2deff172b Do not terminate persistent sessions worker on exceptions
Closes #38925

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-04-15 13:10:29 +02:00
Pedro Igor
2caf4ba4aa Added condition to check offlineSessionMaxLifespanEnabled on clearing
Closes #38063

Signed-off-by: Saravana <saravanakumar.a@kobil.com>
Co-authored-by: saravanaarh <127546533+saravanaarh@users.noreply.github.com>
Co-authored-by: Saravana <saravanakumar.a@kobil.com>
2025-04-08 16:29:58 +00:00
Alexander Schwartz
fbf1ad2241 Allow a token to be revoked twice
Closes #37621

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-03-05 08:22:14 +01:00
Martin Bartoš
c5a7155216 Invalid migration export for empty database
Fixes #32535

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
2025-02-11 13:23:39 +01:00
Alexander Schwartz
45d16b1c09 Commit proto.lock changes (only needed in release branches)
Closs #36919

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-02-06 08:41:29 -03:00
Alexander Schwartz
2469a33081 Changes picking up pruivo's suggestions
Closes #36919

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-02-06 08:41:29 -03:00
Alexander Schwartz
61a44657f0 Also cache client roles if looked up by name and not found
Closes #36919

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-02-06 08:41:29 -03:00
Alexander Schwartz
242516624c Cache empty results for role-by-name lookup
Closes #36919

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-02-06 08:41:29 -03:00
Miguel C
4d54071551 Add primary key to avoid issues in some mysql 8 server but still keep compatibility with others
Closes #35827

Signed-off-by: mike-pt <mike-pt@users.noreply.github.com>
Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
(cherry picked from commit ffa85cdd59)
2025-01-28 10:30:57 -03:00
Pedro Igor
3e604cf27d Allow enforce that users are members of organizations when authenticating
Closes #34275

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2025-01-22 21:49:30 +01:00
Pedro Igor
e6c1a6c6ad Avoid creating ObjectMapper but using JsonSerialization utility class when managing event details
Closes #35457

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2025-01-22 20:18:34 +01:00
Alexander Schwartz
e3a213cc9c Avoid too many retries when writing persistent sessions fails
Closes #35047

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-01-21 08:17:21 -03:00
Alexander Schwartz
00a45a40e7 Avoid looking up the client if it is known during the commit phase
Closes #36332

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2025-01-14 08:36:24 -03:00
Pedro Igor
1ca1d5e909 Make sure brokers are managed within the scope of the realm model object
Closes #34356

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2025-01-14 09:44:26 +01:00
Jon Koops
f2893b76f1 Fix potential NPE in migration script for KC 26
Closes #35793

Signed-off-by: Sven-Torben Janus <sven-torben.janus@conciso.de>
(cherry picked from commit 7531f97e54)

Co-authored-by: Sven-Torben Janus <sventorben@users.noreply.github.com>
2025-01-13 17:42:41 +01:00
Pedro Igor
7a76858fe4 Restrict access to environment variables when at the server runtime
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-12-16 10:12:52 -03:00
Pedro Igor
034e01eb22 Exact searches should be the default when querying user by attributes (#35864)
Closes #35822

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-12-13 08:45:33 +01:00
Pedro Igor
8954fe427a Do not run changeset if comlumn already exists
Closes #35290

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-12-06 13:38:03 +01:00
Stefan Guilhen
18fcb81e1c Fix migration for MySQL database
- MariaDB and MySQL now use the same statement
- prevents a possible illegal mix of collations

Closes #34995

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
(cherry picked from commit 88cfe426d8)
2024-12-04 15:20:51 -03:00
Pedro Igor
fc2a45a7d2 Make sure event details are not stored if they are null (#35502)
Closes #35288

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-12-02 15:15:34 +01:00
Pedro Igor
640f4190e0 Use regular CREATE TABLE instead of CREATE TEMPORARY
Closes #30631

Some hosted/managed environments like google CloudSQL, might not support this type of statement (i.e. when using replication and GTID)

Since we are dropping the table anyway it seems a regular CREATE statement should work fine here.

Signed-off-by: mike-pt <mike-pt@users.noreply.github.com>
Co-authored-by: Miguel C <mike-pt@users.noreply.github.com>
2024-11-28 17:03:40 +01:00
Pedro Ruivo
c055f9c4ff Make PermissionTicket events marshallable
Fixes #35328

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-11-28 10:16:11 +01:00
Agnieszka Gancarczyk
f0243a8c0b Backport to expose membership type
Signed-off-by: Agnieszka Gancarczyk <agagancarczyk@gmail.com>
2024-11-27 11:15:25 -03:00
Vlasta Ramik
54eca9541f Upgrade 24 to 25 fails because db jpa changes drop nonexisting indexes.
Closes #34899

(cherry picked from commit ebd411b93d)

Signed-off-by: vramik <vramik@redhat.com>
2024-11-22 12:05:47 +01:00
Pedro Igor
5c9f1837d7 Added a representation that includes an organization and user model
Closes #34013

Signed-off-by: Robert Rieser <Robert.Rieser@degoya.studio>
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Co-authored-by: Robert Rieser <Robert.Rieser@degoya.studio>
2024-11-12 10:12:51 +01:00
Pedro Igor
80c17f8392 Better message when updating users when import is disabled
Closes #31456

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-11-11 22:41:30 +01:00
Stefan Guilhen
227cb96de1 Guard against NPE by checking if caches are null in InfinispanOrganizationProvider
- caches can be disabled and the provider has to check if they are set when using them

Closes #34603

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
(cherry picked from commit e28b88bc02)
2024-11-07 15:05:40 -03:00
Stefan Guilhen
07a92c54f4 Add validChecksum to jpa-changelog-26.0.0.xml
Closes #34450

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2024-10-31 09:28:07 -03:00
Stefan Guilhen
6c4f8619d3 Ensure hide_on_login has the default value set to 0 on MSSQL
Closes #34450

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
(cherry picked from commit ac25844731)
2024-10-31 09:28:07 -03:00
Gilvan Filho
c5d9edf7b7 add linear strategy to brute force
closes #25917

Signed-off-by: Gilvan Filho <gilvan.sfilho@gmail.com>
2024-10-28 10:47:02 -03:00
Alexander Schwartz
a6d7e91ceb ConcurrentModificationException when restarting user sessions (#34314)
Closes #34093

Signed-off-by: Martin Kanis <mkanis@redhat.com>
Co-authored-by: Martin Kanis <mkanis@redhat.com>
2024-10-28 10:38:28 +01:00
Pedro Ruivo
4a367a9655 Client Scope updates are not replicated between Keycloak nodes
Fixes #33731

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-10-25 11:22:50 +02:00
Pedro Ruivo
1895251a34 Deleting a user leads to ISPN marshalling exception
Fixes #34224

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
2024-10-23 13:51:34 +02:00
Jon Koops
afa3e556d9 NPE when Default Role is not present on CachedRealm
closes: #33817

(cherry picked from commit 91026d6713)

Signed-off-by: Pedro Hos <pedro-hos@outlook.com>
Co-authored-by: Pedro Hos <pedro-hos@outlook.com>
2024-10-15 09:03:42 +00:00
Stefan Guilhen
a9ba9df339 Don't fail on drop index IDX_US_SESS_ID_ON_CL_SESS
Closes #33780

(cherry picked from commit 23a6822715)

Signed-off-by: Kevin Köllmann <kevin@kllmnn.de>
Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
Co-authored-by: Alexander Schwartz <alexander.schwartz@gmx.net>
Co-authored-by: Kevin Köllmann <kevin@kllmnn.de>
2024-10-10 16:41:08 +00:00
Pedro Igor
d822154758 The event should also support user invalidation events
Closes #33777

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-10-10 16:17:12 +00:00
mposolda
1c4b93daa4 Better logging when error happens during transaction commit
closes #33275

Signed-off-by: mposolda <mposolda@gmail.com>
(cherry picked from commit 07cf71e818)
2024-10-08 13:15:41 +02:00
Ryan Emerson
4c73e50002 Commit proto.lock files to release/26.0 branch
Closes #30684

Signed-off-by: Ryan Emerson <remerson@redhat.com>
2024-10-04 11:29:38 +02:00
Pedro Igor
13111daceb Move organization membership cache entries to the user cache
Closes #33412

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-10-03 10:31:26 -03:00
vramik
b7eaa9b0cb Wildcard search not working for custom user attributes
Closes #32451

Signed-off-by: vramik <vramik@redhat.com>
2024-10-03 08:48:36 -03:00
vramik
c1653448f3 [Organizations] Allow orgs to define the redirect URL after user registers or accepts invitation link
Closes #33201

Signed-off-by: vramik <vramik@redhat.com>
2024-10-02 07:37:48 -03:00
Pedro Igor
ef48a3a360 Avoid running org related code if there are no orgs in a realm
Closes #33424

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-10-02 09:39:25 +02:00
Stefan Guilhen
9b7cf9d584 Ensure componentsByParentAndType in CachedRealm is returned as a concurrent multi-valued map
Closes #30235

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
2024-10-01 17:39:00 -03:00
Pedro Igor
3887ee3006 Do not store RealmModel in cache entries
Closes #33439

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-10-01 17:37:46 +02:00
Alexander Schwartz
8769fed585 Fixing bug in condition
Closes #33353

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2024-09-30 18:35:45 -03:00
Pedro Igor
4bd29e257b Fixing tests
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-09-30 18:35:45 -03:00
Pedro Igor
c558bbe118 Fixing tests
Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
2024-09-30 18:35:45 -03:00
Alexander Schwartz
fd1f3c52d3 Further optimizations
Closes #33353

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2024-09-30 18:35:45 -03:00
Alexander Schwartz
5c503a55e9 Optimize caching and use of DB connections when Organisations are enabled
Closes #33353

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
2024-09-30 18:35:45 -03:00
Michal Hajas
c682536dae Avoid duplicates when storing organization ids
Signed-off-by: Michal Hajas <mhajas@redhat.com>
2024-09-30 13:25:46 -03:00