Commit graph

2122 commits

Author SHA1 Message Date
Alex Szczuczko
1578506475
Seperate version properties for hibernate-enhance and quarkus-maven (#20264)
This will allow them to be defined seperately from aligned dependency
versions suitable for product

Closes #20261
2023-05-18 14:37:55 +00:00
mkrueger92
256bb84cc4
Avoid NPE while fetching offline sessions (#17577) 2023-05-18 13:32:02 +02:00
Stefan Guilhen
053f774f13 Fix broker link query param order to match the columns order in the primary key index
Closes #19193
2023-05-17 10:22:59 +02:00
Dominik Schlosser
8c58f39a49 Updates Datastore provider to contain full data model
Closes #15490
2023-05-16 15:05:10 +02:00
Hynek Mlnařík
edb292664c
File store freeze
* File store: Fix ID determination

* Forbid changing ID (other setters)

* Improve handling of null values

* Support convertible keys in maps

* Fix writing empty values

* Fix updated flag

* Proceed if an object has been deleted in the same tx

* Fix condition

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

---------

Co-authored-by: Michal Hajas <mhajas@redhat.com>
2023-05-16 12:03:59 +02:00
Martin Bartoš
960e3503ec
Artifact SLF4J LOG4J-12 has been relocated (#20113) 2023-05-05 13:57:45 +02:00
vramik
d1ab921c50 JpaUserProvider count methods are inconsistent with searchForUser's param filter handling
Closes #17581
2023-05-05 08:22:05 +02:00
rmartinc
d9025db536 Migrate realms if configured to use RH-SSO themes
Closes https://github.com/keycloak/keycloak/issues/17484
2023-05-02 15:38:33 +02:00
vramik
6c6907ef4e Clean RealmProvider from methods from other areas
Closes #15044
2023-05-02 15:09:26 +02:00
Alexander Schwartz
c2c5012cfb Upgrade to latest Infinispan version 14.0.8
Closes #20067
2023-05-02 13:45:05 +02:00
Alexander Schwartz
a10d511b12 Remove workaround for fix available in Hibernate 6.2.1
Closes #19323
2023-05-02 13:43:49 +02:00
Peter Zaoral
72663060c9 Quarkus3 branch sync no. 13
11.4.2023:
* renamed imports from javax to jakarta as a part of the migration from JavaEE to JakartaEE

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
2023-04-27 13:36:54 +02:00
Alexander Schwartz
f345c8b931 Revert "Fix problem when Hibernate on MySQL is confused to read back Enums from VARCHARs"
This doesn't work with Hibernate 6.2.0.Final any more, and it is no longer needed after changing the VARCHAR to TINYINT for the enums

This reverts commit 0d96b8db6b9f8cefc2997d350cc6359c01cd61be.
2023-04-27 13:36:54 +02:00
Alexander Schwartz
02b0683053 Revert "Workaround to avoid replacing element collections"
With the update Hibernate 6.2.0.Final this is no longer needed.

Closes #19162

This reverts commit 93e32f3191a1ddc3498000244b35b3c14fe6880e and e369f7c212b3d9ee4810518f5a2bfe9b846ba15d.
2023-04-27 13:36:54 +02:00
vramik
d962dec954 Remove workaround for Lazy initialization of Realm's collections
Closes #19069
2023-04-27 13:36:54 +02:00
Alexander Schwartz
b508b18391 Removing workaround for H6 as this is now fixed
This reverts commit c74b832995759d4c9f330a4ba1767d01f9e3c174.

Closes #16551
2023-04-27 13:36:54 +02:00
Alexander Schwartz
e00af7e172 Fix problem when Hibernate on MySQL is confused to read back Enums from VARCHARs
It treated the single byte String with its ASCII values, which then didn't find a representation in the enum's values, which lead to a "ArrayIndexOutOfBoundsException: Index 48" for a value "0" (ASCII 48).
This behavior changed when migrating from Hibernate 5 to Hibernate 6.
Hibernate expects a TinyInt value for all Enums by default, and this annotation overrides it.
2023-04-27 13:36:54 +02:00
Alexander Schwartz
b7d5b6a135 Fix problem when Hibernate exception is hidden when executing "ClientScopeTest".
This behavior changed when upgrading to Hibernate 6
2023-04-27 13:36:54 +02:00
Alexander Schwartz
16d4c732e0 Fix problem with "InterpretationException: Error interpreting query / this may indicate a semantic (user query) problem or a bug in the parser"
This behavior changed when upgrading from Hibernate 6.2.0.CR3 to 6.2.0.CR4
2023-04-27 13:36:54 +02:00
Alexander Schwartz
b68a5be38d Workaround to avoid replacing element collections
Relates to #19162
2023-04-27 13:36:54 +02:00
Alexander Schwartz
2762e17dc0 Create proper one-to-many in RealmLocalizationTextsEntity
This avoids Hibernate 6.2.0.CR4 to fail with 'BasicValue cannot be cast to class ToOne'.
It used to work on Hibernate 6.2.0.CR3.
2023-04-27 13:36:54 +02:00
Alexander Schwartz
ad82252a44 Create workaround for "identifier of an instance altered"
Related to: #19323
2023-04-27 13:36:54 +02:00
Martin Bartoš
9719e1d210 Handle DB exceptions for JTA TX 2023-04-27 13:36:54 +02:00
Alexander Schwartz
5252992384 Workaround to avoid replacing element collections
Relates to #19162
2023-04-27 13:36:54 +02:00
Alexander Schwartz
28975b950d Workaround for lazy loaded collections for RealmEntity
---
Quarkus3 branch sync no. 13 (11.4.2023)
Resolved conflicts:
keycloak/model/jpa/src/main/java/org/keycloak/models/jpa/JpaRealmProvider.java - Modified
2023-04-27 13:36:54 +02:00
Martin Bartoš
8584174099 Change default DB dialects 2023-04-27 13:36:54 +02:00
Peter Zaoral
181c8a5340 Quarkus3 branch sync no. 11
24.3.2023:
* renamed imports from javax to jakarta as a part of the migration from JavaEE to JakartaEE
* fixed the metadata field's Type annotation

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
2023-04-27 13:36:54 +02:00
vramik
ae56c657b0 JpaMapStorageProviderFactory should use AvailableSettings.JAKARTA... properties
Closes #17077
2023-04-27 13:36:54 +02:00
Peter Zaoral
946eacd5b6 Quarkus3 branch sync no. 5
10.2.2023:
* renamed imports from javax to jakarta as a part of the migration from JavaEE to JakartaEE
* fixed Undertow server not starting due to ClassNotFoundException: javax.transaction.TransactionManager

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
2023-04-27 13:36:54 +02:00
vramik
7b51d8617d Remove one side of association which is not used.
Closes #16693
2023-04-27 13:36:54 +02:00
Alexander Schwartz
434cc7c711 Fix errors pointed out by Hibernate 6 in the queries
Closes #16337
2023-04-27 13:36:54 +02:00
Alexander Schwartz
4bdf2fe21d Fixing parameter which should be a string plus dependencies
Closes #16649
2023-04-27 13:36:54 +02:00
Alexander Schwartz
80f7452950 Results of AttributeConverters are mutable; workaround a regression in H6
Relates to #16551
2023-04-27 13:36:54 +02:00
vramik
b55be98115 Fix JpaClientModelCriteriaBuilder when querying by ALWAYS_DISPLAY_IN_CONSOLE with H6 2023-04-27 13:36:54 +02:00
Hynek Mlnarik
4189edc9f1 Fix dependency
Fixes: #16538
2023-04-27 13:36:54 +02:00
vramik
60e6fb9dae Register custom functions FunctionContributor
Closes #16336

---
Quarkus3 branch sync no. 6 (17.2.2023)
Resolved conflicts:
keycloak/testsuite/model/src/test/java/org/keycloak/testsuite/model/parameters/JpaMapStorage.java - Modified
keycloak/testsuite/model/src/test/java/org/keycloak/testsuite/model/parameters/JpaMapStorageCockroachdb.java - Modified
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaMapStorageProviderFactory.java - Modified
---
Quarkus3 branch sync no. 3 (27.1.2023)
Resolved conflicts:
keycloak/testsuite/model/src/test/java/org/keycloak/testsuite/model/parameters/JpaMapStorage.java - Modified
keycloak/testsuite/model/src/test/java/org/keycloak/testsuite/model/parameters/JpaMapStorageCockroachdb.java - Modified
2023-04-27 13:36:54 +02:00
Alexander Schwartz
33e2bcd94f Avoid warnings on bean validation as we don't use it in JPA
Closes #16502

---
Quarkus3 branch sync no. 6 (17.2.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaMapStorageProviderFactory.java - Modified
---
Quarkus3 branch sync no. 3 (27.1.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaMapStorageProviderFactory.java - Modified
2023-04-27 13:36:54 +02:00
Hynek Mlnarik
386c58c78b Use proper @Type annotation for JSON type
Fixes: #16335
---
Quarkus3 branch sync no. 11 (24.3.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaMapStorageProviderFactory.java - Modified
---
Quarkus3 branch sync no. 7 (27.2.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/client/entity/JpaClientEntity.java - Modified
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/clientScope/entity/JpaClientScopeEntity.java - Modified
2023-04-27 13:36:54 +02:00
Peter Zaoral
4ff2de7f46 Quarkus3 branch sync
18.1.2023:
* applied Quarkus 3 OpenRewrite recipe
* fixed the parts that were missed by the script

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
2023-04-27 13:36:54 +02:00
Alexander Schwartz
9d217d66a0 Align code with H6 DefaultAutoFlushEventListener
This is taken from Version 6.1.6

Closes #16334
2023-04-27 13:36:54 +02:00
Alexander Schwartz
137a2bf0e9 Remove functionality not supported in Hibernate 6
Closes #16330
2023-04-27 13:36:54 +02:00
Martin Bartoš
124591ce1a Adapters can still use Java EE
- Provided all JavaEE dependencies for adapters
- Automatically build Undertow Jakarta EE for testsuite (missing SAML)
---
Quarkus3 branch sync no. 11 (24.3.2023)
Resolved conflicts:
keycloak/adapters/oidc/spring-security/pom.xml - Modified
---
Quarkus3 branch sync no. 7 (27.2.2023)
Resolved conflicts:
keycloak/pom.xml - Modified
---
Quarkus3 branch sync no. 5 (10.2.2023)
Resolved conflicts:
keycloak/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/pom.xml - Modified
---
Quarkus3 branch sync no. 1 (18.1.2023)
Resolved conflicts:
keycloak/testsuite/integration-arquillian/tests/base/pom.xml - Modified
2023-04-27 13:36:54 +02:00
Stefan Guilhen
3111ef0085 Map Storage JPA fixes
---
Quarkus3 branch sync no. 6 (17.2.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaMapStorageProviderFactory.java - Modified
---
Quarkus3 branch sync no. 3 (27.1.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaMapStorageProviderFactory.java - Modified
2023-04-27 13:36:54 +02:00
Stefan Guilhen
384d7c17f7 - Fix issues in legacy store
- Testsuite (switch undertow-embedded.version)
2023-04-27 13:36:54 +02:00
Martin Bartoš
cecd059af2 WiP - Resolve failure with JakartaEE Tx and Infinispan/HotRod
---
Quarkus3 branch sync #1 (18.1.2023)
Resolved conflicts:
keycloak/quarkus/runtime/pom.xml - Modified
keycloak/quarkus/pom.xml - Modified
keycloak/quarkus/deployment/pom.xml - Modified
2023-04-27 13:36:54 +02:00
Stefan Guilhen
e505021681 Model upgrade Hibernate/JPA
---
Quarkus3 branch sync no. 14 (24.4.2023)
Resolved conflicts:
keycloak/pom.xml - Modified
---
Quarkus3 branch sync no. 13 (11.4.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaMapStorageProviderFactory.java - Modified
---
Quarkus3 branch sync no. 11 (24.3.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaMapStorageProviderFactory.java - Modified
---
Quarkus3 branch sync no. 7 (27.2.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/client/entity/JpaClientEntity.java - Modified
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/clientScope/entity/JpaClientScopeEntity.java - Modified
keycloak/pom.xml - Modified
---
Quarkus3 branch sync no. 6 (17.2.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaMapStorageProviderFactory.java - Modified
---
Quarkus3 branch sync no. 1 (18.1.2023)
Resolved conflicts:
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/hibernate/dialect/JsonbPostgreSQL95Dialect.java - Modified
2023-04-27 13:36:54 +02:00
Martin Bartoš
7cff857238 Migrate packages from javax.* to jakarta.*
---
Quarkus3 branch sync no. 14 (24.4.2023)
Resolved conflicts:
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/ComponentExportImportTest.java - Modified
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/DeclarativeUserTest.java - Modified
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/FederatedStorageExportImportTest.java - Modified
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/authentication/FlowTest.java - Modified
keycloak/services/src/main/java/org/keycloak/services/resources/admin/UserResource.java	- Modified
---
Quarkus3 branch sync no. 13 (11.4.2023)
Resolved conflicts:
keycloak/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/AccountTotpPage.java - Deleted
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/BackwardsCompatibilityUserStorageTest.java - Modified
---
Quarkus3 branch sync no. 12 (31.3.2023)
Resolved conflicts:
keycloak/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/services/resources/QuarkusWelcomeResource.java - Modified
keycloak/services/src/main/java/org/keycloak/protocol/saml/profile/util/Soap.java - Modified
keycloak/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/UserInfoClientUtil.java - Modified
keycloak/services/src/main/java/org/keycloak/protocol/oidc/endpoints/UserInfoEndpoint.java - Modified
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/sessionlimits/UserSessionLimitsTest.java - Modified
---
Quarkus3 branch sync no. 10 (17.3.2023)
Resolved conflicts:
keycloak/services/src/main/java/org/keycloak/protocol/saml/SamlProtocolUtils.java -	Modified
---
Quarkus3 branch sync no. 9 (10.3.2023)
Resolved conflicts:
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/kerberos/AbstractKerberosSingleRealmTest.java - Modified
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/LoginTest.java - Modified
---
Quarkus3 branch sync no. 8 (3.3.2023)
Resolved conflicts:
keycloak/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/SamlClient.java	Modified - Modified
keycloak/services/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java - Modified
keycloak/examples/providers/authenticator/src/main/java/org/keycloak/examples/authenticator/SecretQuestionAuthenticator.java - Modified
---
Quarkus3 branch sync no. 6 (17.2.2023)
Resolved conflicts:
keycloak/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ComponentsResource.java - Modified
keycloak/testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java - Modified
keycloak/services/src/main/java/org/keycloak/protocol/saml/installation/SamlSPDescriptorClientInstallation.java - Modified
---
Quarkus3 branch sync no. 5 (10.2.2023)
Resolved conflicts:
/keycloak/services/src/main/java/org/keycloak/social/google/GoogleIdentityProvider.java	Modified - Modified
keycloak/services/src/main/java/org/keycloak/social/twitter/TwitterIdentityProvider.java - Modified
---
Quarkus3 branch sync no. 4 (3.2.2023)
Resolved conflicts:
keycloak/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/integration/jaxrs/QuarkusKeycloakApplication.java - Modified
---
Quarkus3 branch sync no. 1 (18.1.2023)
Resolved conflicts:
keycloak/testsuite/client/ClientPoliciesTest.java - Deleted
keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/client/ClientRegistrationTest.java - Modified
keycloak/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/JpaModelCriteriaBuilder.java - Modified
2023-04-27 13:36:54 +02:00
Alexander Schwartz
7562f8ec6e Rewrite changelog SQL to make it work on Oracle
Closes #19841
2023-04-24 13:30:16 +02:00
Hynek Mlnarik
68b3c87666 Support for realm-less entities in providers (login failures)
Closes: #19818
2023-04-20 21:19:41 +02:00
rmartinc
5a3b8ee577 Avoid adding post.logout.redirect.uris if already defined as client attributes
Closes https://github.com/keycloak/keycloak/issues/16992
2023-04-19 10:48:17 +02:00