From f518576a4a6b41c001dddd67e2cf54d2bee93d36 Mon Sep 17 00:00:00 2001 From: John Blum Date: Tue, 29 Mar 2022 16:00:35 -0700 Subject: [PATCH] Add 'ssl-client-protocols' and 'ssl-server-protocols' properties to GemFireProperties. Closes #581. --- .../springframework/data/gemfire/GemFireProperties.java | 2 ++ .../data/gemfire/GemFirePropertiesUnitTests.java | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/spring-data-geode/src/main/java/org/springframework/data/gemfire/GemFireProperties.java b/spring-data-geode/src/main/java/org/springframework/data/gemfire/GemFireProperties.java index 8184c891..18787048 100644 --- a/spring-data-geode/src/main/java/org/springframework/data/gemfire/GemFireProperties.java +++ b/spring-data-geode/src/main/java/org/springframework/data/gemfire/GemFireProperties.java @@ -116,9 +116,11 @@ public enum GemFireProperties { SERVER_BIND_ADDRESS(ConfigurationProperties.SERVER_BIND_ADDRESS, String.class), SOCKET_BUFFER_SIZE(ConfigurationProperties.SOCKET_BUFFER_SIZE, Integer.class, 32768), SOCKET_LEASE_TIME(ConfigurationProperties.SOCKET_LEASE_TIME, Long.class, 60000L), + SSL_CLIENT_PROTOCOLS(ConfigurationProperties.SSL_CLIENT_PROTOCOLS, String.class, ""), SSL_ENABLED_COMPONENTS(ConfigurationProperties.SSL_ENABLED_COMPONENTS, String.class, "all"), SSL_ENDPOINT_IDENTIFICATION_ENABLED(ConfigurationProperties.SSL_ENDPOINT_IDENTIFICATION_ENABLED, Boolean.class, false), SSL_REQUIRE_AUTHENTICATION(ConfigurationProperties.SSL_REQUIRE_AUTHENTICATION, Boolean.class, true), + SSL_SERVER_PROTOCOLS(ConfigurationProperties.SSL_SERVER_PROTOCOLS, String.class, ""), SSL_CIPHERS(ConfigurationProperties.SSL_CIPHERS, String.class, "any"), SSL_CLUSTER_ALIAS(ConfigurationProperties.SSL_CLUSTER_ALIAS, String.class), SSL_DEFAULT_ALIAS(ConfigurationProperties.SSL_DEFAULT_ALIAS, String.class), diff --git a/spring-data-geode/src/test/java/org/springframework/data/gemfire/GemFirePropertiesUnitTests.java b/spring-data-geode/src/test/java/org/springframework/data/gemfire/GemFirePropertiesUnitTests.java index 84c00f2b..1ea7c8e9 100644 --- a/spring-data-geode/src/test/java/org/springframework/data/gemfire/GemFirePropertiesUnitTests.java +++ b/spring-data-geode/src/test/java/org/springframework/data/gemfire/GemFirePropertiesUnitTests.java @@ -43,7 +43,7 @@ import org.springframework.util.ReflectionUtils; */ public class GemFirePropertiesUnitTests { - private static final Set deprecatedGemFireProperties = Collections.unmodifiableSet(new HashSet<>(Arrays.asList( + private static final Set deprecatedGemFireProperties = asUnmodifiableSet( "cluster-ssl-ciphers", // all 'cluster-ssl-*' properties replaced by 'ssl-*' properties "cluster-ssl-enabled", "cluster-ssl-keystore", @@ -60,7 +60,12 @@ public class GemFirePropertiesUnitTests { "security-client-authenticator", // replaced by SecurityManager "security-client-dhalgo", // use SSL instead "security-peer-authenticator" // replaced by SecurityManager - ))); + ); + + @SuppressWarnings("unchecked") + private static Set asUnmodifiableSet(T... array) { + return Collections.unmodifiableSet(new HashSet<>(Arrays.asList(array))); + } private Set resolveActualGemFirePropertyNames() {