Commit graph

103 commits

Author SHA1 Message Date
Jon Koops
972ebb9650
Use a valid SemVer format for the SNAPSHOT version (#17334)
* Use a valid SemVer format for the SNAPSHOT version

* Update pom.xml

* Update pom.xml

---------

Co-authored-by: Stian Thorgersen <stianst@gmail.com>
Co-authored-by: Stian Thorgersen <stian@redhat.com>
2023-03-03 11:11:44 +01:00
vramik
d923aa5d5d Entity version is not updated when the entity is root entity
Closes #17339
2023-03-02 15:21:43 +01:00
Hynek Mlnarik
7d136c5cca Generate map-like collection accessors
Along the way fixes also problem with field delegates which
applied manually-crafted methods like `MapUserEntity.removeCredential(id)`
to the delegate itself rather than to the underlying object.

Co-authored-By: Michal Hajas <mhajas@redhat.com>

Closes: #17223
2023-02-22 17:26:31 +01:00
Michal Hajas
1c79a5666d Deprecate RoleModel.SearchableFields.IS_CLIENT_ROLE field
Closes #17144
2023-02-16 20:50:46 +01:00
Alexander Schwartz
febe134d5b Make the event listeners specific to the persistence unit
Closes #13219
2023-02-16 11:08:15 +01:00
Hynek Mlnarik
d768e75be7 Fix clientRole warning
Fixes: #16857
2023-02-15 10:59:52 +01:00
Michal Hajas
1f929c78af Make lockTimeout more friendly for JPA map storage
Closes #16616
2023-02-15 10:38:18 +01:00
Michal Hajas
6fa62e47db Leverage HotRod client provided transaction
Closes #13280
2023-02-08 10:26:30 +01:00
Alexander Schwartz
48aae83891 Close prepared statement used to set the lock timeout
Closes #16801
2023-02-06 17:30:58 +01:00
Alexander Schwartz
c6aba2e3de Make LockAcquiringTimeoutException a RuntimeException
Closes #16690
2023-01-31 08:21:32 +01:00
Michal Hajas
eb59fdb772 Add transaction tests to model tests
Closes: #15890
2023-01-26 12:55:22 +01:00
Alexander Schwartz
e9e6b73bd2 Avoid using Hibernate APIs to cache query results as the API changes in Hibernate 6
Closes #16332
2023-01-18 14:42:42 +01:00
Michal Hajas
6566b58be1 Introduce Infinispan GlobalLock implementation
Closes #14721
2023-01-05 16:58:44 +01:00
vramik
f7ad00270e Unique constraints should use attribute value hash instead of the value itself
Closes #15699
Closes #15507
2023-01-05 13:38:06 +01:00
Stefan Guilhen
d6a4acceda Exclude commons-text from liquibase-core dependency
Closes #15915
2022-12-12 10:38:54 -03:00
Alexander Schwartz
e4804de9e3 Changing Quarkus transaction handling for JPA map storage to JTA
This has been recommended as the supported way of transaction handling by the Quarkus team.
Adding handling of exceptions thrown when committing JTA.
Re-adding handling of exceptions when interacting with the entity manager, plus wrapping access to queries to map exceptions during auto-flushing.

Closes #13222
2022-12-09 10:07:05 -03:00
Peter Zaoral
1073a342cf Cleanup dependencies and align with Quarkus
* aligned parent POM dependency versions with the Quarkus BOM

Closes #15325

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
2022-12-09 09:10:30 -03:00
Hynek Mlnařík
208affe000 Update generator to record the entity to fields mapping
Fixes: #15677
2022-12-08 15:40:28 +01:00
Michal Hajas
6d683824a4 Deprecate DBLockProvider and replace it with new GlobalLockProvider
Closes #9388
2022-11-16 16:13:25 +01:00
Stefan Guilhen
36ebf9dd46 Add missing parameter to the JpaRootAuthenticationSessionEntity constructor.
Closes #15093
2022-11-16 13:45:39 +01:00
Alexander Schwartz
b6b6d01a8a Importing a representation by first creating the defaults, importing a representation and then copying it over to the real store.
This is the foundation for a setup that's needed when importing the new file store for which importing the representation serves as a placeholder.

Closes #14583
2022-11-16 09:56:13 +01:00
Stefan Guilhen
02a69561b5 Use JSONB '->>' function to avoid unnecessary JSON conversion in criteria builders.
Closes #12280
2022-11-09 13:47:13 +01:00
Alexander Schwartz
9fb9780f02 Don't rely on DefaultModeLCriteria in equals/hashCode
Instead, map this to JPA query and then create the cache lookup key from there.

Closes #14938
2022-10-26 15:49:26 +02:00
Alexander Schwartz
e494649a4e First naïve per-session caching for JPA map store
Closes #14938
2022-10-26 15:49:26 +02:00
Alexander Schwartz
3a30061c44 Avoid deadlock on CockroachDB when removing authentication sessions
Closes #14991
2022-10-24 20:42:31 +02:00
vramik
fa947a41ea Revisit unique constraints in jpa user store
Closes #14797
2022-10-17 08:56:45 +02:00
vramik
f49582cf63 MapUserProvider in KC20 needs to store username compatible with KC19 to be no-downtime-upgradable
Closes #14678
2022-10-14 09:32:38 +02:00
Martin Kanis
761929d174
Merge ActionTokenStoreProvider and SingleUseObjectProvider (#13677)
Closes #13334
2022-10-13 09:26:44 +02:00
vramik
e5408884f6 Revisit parent-child relationship in jpa map store
Closes #14278
2022-10-05 09:42:34 +02:00
Alice Wood
55a660f50b enhance group search to allow searching for groups via attribute keycloak/keycloak#12964
Co-authored-by: Abhijeet Gandhewar <agandhew@redhat.com>
Co-authored-by: Michal Hajas <mhajas@redhat.com>
2022-09-19 15:19:36 +02:00
vramik
4f4dbd622a Ensure entity version is indexed
Closes #14161
2022-09-15 08:39:29 -03:00
vramik
3120848ef0 Unify package name format in jpa map store
Closes #14276
2022-09-12 13:03:17 +02:00
vramik
869ccc82b2 Enable MapUserProvider storing username with the letter case significance
Closes #10245
Closes #11602
2022-09-09 11:46:11 +02:00
vramik
fb33cbc2bd Set correct entity version when adding a child entity with its own entity versioning
Closes #14273
2022-09-09 09:43:44 +02:00
Alexander Schwartz
27ecf7f00f Use session level cache and avoid resolving by ID too often
Closes #12381
2022-08-30 16:42:49 +02:00
Pedro Igor
98ac3829d6 Remove KeycloakIntegratorProvider
Closes #13233
2022-07-21 09:05:59 -03:00
Stefan Guilhen
e9c55f45e5 Enable action token JPA provider in map-storage-jpa profile
Closes #13139
2022-07-20 16:30:20 -03:00
Alexander Schwartz
4d19099c66 Workarounds to make Listeners and non-autocommit work on Quarkus
Closes #13200
2022-07-20 12:06:06 +02:00
Alexander Schwartz
d30646b1f6 Refactor object locking for UserSessions
Closes #12717
2022-07-19 17:47:33 -03:00
Alexander Schwartz
f490638971 Fall back to standard Liquibase locking
As DBLockProvider is "none" for the Map storage providers, there is no locking provided by DB Lock
provider.

Liquibase's classic lock provider has issues that need to be tackled in a follow-up issue, see https://github.com/liquibase/liquibase/issues/1311

Closes #13130
2022-07-19 10:45:31 +02:00
Alexander Schwartz
247cf0d09a Assure that a second thread waits for the first thread to process the database changes
Closes #13130
2022-07-19 10:45:31 +02:00
Alexander Schwartz
b959e5c32a Prevent logging changeset on the console for Quarkus
Closes #13126
2022-07-15 17:12:22 +02:00
Pedro Igor
f6a2b334d1
Integrate the JPA map store (#13097)
Co-authored-by: Alexander Schwartz <alexander.schwartz@gmx.net>
2022-07-14 17:47:51 -03:00
Vlasta Ramik
ec853a6b83
JPA map storage: User / client session no-downtime store (#12241)
Co-authored-by: Alexander Schwartz <alexander.schwartz@gmx.net>

Closes #9666
2022-07-14 12:07:02 -03:00
Alexander Schwartz
d4c97bd3a9
Choose alternatives for CockroachDB for referenced computed columns (#12991) 2022-07-13 15:31:21 -03:00
Stefan Guilhen
dc88dd5286
Users Map JPA implementation (#12871) 2022-07-05 11:19:31 -03:00
Alexander Schwartz
63614b1240 Fixing broken build after merging conflicting PRs.
This was introduced via #9852 when #11844 was merged.

Closes #12898
2022-07-04 15:57:25 -03:00
Stefan Guilhen
007fa1f374 Single Use Objects Map JPA implementation
Closes #9852
2022-07-04 10:05:51 -03:00
Alexander Schwartz
9143d8bd0e Store composite roles within its own table for JPA Map storage.
This keeps the JSON column small, enables searching by child, and allows modification of the role's children without loading all children.

Closes #11844
2022-07-01 14:13:24 -03:00
vramik
91335ebaad Change returning type to Set in MapClientEntity when obtaining protocol mappers
Closes #11136
2022-06-28 21:47:56 +02:00