Skip to content

Commit

Permalink
fix: allow key exchange port configuration (#3453)
Browse files Browse the repository at this point in the history
* allow key exchange port configuration

Signed-off-by: achmelo <a.chmelo@gmail.com>

* explain different defaults for the port

Signed-off-by: achmelo <a.chmelo@gmail.com>

* use the same default port number

Signed-off-by: achmelo <a.chmelo@gmail.com>

---------

Signed-off-by: achmelo <a.chmelo@gmail.com>
  • Loading branch information
achmelo committed Mar 12, 2024
1 parent c75280c commit d82322e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions caching-service-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${CACHING_CODE} java \
-Dcaching.storage.vsam.name=${VSAM_FILE_NAME} \
-Djgroups.bind.address=${ZWE_haInstance_hostname:-localhost} \
-Djgroups.bind.port=${ZWE_configs_storage_infinispan_jgroups_port:-7098} \
-Djgroups.keyExchange.port=${ZWE_configs_storage_infinispan_jgroups_keyExchange_port:-7118} \
-Dcaching.storage.infinispan.persistence.dataLocation=${ZWE_configs_storage_infinispan_persistence_dataLocation:-data} \
-Dcaching.storage.infinispan.persistence.indexLocation=${ZWE_configs_storage_infinispan_persistence_indexLocation:-index} \
-Dcaching.storage.infinispan.initialHosts=${ZWE_configs_storage_infinispan_initialHosts:-localhost[7098]} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public class InfinispanConfig {
private String port;
@Value("${jgroups.bind.address}")
private String address;
@Value("${jgroups.keyExchange.port:7118}")
private String keyExchangePort;

@PostConstruct
void updateKeyring() {
Expand All @@ -74,6 +76,7 @@ DefaultCacheManager cacheManager(ResourceLoader resourceLoader) {
System.setProperty("jgroups.tcpping.initial_hosts", initialHosts);
System.setProperty("jgroups.bind.port", port);
System.setProperty("jgroups.bind.address", address);
System.setProperty("jgroups.keyExchange.port", keyExchangePort);
System.setProperty("server.ssl.keyStoreType", keyStoreType);
System.setProperty("server.ssl.keyStore", keyStore);
System.setProperty("server.ssl.keyStorePassword", keyStorePass);
Expand Down
2 changes: 1 addition & 1 deletion caching-service/src/main/resources/infinispan.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
keystore_type="${server.ssl.keyStoreType}"
keystore_password="${server.ssl.keyStorePassword}"
secret_key_algorithm="RSA"
port="${jgroups.keyExchange.port}"
/>
<!-- Configures ASYM_ENCRYPT -->
<!-- Uses the stack.combine and stack.position attributes to insert ASYM_ENCRYPT into the default TCP stack before pbcast.NAKACK2. -->
<!-- The use_external_key_exchange = "true" attribute configures nodes to use the `SSL_KEY_EXCHANGE` protocol for certificate authentication. -->
<ASYM_ENCRYPT asym_keylength="2048"
asym_algorithm="RSA"
Expand Down

0 comments on commit d82322e

Please sign in to comment.