From 7398d7e1edd971db191607faf90fca8292f56efc Mon Sep 17 00:00:00 2001 From: Dominik Guhr Date: Thu, 20 Oct 2022 11:27:09 +0200 Subject: [PATCH] initial impl of running export/import without serving --- .../src/main/java/org/keycloak/config/HttpOptions.java | 7 +++++++ .../runtime/configuration/mappers/HttpPropertyMappers.java | 4 ++++ quarkus/runtime/src/main/resources/META-INF/keycloak.conf | 1 + 3 files changed, 12 insertions(+) diff --git a/quarkus/config-api/src/main/java/org/keycloak/config/HttpOptions.java b/quarkus/config-api/src/main/java/org/keycloak/config/HttpOptions.java index 667f4aa68a..937fa31b13 100644 --- a/quarkus/config-api/src/main/java/org/keycloak/config/HttpOptions.java +++ b/quarkus/config-api/src/main/java/org/keycloak/config/HttpOptions.java @@ -100,4 +100,11 @@ public class HttpOptions { .description("The type of the trust store file. " + "If not given, the type is automatically detected based on the file name.") .build(); + + public static final Option HTTP_SERVER_ENABLED = new OptionBuilder<>("http-server-enabled", Boolean.class) + .category(OptionCategory.HTTP) + .hidden() + .description("Enables or disables the HTTP/s and Socket serving.") + .defaultValue(Boolean.TRUE) + .build(); } diff --git a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/HttpPropertyMappers.java b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/HttpPropertyMappers.java index bfc167be8a..954783870e 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/HttpPropertyMappers.java +++ b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/HttpPropertyMappers.java @@ -27,6 +27,10 @@ final class HttpPropertyMappers { .transformer(HttpPropertyMappers::getHttpEnabledTransformer) .paramLabel(Boolean.TRUE + "|" + Boolean.FALSE) .build(), + fromOption(HttpOptions.HTTP_SERVER_ENABLED) + .to("quarkus.http.host-enabled") + .paramLabel(Boolean.TRUE + "|" + Boolean.FALSE) + .build(), fromOption(HttpOptions.HTTP_HOST) .to("quarkus.http.host") .paramLabel("host") diff --git a/quarkus/runtime/src/main/resources/META-INF/keycloak.conf b/quarkus/runtime/src/main/resources/META-INF/keycloak.conf index 8b64759435..9b32673713 100644 --- a/quarkus/runtime/src/main/resources/META-INF/keycloak.conf +++ b/quarkus/runtime/src/main/resources/META-INF/keycloak.conf @@ -19,6 +19,7 @@ metrics-enabled=false # The default configuration when running in import or export mode %import_export.http-enabled=true +%import_export.http-server-enabled=false %import_export.hostname-strict=false %import_export.hostname-strict-https=false