diff --git a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/storage/infinispan/CacheManagerFactory.java b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/storage/infinispan/CacheManagerFactory.java index cef481b8de..0286ca6914 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/storage/infinispan/CacheManagerFactory.java +++ b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/storage/infinispan/CacheManagerFactory.java @@ -401,7 +401,7 @@ public class CacheManagerFactory { private static void configureTransportStack(ConfigurationBuilderHolder builder, EntityManager em) { var transportConfig = builder.getGlobalConfigurationBuilder().transport(); - if (Configuration.isTrue(CachingOptions.CACHE_EMBEDDED_MTLS_ENABLED_PROPERTY)) { + if (Configuration.isTrue(CachingOptions.CACHE_EMBEDDED_MTLS_ENABLED)) { validateTlsAvailable(transportConfig.build()); var tls = new TLS() .enabled(true) diff --git a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/OptionsDistTest.java b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/OptionsDistTest.java index 3572ab1705..9760c94d7a 100644 --- a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/OptionsDistTest.java +++ b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/OptionsDistTest.java @@ -33,6 +33,7 @@ import org.keycloak.it.utils.KeycloakDistribution; import java.nio.file.Paths; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.keycloak.quarkus.runtime.cli.command.Main.CONFIG_FILE_LONG_NAME; @DistributionTest @@ -96,17 +97,24 @@ public class OptionsDistTest { result.assertMessage("- log-syslog-app-name: Available only when Syslog is activated."); } + @Test + @Order(7) + @Launch({"start", "--cache-embedded-mtls-enabled=true", "--http-enabled=true", "--hostname-strict=false"}) + public void testCacheEmbeddedMtlsEnabled(LaunchResult result) { + assertTrue(result.getOutputStream().stream().anyMatch(s -> s.contains("Property cache-embedded-mtls-key-store-file required but not specified"))); + } + // Start-dev should be executed as last tests - build is done for development mode @Test - @Order(7) + @Order(8) @Launch({"start-dev", "--test=invalid"}) public void testServerDoesNotStartIfValidationFailDuringReAugStartDev(LaunchResult result) { assertEquals(1, result.getErrorStream().stream().filter(s -> s.contains("Unknown option: '--test'")).count()); } @Test - @Order(8) + @Order(9) @Launch({"start-dev", "--log=console", "--log-file-output=json"}) public void testServerDoesNotStartDevIfDisabledFileLogOption(LaunchResult result) { assertEquals(1, result.getErrorStream().stream().filter(s -> s.contains("Disabled option: '--log-file-output'. Available only when File log handler is activated")).count()); @@ -114,7 +122,7 @@ public class OptionsDistTest { } @Test - @Order(9) + @Order(10) @Launch({"start-dev", "--log=file", "--log-file-output=json", "--log-console-color=true"}) public void testServerStartDevIfEnabledFileLogOption(LaunchResult result) { assertEquals(0, result.getErrorStream().stream().filter(s -> s.contains("Disabled option: '--log-file-output'. Available only when File log handler is activated")).count());