diff --git a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/ConfigArgsConfigSource.java b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/ConfigArgsConfigSource.java index 54db629362..6e00088373 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/ConfigArgsConfigSource.java +++ b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/ConfigArgsConfigSource.java @@ -172,7 +172,7 @@ public class ConfigArgsConfigSource extends PropertiesConfigSource { continue; } - String[] keyValue = ARG_KEY_VALUE_SPLIT.split(arg); + String[] keyValue = ARG_KEY_VALUE_SPLIT.split(arg, 2); String key = keyValue[0]; if ("".equals(key.trim())) { diff --git a/quarkus/runtime/src/test/java/org/keycloak/quarkus/runtime/configuration/test/ConfigurationTest.java b/quarkus/runtime/src/test/java/org/keycloak/quarkus/runtime/configuration/test/ConfigurationTest.java index 8e3484eaee..7ef768424e 100644 --- a/quarkus/runtime/src/test/java/org/keycloak/quarkus/runtime/configuration/test/ConfigurationTest.java +++ b/quarkus/runtime/src/test/java/org/keycloak/quarkus/runtime/configuration/test/ConfigurationTest.java @@ -373,6 +373,13 @@ public class ConfigurationTest { assertEquals("enabled", config.getConfigValue("quarkus.datasource.jdbc.transactions").getValue()); } + @Test + public void testOptionValueWithEqualSign() { + System.setProperty(CLI_ARGS, "--db-password=my_secret="); + SmallRyeConfig config = createConfig(); + assertEquals("my_secret=", config.getConfigValue("kc.db.password").getValue()); + } + private Config.Scope initConfig(String... scope) { Config.init(new MicroProfileConfigProvider(createConfig())); return Config.scope(scope);