From 050acf0d94986523ede1c3d8a25b068f2f027b6e Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Fri, 8 Mar 2024 16:17:24 +0100 Subject: [PATCH] Map Storage Removal: Remove deprecated model/legacy module (#27601) Closes #26657 Signed-off-by: Alexander Schwartz --- .../topics/keycloak/changes-25_0_0.adoc | 4 ++ model/legacy/pom.xml | 21 ----------- .../LegacyUserCredentialManager.java | 37 ------------------- .../org/keycloak/models/LegacyRealmModel.java | 27 -------------- .../keycloak/storage/LegacyStoreManagers.java | 26 ------------- model/pom.xml | 1 - pom.xml | 5 --- quarkus/runtime/pom.xml | 10 ----- 8 files changed, 4 insertions(+), 127 deletions(-) delete mode 100644 model/legacy/pom.xml delete mode 100644 model/legacy/src/main/java/org/keycloak/credential/LegacyUserCredentialManager.java delete mode 100644 model/legacy/src/main/java/org/keycloak/models/LegacyRealmModel.java delete mode 100644 model/legacy/src/main/java/org/keycloak/storage/LegacyStoreManagers.java diff --git a/docs/documentation/upgrading/topics/keycloak/changes-25_0_0.adoc b/docs/documentation/upgrading/topics/keycloak/changes-25_0_0.adoc index 77679bb59c..8a9601781f 100644 --- a/docs/documentation/upgrading/topics/keycloak/changes-25_0_0.adoc +++ b/docs/documentation/upgrading/topics/keycloak/changes-25_0_0.adoc @@ -3,3 +3,7 @@ The nonce claim is now only added to the ID token strictly following the OpenID Connect Core 1.0 specification. As indicated in the specification, the claim is compulsory inside the https://openid.net/specs/openid-connect-core-1_0.html#IDToken[ID token] when the same parameter was sent in the authorization request. The specification also recommends to not add the `nonce` after a https://openid.net/specs/openid-connect-core-1_0.html#RefreshTokenResponse[refresh request]. Previously, the claim was set to all the tokens (Access, Refresh and ID) in all the responses (refresh included). A new `Nonce backwards compatible` mapper is also included in the software that can be assigned to client scopes to revert to the old behavior. For example, the JS adapter checked the returned `nonce` claim in all the tokens before fixing issue https://github.com/keycloak/keycloak/issues/26651[#26651] in version 24.0.0. Therefore, if an old version of the JS adapter is used, the mapper should be added to the required clients by using client scopes. + += Removed a model module + +The module `org.keycloak:keycloak-model-legacy` module was deprecated in a previous release and is removed in this release. Use the `org.keycloak:keycloak-model-storage` module instead. diff --git a/model/legacy/pom.xml b/model/legacy/pom.xml deleted file mode 100644 index 476a1c6c8b..0000000000 --- a/model/legacy/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - keycloak-model-pom - org.keycloak - 999.0.0-SNAPSHOT - - 4.0.0 - - keycloak-model-legacy - Keycloak Legacy Database Support - - - - - org.keycloak - keycloak-model-storage - - - - \ No newline at end of file diff --git a/model/legacy/src/main/java/org/keycloak/credential/LegacyUserCredentialManager.java b/model/legacy/src/main/java/org/keycloak/credential/LegacyUserCredentialManager.java deleted file mode 100644 index 881d6abe41..0000000000 --- a/model/legacy/src/main/java/org/keycloak/credential/LegacyUserCredentialManager.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2022. Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.credential; - -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.models.UserModel; - -/** - * Handling credentials for a given user for the store. - * @deprecated Class was renamed to {@link UserCredentialManager} in org.keycloak:keycloak-model-storage which should be used from now on. This class will be removed in the next release. - * - * @author Alexander Schwartz - */ -@Deprecated -public class LegacyUserCredentialManager extends UserCredentialManager { - - public LegacyUserCredentialManager(KeycloakSession session, RealmModel realm, UserModel user) { - super(session, realm, user); - } -} - diff --git a/model/legacy/src/main/java/org/keycloak/models/LegacyRealmModel.java b/model/legacy/src/main/java/org/keycloak/models/LegacyRealmModel.java deleted file mode 100644 index 0ad5637deb..0000000000 --- a/model/legacy/src/main/java/org/keycloak/models/LegacyRealmModel.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2022 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.models; - -/** - * @deprecated Interface was renamed to {@link StorageProviderRealmModel} in org.keycloak:keycloak-model-storage which should be used from now on. This Interface will be removed in the next release. - * @author Alexander Schwartz - */ -@Deprecated -public interface LegacyRealmModel extends StorageProviderRealmModel { - -} diff --git a/model/legacy/src/main/java/org/keycloak/storage/LegacyStoreManagers.java b/model/legacy/src/main/java/org/keycloak/storage/LegacyStoreManagers.java deleted file mode 100644 index 25aaafce14..0000000000 --- a/model/legacy/src/main/java/org/keycloak/storage/LegacyStoreManagers.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2022 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.storage; - -/** - * @deprecated Interface was renamed to {@link StoreManagers} in org.keycloak:keycloak-model-storage which should be used from now on. This Interface will be removed in the next release. - */ -@Deprecated -public interface LegacyStoreManagers extends StoreManagers { - -} diff --git a/model/pom.xml b/model/pom.xml index 97b9188ac5..373f164947 100755 --- a/model/pom.xml +++ b/model/pom.xml @@ -31,7 +31,6 @@ pom - legacy storage storage-private storage-services diff --git a/pom.xml b/pom.xml index db1515a877..18c3d8abc2 100644 --- a/pom.xml +++ b/pom.xml @@ -1218,11 +1218,6 @@ keycloak-model-jpa ${project.version} - - org.keycloak - keycloak-model-legacy - ${project.version} - org.keycloak keycloak-model-storage diff --git a/quarkus/runtime/pom.xml b/quarkus/runtime/pom.xml index 24494b6e03..0b5cf28e07 100644 --- a/quarkus/runtime/pom.xml +++ b/quarkus/runtime/pom.xml @@ -247,16 +247,6 @@ - - org.keycloak - keycloak-model-legacy - - - * - * - - - org.keycloak keycloak-model-storage-private