Commit graph

81 commits

Author SHA1 Message Date
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
vramik
c058983655 Enable optimistic locking feature on auth sessions
Closes #12242
2022-06-27 09:29:27 +02:00
Stefan Guilhen
cc65d5491d Filter out expired entities in JpaMapKeycloakTransaction
Closes #12623
2022-06-22 11:35:50 +02:00
Stefan Guilhen
7d96f3ad5a Events Map JPA implementation
Closes #9667
2022-06-21 13:53:48 +02:00
Michal Hajas
0719d3e49b Remove EXPIRATION fields and add expired entities filtering to all queries automatically
Closes #12563
2022-06-20 21:45:32 +02:00
vramik
df41f233d5 Introduce unique index for enums stored by storages
Closes #12277
2022-06-15 09:12:10 +02:00
Alexander Schwartz
361a813d81 Keep a list of model instances in the JPA map session.
This allows removing them from the persistence context on bulk delete.

Closes #12384
2022-06-09 12:39:04 -03:00
vramik
c31d37ddf1 Each JpaRootEntity should have its own current schema version
Closes #12272
2022-06-02 17:16:34 +02:00
vramik
be28e866b9 JPA map storage: Authorization services no-downtime store
Closes #9669
2022-05-30 21:05:34 +02:00
Alexander Schwartz
063960aaa3 Deferred indexes are not available on CockroachDB, therefore, only use them on PostgreSQL
Closes #12176
2022-05-27 08:51:20 -03:00
vramik
ad3da7f5e4 JPA map storage: disable failing on unknown properties when deserializing the object
Closes #12173
2022-05-25 09:31:40 +02:00
vramik
24171d2e47 Rename providers from jpa-map-storage to jpa
Closes #12098
2022-05-23 16:47:51 +02:00
vramik
0c3aa597f9 JPA map storage: test failures after cache was disabled
Closes #12118
2022-05-23 13:01:30 +02:00
Alexander Schwartz
d1a92680f5 Optimize querying sub-groups of groups
Closes #12080
2022-05-19 14:46:53 +02:00
vramik
e1eb9d6d64 Replace equals with == when comparing SearchableFields in Jpa*ModelCriteriaBuilder and Ldap*ModelCriteriaBuilder
Closes #11843
2022-05-16 21:51:38 +02:00
Michal Hajas
fc974fc019 Update composite roles on child role removal
Closes #11769
2022-05-05 15:18:18 +02:00
Alexander Schwartz
e0d7ad1be5 Leverage the equal() method on the wrapped entity instead of creating a string.
Closes #11764
2022-05-03 13:29:12 +02:00
Alexander Schwartz
cd20f45b8a Ensure that values of attributes are unique in the database
While this is already ensured on the Java level when using a Set, database inconsistencies as occurred with Hibernate could lead to follow-up problems that are hard to analyze (as seen in #11666).

Closes #11671
2022-04-28 12:04:05 +02:00
Stefan Guilhen
0f147ccdc0 Enlist JPA transaction in JpaMapStorageProvider.getStorage
Closes #11230

Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
2022-04-23 08:19:33 +02:00
Hynek Mlnarik
0ce5dfc09c Remove dependency of map on services
Fixes: 8903
2022-04-22 17:27:21 +02:00
Stefan Guilhen
0c7a8c8684 Login Failures Map JPA implementation
Closes #9664
2022-04-22 10:47:04 +02:00
Stefan Guilhen
f48d468641 Increase column size for keys that refer to entities that can be stored in different storages (foreign keys)
Closes #11329
2022-04-21 08:50:37 +02:00
Stefan Guilhen
b29b27d731 Ensure code does not rely on a particular format for the realm id or component id 2022-04-20 14:40:38 +02:00