DATAGEODE-273 - Enable SSL Endpoint Identification (set ssl-endpoint-identification-enabled to true) and add additional logic to test the SSL failures.
This commit is contained in:
committed by
Greg Turnquist
parent
589cf442c4
commit
3c1cfee161
@@ -13,7 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.data.gemfire.client;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
@@ -28,16 +27,18 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.apache.geode.cache.CacheLoader;
|
||||
import org.apache.geode.cache.CacheLoaderException;
|
||||
import org.apache.geode.cache.LoaderHelper;
|
||||
import org.apache.geode.cache.Region;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.apache.geode.cache.CacheLoader;
|
||||
import org.apache.geode.cache.CacheLoaderException;
|
||||
import org.apache.geode.cache.LoaderHelper;
|
||||
import org.apache.geode.cache.Region;
|
||||
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.data.gemfire.fork.ServerProcess;
|
||||
import org.springframework.data.gemfire.process.ProcessExecutor;
|
||||
import org.springframework.data.gemfire.process.ProcessWrapper;
|
||||
@@ -48,7 +49,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Integration tests to test SSL configuration between a Pivotal GemFire or Apache Geode client and server
|
||||
* Integration Tests to test SSL configuration between a Pivotal GemFire or Apache Geode client and server
|
||||
* using GemFire/Geode System properties.
|
||||
*
|
||||
* @author John Blum
|
||||
@@ -127,4 +128,15 @@ public class ClientCacheSecurityTest {
|
||||
public void close() { }
|
||||
}
|
||||
|
||||
public static class SslGemFireServer {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
String configLocation = "org/springframework/data/gemfire/client/ClientCacheSecurityTest-server-context.xml";
|
||||
|
||||
ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(configLocation);
|
||||
|
||||
applicationContext.registerShutdownHook();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.gemfire.repository.sample;
|
||||
|
||||
/**
|
||||
* The FromPartitionToReplicateRegionRepositoryIntegrationTests class...
|
||||
*
|
||||
* @author John Blum
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class FromPartitionToReplicateRegionRepositoryIntegrationTests {
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
<prop key="client.server.host">localhost</prop>
|
||||
<prop key="client.server.port">31517</prop>
|
||||
<prop key="gemfire.security.ssl.components">all</prop>
|
||||
<prop key="gemfire.security.ssl.endpoint-identification-enabled">true</prop>
|
||||
<prop key="gemfire.security.ssl.require-authentication">true</prop>
|
||||
<prop key="gemfire.security.ssl.protocols">any</prop>
|
||||
<prop key="gemfire.security.ssl.ciphers">any</prop>
|
||||
@@ -29,6 +30,7 @@
|
||||
<prop key="log-level">error</prop>
|
||||
<prop key="ssl-ciphers">${gemfire.security.ssl.ciphers}</prop>
|
||||
<prop key="ssl-enabled-components">${gemfire.security.ssl.components}</prop>
|
||||
<prop key="ssl-endpoint-identification-enabled">${gemfire.security.ssl.endpoint-identification-enabled}</prop>
|
||||
<prop key="ssl-keystore">${gemfire.security.ssl.keystore.location}</prop>
|
||||
<prop key="ssl-keystore-password">${gemfire.security.ssl.keystore.password}</prop>
|
||||
<prop key="ssl-keystore-type">${gemfire.security.ssl.keystore.type}</prop>
|
||||
|
||||
Reference in New Issue
Block a user