Skip to content

Commit

Permalink
Merge pull request #42702 from karesti/update-infinispan-15.0.8.Final
Browse files Browse the repository at this point in the history
Updates to Infinispan 15.0.8.Final
  • Loading branch information
gastaldi authored Aug 28, 2024
2 parents 3304163 + 7e81c80 commit a169975
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
<shrinkwrap.version>1.2.6</shrinkwrap.version>
<hamcrest.version>2.2</hamcrest.version><!-- The version needs to be compatible with both REST Assured and Awaitility -->
<junit.jupiter.version>5.10.3</junit.jupiter.version>
<infinispan.version>15.0.6.Final</infinispan.version>
<infinispan.protostream.version>5.0.7.Final</infinispan.protostream.version>
<infinispan.version>15.0.8.Final</infinispan.version>
<infinispan.protostream.version>5.0.8.Final</infinispan.protostream.version>
<caffeine.version>3.1.5</caffeine.version>
<netty.version>4.1.111.Final</netty.version>
<brotli4j.version>1.16.0</brotli4j.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ public void infinispanConnectionConfiguration() {
assertThat(configuration.security().authentication().serverName()).isEqualTo("custom-server-name");
assertThat(configuration.security().ssl().enabled()).isTrue();
assertThat(configuration.security().ssl().trustStorePassword()).isEqualTo("trust-pass".toCharArray());
assertThat(configuration.security().ssl().trustStoreFileName()).isEqualTo("custom-trust-store");
assertThat(configuration.security().ssl().trustStoreFileName()).isEqualTo("trustFileName.pfx");
assertThat(configuration.security().ssl().trustStoreType()).isEqualTo("JCEKS");
assertThat(configuration.security().ssl().keyStoreFileName()).isEqualTo("keyStoreFile.pfx");
assertThat(configuration.security().ssl().keyStoreType()).isEqualTo("PKCS12");
assertThat(configuration.security().ssl().keyStorePassword()).isEqualTo("key-pass".toCharArray());
assertThat(configuration.security().ssl().keyAlias()).isEqualTo("keyAlias");
assertThat(configuration.security().ssl().provider()).isEqualTo("SSL_prov");
assertThat(configuration.security().ssl().protocol()).isEqualTo("SSL_protocol");
assertThat(configuration.security().ssl().ciphers()).containsExactlyInAnyOrder("SSL_cipher1", "SSL_cipher2");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# don't run any server with test containers. this config is used to test the configuration mapping
quarkus.infinispan-client.devservices.enabled=false
quarkus.infinispan-client.use-schema-registration=false
# don't start the client, we are only testing the configuration only
quarkus.infinispan-client.start-client=false

quarkus.infinispan-client.hosts=cluster1:31000
quarkus.infinispan-client.username=infinispan
Expand All @@ -10,7 +12,11 @@ quarkus.infinispan-client.client-intelligence=BASIC
quarkus.infinispan-client.sasl-mechanism=BASIC
quarkus.infinispan-client.auth-realm=infiniRealm
quarkus.infinispan-client.auth-server-name=custom-server-name
quarkus.infinispan-client.trust-store=custom-trust-store
quarkus.infinispan-client.key-store=keyStoreFile.pfx
quarkus.infinispan-client.key-store-type=PKCS12
quarkus.infinispan-client.key-store-password=key-pass
quarkus.infinispan-client.key-alias=keyAlias
quarkus.infinispan-client.trust-store=trustFileName.pfx
quarkus.infinispan-client.trust-store-password=trust-pass
quarkus.infinispan-client.trust-store-type=JCEKS
quarkus.infinispan-client.ssl-provider=SSL_prov
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ private void initialize(String infinispanConfigName, Map<String, Properties> pro
return;
}
// Build de cache manager if the server list is present
RemoteCacheManager cacheManager = new RemoteCacheManager(conf.build());
remoteCacheManagers.put(infinispanConfigName, cacheManager);

InfinispanClientsRuntimeConfig infinispanClientsRuntimeConfig = this.infinispanClientsRuntimeConfigHandle.get();

RemoteCacheManager cacheManager = new RemoteCacheManager(conf.build(),
infinispanClientsRuntimeConfig.startClient.orElse(Boolean.TRUE));
remoteCacheManagers.put(infinispanConfigName, cacheManager);

if (infinispanClientsRuntimeConfig.useSchemaRegistration.orElse(Boolean.TRUE)) {
registerSchemaInServer(infinispanConfigName, properties, cacheManager);
}
Expand Down Expand Up @@ -239,7 +240,21 @@ private ConfigurationBuilder builderFromProperties(String infinispanClientName,
if (infinispanClientRuntimeConfig.saslMechanism.isPresent()) {
properties.put(ConfigurationProperties.SASL_MECHANISM, infinispanClientRuntimeConfig.saslMechanism.get());
}

if (infinispanClientRuntimeConfig.keyStore.isPresent()) {
properties.put(ConfigurationProperties.KEY_STORE_FILE_NAME, infinispanClientRuntimeConfig.keyStore.get());
}
if (infinispanClientRuntimeConfig.keyStorePassword.isPresent()) {
properties.put(ConfigurationProperties.KEY_STORE_PASSWORD,
infinispanClientRuntimeConfig.keyStorePassword.get());
}
if (infinispanClientRuntimeConfig.keyStoreType.isPresent()) {
properties.put(ConfigurationProperties.KEY_STORE_TYPE,
infinispanClientRuntimeConfig.keyStoreType.get());
}
if (infinispanClientRuntimeConfig.keyAlias.isPresent()) {
properties.put(ConfigurationProperties.KEY_ALIAS,
infinispanClientRuntimeConfig.keyAlias.get());
}
if (infinispanClientRuntimeConfig.trustStore.isPresent()) {
properties.put(ConfigurationProperties.TRUST_STORE_FILE_NAME, infinispanClientRuntimeConfig.trustStore.get());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,33 @@ public class InfinispanClientRuntimeConfig {
@ConfigItem(defaultValue = "DIGEST-MD5")
Optional<String> saslMechanism;

/**
* Specifies the filename of a keystore to use to create the {@link SSLContext}.
* You also need to specify a keyStorePassword.
* Setting this property implicitly enables SSL/TLS.
*/
@ConfigItem
Optional<String> keyStore;

/**
* Specifies the password needed to open the keystore. You also need to specify a keyStore.
* Setting this property implicitly enables SSL/TLS.
*/
@ConfigItem
Optional<String> keyStorePassword;

/**
* Specifies the type of the keyStore, such as PKCS12.
*/
@ConfigItem
Optional<String> keyStoreType;

/**
* Sets the unique name used to identify a specific key pair in a keystore for secure connections.
*/
@ConfigItem
Optional<String> keyAlias;

/**
* Specifies the filename of a truststore to use to create the {@link SSLContext}.
* You also need to specify a trustStorePassword.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public class InfinispanClientsRuntimeConfig {
@ConfigItem(defaultValue = "true")
Optional<Boolean> useSchemaRegistration;

/**
* Starts the client and connects to the server. If set to false, you'll need to start it yourself.
*/
@ConfigItem(defaultValue = "true")
public Optional<Boolean> startClient;

public InfinispanClientRuntimeConfig getInfinispanClientRuntimeConfig(String infinispanClientName) {
if (InfinispanClientUtil.isDefault(infinispanClientName)) {
return defaultInfinispanClient;
Expand Down

0 comments on commit a169975

Please sign in to comment.