From 4fbf6841be367bcd432812fd8ba074ff2a602741 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Mon, 12 Oct 2015 14:24:52 +0200 Subject: [PATCH] KEYCLOAK-1944 Remove winzipaes import/export provider --- dependencies/server-all/pom.xml | 16 --- .../base/de/idyl/winzipaes/main/module.xml | 14 -- .../main/module.xml | 26 ---- .../WEB-INF/jboss-deployment-structure.xml | 1 - .../keycloak-services/main/module.xml | 1 - .../eap6/eap6-server-modules/build.xml | 9 -- .../modules/de/idyl/winzipaes/main/module.xml | 13 -- .../WEB-INF/jboss-deployment-structure.xml | 1 - .../main/module.xml | 26 ---- .../keycloak-services/main/module.xml | 1 - .../wf9-server-overlay/assembly.xml | 1 - .../en/en-US/modules/export-import.xml | 23 +-- export-import/export-import-zip/pom.xml | 67 --------- .../exportimport/zip/ZipExportProvider.java | 82 ----------- .../zip/ZipExportProviderFactory.java | 50 ------- .../exportimport/zip/ZipImportProvider.java | 135 ------------------ .../zip/ZipImportProviderFactory.java | 47 ------ ...eycloak.exportimport.ExportProviderFactory | 1 - ...eycloak.exportimport.ImportProviderFactory | 1 - export-import/pom.xml | 1 - pom.xml | 13 -- .../exportimport/ExportImportTest.java | 25 ---- 22 files changed, 3 insertions(+), 551 deletions(-) delete mode 100644 distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/de/idyl/winzipaes/main/module.xml delete mode 100755 distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-export-import-zip/main/module.xml delete mode 100755 distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/de/idyl/winzipaes/main/module.xml delete mode 100755 distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-export-import-zip/main/module.xml delete mode 100755 export-import/export-import-zip/pom.xml delete mode 100755 export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProvider.java delete mode 100755 export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java delete mode 100755 export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProvider.java delete mode 100755 export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java delete mode 100644 export-import/export-import-zip/src/main/resources/META-INF/services/org.keycloak.exportimport.ExportProviderFactory delete mode 100644 export-import/export-import-zip/src/main/resources/META-INF/services/org.keycloak.exportimport.ImportProviderFactory diff --git a/dependencies/server-all/pom.xml b/dependencies/server-all/pom.xml index 3776340d34..f54c396681 100755 --- a/dependencies/server-all/pom.xml +++ b/dependencies/server-all/pom.xml @@ -141,22 +141,6 @@ mongo-java-driver - - - org.keycloak - keycloak-export-import-zip - - - de.idyl - winzipaes - - - org.bouncycastle - bcprov-jdk16 - - - - org.liquibase liquibase-core diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/de/idyl/winzipaes/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/de/idyl/winzipaes/main/module.xml deleted file mode 100644 index ef5c336abb..0000000000 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/de/idyl/winzipaes/main/module.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-export-import-zip/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-export-import-zip/main/module.xml deleted file mode 100755 index 2324a65cac..0000000000 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-export-import-zip/main/module.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml index 32cd209890..11f8141941 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml @@ -21,7 +21,6 @@ - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml index 122af6d077..77ce3ad8dc 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml @@ -31,7 +31,6 @@ - diff --git a/distribution/server-overlay/eap6/eap6-server-modules/build.xml b/distribution/server-overlay/eap6/eap6-server-modules/build.xml index 3941fb99ac..22764719ac 100755 --- a/distribution/server-overlay/eap6/eap6-server-modules/build.xml +++ b/distribution/server-overlay/eap6/eap6-server-modules/build.xml @@ -278,15 +278,6 @@ - - - - - - - - - diff --git a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/de/idyl/winzipaes/main/module.xml b/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/de/idyl/winzipaes/main/module.xml deleted file mode 100755 index 10f1103cfd..0000000000 --- a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/de/idyl/winzipaes/main/module.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-as7-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml b/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-as7-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml index 32cd209890..11f8141941 100755 --- a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-as7-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml +++ b/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-as7-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml @@ -21,7 +21,6 @@ - diff --git a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-export-import-zip/main/module.xml b/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-export-import-zip/main/module.xml deleted file mode 100755 index e82fe4e8dc..0000000000 --- a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-export-import-zip/main/module.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml b/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml index 75e1181eb7..44703f8a5d 100755 --- a/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml +++ b/distribution/server-overlay/eap6/eap6-server-modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml @@ -31,7 +31,6 @@ - diff --git a/distribution/server-overlay/wf9-server-overlay/assembly.xml b/distribution/server-overlay/wf9-server-overlay/assembly.xml index fc440799f9..080671d5ad 100755 --- a/distribution/server-overlay/wf9-server-overlay/assembly.xml +++ b/distribution/server-overlay/wf9-server-overlay/assembly.xml @@ -14,7 +14,6 @@ modules/system/layers/base com/google/zxing/** - de/idyl/winzipaes/** org/freemarker/** org/keycloak/** org/liquibase/** diff --git a/docbook/auth-server-docs/reference/en/en-US/modules/export-import.xml b/docbook/auth-server-docs/reference/en/en-US/modules/export-import.xml index 492a84758b..fbd6016548 100755 --- a/docbook/auth-server-docs/reference/en/en-US/modules/export-import.xml +++ b/docbook/auth-server-docs/reference/en/en-US/modules/export-import.xml @@ -8,12 +8,11 @@ You can export/import your database either to: - Encrypted ZIP file on local filesystem Directory on local filesystem Single JSON file on your filesystem - When importing using the "dir" or "zip" strategies, note that the files need to follow the naming convention specified below. + When importing using the "dir" strategy, note that the files need to follow the naming convention specified below. If you are importing files which were previously exported, the files already follow this convention. {REALM_NAME}-realm.json, such as "acme-roadrunner-affairs-realm.json" for the realm named "acme-roadrunner-affairs" @@ -21,26 +20,10 @@ - Encrypted ZIP is recommended as export contains many sensitive informations like passwords of your users (even if they are hashed), - but also their email addresses, and especially private keys of the realms. Directory and Single JSON file are useful especially - for testing as data in the files are not protected. On the other hand, it's useful if you want to look at all your data in JSON - files directly. - - - If you import to ZIP or Directory, you can specify also the number of users to be stored in each JSON file. So if you have + If you import to Directory, you can specify also the number of users to be stored in each JSON file. So if you have very large amount of users in your database, you likely don't want to import them into single file as the file might be very big. Processing of each file is done in separate transaction as exporting/importing all users at once could also lead to memory issues. - - So to export the content of your Keycloak database into encrypted ZIP, you can execute Keycloak server with the System properties like: - --Dkeycloak.migration.zipPassword= -]]> - Then you can move or copy the encrypted ZIP file into second environment and you can trigger import from it into Keycloak server with the same command but use - -Dkeycloak.migration.action=import instead of export . - To export into unencrypted directory you can use: -Dkeycloak.migration.usersExportStrategy - can be used to specify for ZIP or Directory providers to specify where to import users. + can be used to specify for Directory providers to specify where to import users. Possible values are: DIFFERENT_FILES - Users will be exported into more different files according to maximum number of users per file. This is default value diff --git a/export-import/export-import-zip/pom.xml b/export-import/export-import-zip/pom.xml deleted file mode 100755 index b396fa6011..0000000000 --- a/export-import/export-import-zip/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - keycloak-export-import-parent - org.keycloak - 1.6.0.Final-SNAPSHOT - ../pom.xml - - 4.0.0 - - keycloak-export-import-zip - Keycloak Export Import To Encrypted ZIP - - - - - org.keycloak - keycloak-core - provided - - - org.keycloak - keycloak-model-api - provided - - - org.keycloak - keycloak-export-import-api - provided - - - org.codehaus.jackson - jackson-core-asl - provided - - - org.codehaus.jackson - jackson-mapper-asl - provided - - - org.jboss.logging - jboss-logging - provided - - - de.idyl - winzipaes - provided - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - - - - - diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProvider.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProvider.java deleted file mode 100755 index 1c9212e198..0000000000 --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProvider.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.keycloak.exportimport.zip; - -import de.idyl.winzipaes.AesZipFileEncrypter; -import de.idyl.winzipaes.impl.AESEncrypter; -import de.idyl.winzipaes.impl.AESEncrypterBC; -import org.jboss.logging.Logger; -import org.keycloak.representations.VersionRepresentation; -import org.keycloak.exportimport.util.ExportUtils; -import org.keycloak.exportimport.util.MultipleStepsExportProvider; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; -import org.keycloak.models.UserModel; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.util.JsonSerialization; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.util.List; - -/** - * @author Marek Posolda - */ -public class ZipExportProvider extends MultipleStepsExportProvider { - - private static final Logger logger = Logger.getLogger(ZipExportProvider.class); - - private final AesZipFileEncrypter encrypter; - private final String password; - - public ZipExportProvider(File zipFile, String password) { - if (zipFile.exists()) { - throw new IllegalStateException("File " + zipFile.getAbsolutePath() + " already exists"); - } - this.password = password; - - try { - AESEncrypter encrypter = new AESEncrypterBC(); - this.encrypter = new AesZipFileEncrypter(zipFile, encrypter); - } catch (IOException ioe) { - throw new RuntimeException(ioe); - } - logger.infof("Exporting into zip file %s", zipFile.getAbsolutePath()); - } - - @Override - protected void writeRealm(String fileName, RealmRepresentation rep) throws IOException { - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - JsonSerialization.mapper.writeValue(stream, rep); - writeStream(fileName, stream); - } - - @Override - protected void writeUsers(String fileName, KeycloakSession session, RealmModel realm, List users) throws IOException { - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - ExportUtils.exportUsersToStream(session, realm, users, JsonSerialization.mapper, stream); - writeStream(fileName, stream); - } - - @Override - protected void writeVersion(String fileName, VersionRepresentation version) throws IOException { - ByteArrayOutputStream stream = new ByteArrayOutputStream(); - JsonSerialization.mapper.writeValue(stream, version); - writeStream(fileName, stream); - } - - private void writeStream(String fileName, ByteArrayOutputStream stream) throws IOException { - byte[] byteArray = stream.toByteArray(); - ByteArrayInputStream bis = new ByteArrayInputStream(byteArray); - this.encrypter.add(fileName, bis, this.password); - } - - @Override - public void close() { - try { - this.encrypter.close(); - } catch (IOException ioe) { - throw new RuntimeException(ioe); - } - } -} diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java deleted file mode 100755 index 2fd45d4b93..0000000000 --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.keycloak.exportimport.zip; - -import org.keycloak.Config; -import org.keycloak.exportimport.ExportImportConfig; -import org.keycloak.exportimport.ExportProvider; -import org.keycloak.exportimport.ExportProviderFactory; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakSessionFactory; - -import java.io.File; - -/** - * @author Marek Posolda - */ -public class ZipExportProviderFactory implements ExportProviderFactory { - - - public static final String PROVIDER_ID = "zip"; - - @Override - public ExportProvider create(KeycloakSession session) { - String fileName = ExportImportConfig.getZipFile(); - String password = ExportImportConfig.getZipPassword(); - if (fileName == null) { - throw new IllegalArgumentException("ZIP file for export not provided"); - } - if (password == null) { - throw new IllegalArgumentException("Password for encrypting ZIP not provided"); - } - return new ZipExportProvider(new File(fileName), password); - } - - @Override - public void init(Config.Scope config) { - } - - @Override - public void postInit(KeycloakSessionFactory factory) { - - } - - @Override - public void close() { - } - - @Override - public String getId() { - return PROVIDER_ID; - } -} diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProvider.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProvider.java deleted file mode 100755 index c9e617853a..0000000000 --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProvider.java +++ /dev/null @@ -1,135 +0,0 @@ -package org.keycloak.exportimport.zip; - -import de.idyl.winzipaes.AesZipFileDecrypter; -import de.idyl.winzipaes.impl.AESDecrypter; -import de.idyl.winzipaes.impl.AESDecrypterBC; -import de.idyl.winzipaes.impl.ExtZipEntry; -import org.jboss.logging.Logger; -import org.keycloak.Config; -import org.keycloak.exportimport.ImportProvider; -import org.keycloak.exportimport.Strategy; -import org.keycloak.exportimport.util.ExportImportSessionTask; -import org.keycloak.exportimport.util.ImportUtils; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.models.utils.KeycloakModelUtils; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.util.JsonSerialization; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.zip.DataFormatException; - -/** - * @author Marek Posolda - */ -public class ZipImportProvider implements ImportProvider { - - private static final Logger logger = Logger.getLogger(ZipImportProvider.class); - - private final AesZipFileDecrypter decrypter; - private final String password; - - public ZipImportProvider(File zipFile, String password) { - try { - if (!zipFile.exists()) { - throw new IllegalStateException("File " + zipFile.getAbsolutePath() + " doesn't exists"); - } - - AESDecrypter decrypter = new AESDecrypterBC(); - this.decrypter = new AesZipFileDecrypter(zipFile, decrypter); - this.password = password; - } catch (IOException ioe) { - throw new RuntimeException(ioe); - } - logger.infof("Importing from ZIP file %s", zipFile.getAbsolutePath()); - } - - @Override - public void importModel(KeycloakSessionFactory factory, Strategy strategy) throws IOException { - List realmNames = getRealmsToImport(); - - for (String realmName : realmNames) { - importRealm(factory, realmName, strategy); - } - } - - @Override - public boolean isMasterRealmExported() throws IOException { - List realmNames = getRealmsToImport(); - return realmNames.contains(Config.getAdminRealm()); - } - - private List getRealmsToImport() throws IOException { - List realmNames = new ArrayList(); - for (ExtZipEntry entry : this.decrypter.getEntryList()) { - String entryName = entry.getName(); - if (entryName.endsWith("-realm.json")) { - // Parse "foo" from "foo-realm.json" - String realmName = entryName.substring(0, entryName.length() - 11); - - // Ensure that master realm is imported first - if (Config.getAdminRealm().equals(realmName)) { - realmNames.add(0, realmName); - } else { - realmNames.add(realmName); - } - } - } - return realmNames; - } - - @Override - public void importRealm(KeycloakSessionFactory factory, final String realmName, final Strategy strategy) throws IOException { - try { - // Import realm first - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - this.decrypter.extractEntry(this.decrypter.getEntry(realmName + "-realm.json"), bos, this.password); - ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); - final RealmRepresentation realmRep = JsonSerialization.mapper.readValue(bis, RealmRepresentation.class); - - KeycloakModelUtils.runJobInTransaction(factory, new ExportImportSessionTask() { - - @Override - protected void runExportImportTask(KeycloakSession session) throws IOException { - ImportUtils.importRealm(session, realmRep, strategy); - } - - }); - - - // Import users - for (ExtZipEntry entry : this.decrypter.getEntryList()) { - String name = entry.getName(); - if (name.matches(realmName + "-users-[0-9]+\\.json")) { - bos = new ByteArrayOutputStream(); - this.decrypter.extractEntry(entry, bos, this.password); - final ByteArrayInputStream bis2 = new ByteArrayInputStream(bos.toByteArray()); - - KeycloakModelUtils.runJobInTransaction(factory, new ExportImportSessionTask() { - - @Override - protected void runExportImportTask(KeycloakSession session) throws IOException { - ImportUtils.importUsersFromStream(session, realmName, JsonSerialization.mapper, bis2); - } - }); - } - } - } catch (DataFormatException dfe) { - throw new RuntimeException(dfe); - } - } - - @Override - public void close() { - try { - this.decrypter.close(); - } catch (IOException ioe) { - throw new RuntimeException(ioe); - } - } -} diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java deleted file mode 100755 index 1aed3a5b91..0000000000 --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.keycloak.exportimport.zip; - -import org.keycloak.Config; -import org.keycloak.exportimport.ExportImportConfig; -import org.keycloak.exportimport.ImportProvider; -import org.keycloak.exportimport.ImportProviderFactory; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakSessionFactory; - -import java.io.File; - -/** - * @author Marek Posolda - */ -public class ZipImportProviderFactory implements ImportProviderFactory { - - @Override - public ImportProvider create(KeycloakSession session) { - String fileName = ExportImportConfig.getZipFile(); - String password = ExportImportConfig.getZipPassword(); - if (fileName == null) { - throw new IllegalArgumentException("ZIP file for import not provided"); - } - if (password == null) { - throw new IllegalArgumentException("Password for decrypting ZIP not provided"); - } - return new ZipImportProvider(new File(fileName), password); - } - - @Override - public void init(Config.Scope config) { - } - - @Override - public void postInit(KeycloakSessionFactory factory) { - - } - - @Override - public void close() { - } - - @Override - public String getId() { - return ZipExportProviderFactory.PROVIDER_ID; - } -} diff --git a/export-import/export-import-zip/src/main/resources/META-INF/services/org.keycloak.exportimport.ExportProviderFactory b/export-import/export-import-zip/src/main/resources/META-INF/services/org.keycloak.exportimport.ExportProviderFactory deleted file mode 100644 index dce02f18db..0000000000 --- a/export-import/export-import-zip/src/main/resources/META-INF/services/org.keycloak.exportimport.ExportProviderFactory +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.exportimport.zip.ZipExportProviderFactory \ No newline at end of file diff --git a/export-import/export-import-zip/src/main/resources/META-INF/services/org.keycloak.exportimport.ImportProviderFactory b/export-import/export-import-zip/src/main/resources/META-INF/services/org.keycloak.exportimport.ImportProviderFactory deleted file mode 100644 index b88f372286..0000000000 --- a/export-import/export-import-zip/src/main/resources/META-INF/services/org.keycloak.exportimport.ImportProviderFactory +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.exportimport.zip.ZipImportProviderFactory \ No newline at end of file diff --git a/export-import/pom.xml b/export-import/pom.xml index 35a6f0bb14..2c7026ca55 100755 --- a/export-import/pom.xml +++ b/export-import/pom.xml @@ -18,7 +18,6 @@ export-import-api export-import-dir export-import-single-file - export-import-zip diff --git a/pom.xml b/pom.xml index 65968cb269..e5f7d4a4f9 100755 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,6 @@ 1.0.2.Final 3.2.1 2011.1 - 1.0.1 2.3.23 4.0.4 2.35.0 @@ -373,13 +372,6 @@ test - - - de.idyl - winzipaes - ${winzipaes.version} - - org.apache.directory.server @@ -700,11 +692,6 @@ keycloak-export-import-single-file ${project.version} - - org.keycloak - keycloak-export-import-zip - ${project.version} - org.keycloak keycloak-kerberos-federation diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java index 84557d9bbd..1fc4fc22a0 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java @@ -10,7 +10,6 @@ import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.dir.DirExportProvider; import org.keycloak.exportimport.dir.DirExportProviderFactory; import org.keycloak.exportimport.singlefile.SingleFileExportProviderFactory; -import org.keycloak.exportimport.zip.ZipExportProviderFactory; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.RealmProvider; @@ -217,30 +216,6 @@ public class ExportImportTest { } } - @Test - public void testZipFullExportImport() throws Throwable { - ExportImportConfig.setProvider(ZipExportProviderFactory.PROVIDER_ID); - String zipFilePath = getExportImportTestDirectory() + File.separator + "export-full.zip"; - new File(zipFilePath).delete(); - ExportImportConfig.setZipFile(zipFilePath); - ExportImportConfig.setZipPassword("encPassword"); - ExportImportConfig.setUsersPerFile(ExportImportConfig.DEFAULT_USERS_PER_FILE); - - testFullExportImport(); - } - - @Test - public void testZipRealmExportImport() throws Throwable { - ExportImportConfig.setProvider(ZipExportProviderFactory.PROVIDER_ID); - String zipFilePath = getExportImportTestDirectory() + File.separator + "export-realm.zip"; - new File(zipFilePath).delete(); - ExportImportConfig.setZipFile(zipFilePath); - ExportImportConfig.setZipPassword("encPassword"); - ExportImportConfig.setUsersPerFile(3); - - testRealmExportImport(); - } - private void testFullExportImport() { ExportImportConfig.setAction(ExportImportConfig.ACTION_EXPORT); ExportImportConfig.setRealmName(null);