DATAGEODE-190 - Add support to EnableSsl for ssl-use-default-context and ssl-endpoint-identification-enabled.

Resolves gh-21.
This commit is contained in:
Srikanth Manvi
2019-05-20 12:28:20 -04:00
committed by John Blum
parent 93f1fc4d90
commit 7adf99d788
4 changed files with 357 additions and 3 deletions

View File

@@ -200,6 +200,29 @@ public @interface EnableSsl {
*/
boolean webRequireAuthentication() default false;
/**
* If {@literal true} then allows the use of default SSL context and sets
* ssl-endpoint-identification-enabled to true.
*
* Defaults to {@literal false}.
*
* Use the {@literal spring.data.gemfire.security.ssl.use-default-context}
* in {@literal application.properties}.
*/
boolean sslUseDefaultContext() default false;
/**
* If {@literal true} clients (GemFire servers in cause of p2p) to validate server's
* hostname using server`s certificate.
*
* Defaults to {@literal false}. Set to {@literal true} if
* {@literal useSSLDefaultDefaultContext} is true.
*
* Use the {@literal spring.data.gemfire.security.ssl.endpoint-identification-enabled}
* in {@literal application.properties}.
*/
boolean sslEndpointIdentificationEnabled() default false;
enum Component {
ALL(SecurableCommunicationChannels.ALL),

View File

@@ -103,7 +103,14 @@ public class SslConfiguration extends EmbeddedServiceConfigurationSupport {
.setProperty("ssl-web-require-authentication",
resolveProperty(sslProperty("web-require-authentication"),
annotationAttributes.getBoolean("webRequireAuthentication")));
annotationAttributes.getBoolean("webRequireAuthentication")))
.setProperty("ssl-use-default-context", resolveProperty(sslProperty("use-default-context"),
annotationAttributes.getBoolean("sslUseDefaultContext")))
.setProperty("ssl-endpoint-identification-enabled", resolveProperty(sslProperty("endpoint-identification-enabled"),
annotationAttributes.getBoolean("sslEndpointIdentificationEnabled")));
configureComponentCertificateAliases(annotationAttributes, gemfireProperties);