ConfigurationBuilder clientBuilder = new ConfigurationBuilder();
clientBuilder
.addServer()
.host("127.0.0.1")
.port(11222)
.security()
.ssl()
// Server SNI hostname.
.sniHostName("myservername")
// Keystore that contains the public keys for Data Grid Server.
// Clients use the trust store to verify Data Grid Server identities.
.trustStoreFileName("/path/to/server/truststore")
.trustStorePassword("truststorepassword".toCharArray())
.trustStoreType("PCKS12")
// Keystore that contains client certificates.
// Clients present these certificates to Data Grid Server.
.keyStoreFileName("/path/to/client/keystore")
.keyStorePassword("keystorepassword".toCharArray())
.keyStoreType("PCKS12")
.authentication()
// Clients must use the EXTERNAL mechanism for certificate authentication.
.saslMechanism("EXTERNAL");
ConfigurationBuilder clientBuilder = new ConfigurationBuilder();
clientBuilder
.addServer()
.host("127.0.0.1")
.port(11222)
.security()
.ssl()
// Server SNI hostname.
.sniHostName("myservername")
// Keystore that contains the public keys for Data Grid Server.
// Clients use the trust store to verify Data Grid Server identities.
.trustStoreFileName("/path/to/server/truststore")
.trustStorePassword("truststorepassword".toCharArray())
.trustStoreType("PCKS12")
// Keystore that contains client certificates.
// Clients present these certificates to Data Grid Server.
.keyStoreFileName("/path/to/client/keystore")
.keyStorePassword("keystorepassword".toCharArray())
.keyStoreType("PCKS12")
.authentication()
// Clients must use the EXTERNAL mechanism for certificate authentication.
.saslMechanism("EXTERNAL");
Copy to ClipboardCopied!Toggle word wrapToggle overflow
hotrod-client.properties
infinispan.client.hotrod.server_list = 127.0.0.1:11222
infinispan.client.hotrod.use_ssl = true
infinispan.client.hotrod.sni_host_name = myservername
# Keystore that contains the public keys for Data Grid Server.
# Clients use the trust store to verify Data Grid Server identities.
infinispan.client.hotrod.trust_store_file_name = server_truststore.pkcs12
infinispan.client.hotrod.trust_store_password = changeme
infinispan.client.hotrod.trust_store_type = PCKS12
# Keystore that contains client certificates.
# Clients present these certificates to Data Grid Server.
infinispan.client.hotrod.key_store_file_name = client_keystore.pkcs12
infinispan.client.hotrod.key_store_password = changeme
infinispan.client.hotrod.key_store_type = PCKS12
# Clients must use the EXTERNAL mechanism for certificate authentication.
infinispan.client.hotrod.sasl_mechanism = EXTERNAL
infinispan.client.hotrod.server_list = 127.0.0.1:11222
infinispan.client.hotrod.use_ssl = true
infinispan.client.hotrod.sni_host_name = myservername
# Keystore that contains the public keys for Data Grid Server.
# Clients use the trust store to verify Data Grid Server identities.
infinispan.client.hotrod.trust_store_file_name = server_truststore.pkcs12
infinispan.client.hotrod.trust_store_password = changeme
infinispan.client.hotrod.trust_store_type = PCKS12
# Keystore that contains client certificates.
# Clients present these certificates to Data Grid Server.
infinispan.client.hotrod.key_store_file_name = client_keystore.pkcs12
infinispan.client.hotrod.key_store_password = changeme
infinispan.client.hotrod.key_store_type = PCKS12
# Clients must use the EXTERNAL mechanism for certificate authentication.
infinispan.client.hotrod.sasl_mechanism = EXTERNAL
Copy to ClipboardCopied!Toggle word wrapToggle overflow
后续步骤
将客户端信任存储添加到 $RHDG_HOME/server/conf 目录,并将 Data Grid Server 配置为使用它(如果需要)。