in clientSecurity/src/main/java/org/apache/geode_examples/clientSecurity/Example.java [58:75]
private Example(String username) {
Properties props = new Properties();
props.setProperty("security-username", username);
props.setProperty("security-client-auth-init", ExampleAuthInit.class.getName());
props.setProperty("ssl-enabled-components", "all");
props.setProperty("ssl-keystore", "keystore.jks");
props.setProperty("ssl-keystore-password", "password");
props.setProperty("ssl-truststore", "truststore.jks");
props.setProperty("ssl-truststore-password", "password");
// connect to the locator using default port 10334
cache = new ClientCacheFactory(props).setPoolSubscriptionEnabled(true)
.addPoolLocator("localhost", 10334).create();
region1 = cache.<String, String>createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
.create(REGION1);
region2 = cache.<String, String>createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
.create(REGION2);
}