refactor(distro-wildfly): add `trustAll` option for ES client
MODIFY
common/es/src/main/java/io/apiman/common/es/util/DefaultEsClientFactory.java
common/es/src/main/java/io/apiman/common/es/util/DefaultEsClientFactory.java
@@ -160,7 +160,7 @@ public class DefaultEsClientFactory extends AbstractClientFactory implements IEs
// TODO(msavy): merge together with TLSOptions?
final boolean allowSelfSigned = config.getBool(keys("client.allowSelfSigned", "client.trust.certificate"), false);
final boolean allowAnyHost = config.getBool(keys("client.allowAnyHost", "client.trust.host"), false);
- final boolean trustAll = config.getBool(keys("client.trustAll"), false);
+ final boolean trustAll = config.getBool(keys("client.trustAll", "client.trust-all"), false);
Path clientKeystorePath = config.getPath(
keys("client.keystore.path", "client.keystore"),

MODIFY
distro/wildfly/src/main/resources/overlay/standalone/configuration/apiman.properties
distro/wildfly/src/main/resources/overlay/standalone/configuration/apiman.properties
@@ -25,13 +25,14 @@ apiman-gateway.jdbc.jndi-location=java:/apiman/datasources/apiman-gateway
#apiman.es.username=
#apiman.es.password=
#apiman.es.timeout=10000
-#apiman.es.pollingTime=60
+#apiman.es.polling.time=60
#apiman.es.keystore.path=
#apiman.es.keystore.password=
#apiman.es.truststore.path=
#apiman.es.truststore.password=
#apiman.es.allowSelfSigned=
#apiman.es.allowAnyHost=
+#apiman.es.trustAll=
# ---------------------------------------------------------------------
# Some hibernate settings only useful when JPA is the storage.type.
@@ -94,7 +95,7 @@ apiman-manager.storage.jpa.initialize=true
#apiman-manager.storage.es.client.username=${apiman.es.username}
#apiman-manager.storage.es.client.password=${apiman.es.password}
#apiman-manager.storage.es.client.timeout=${apiman.es.timeout}
-#apiman-manager.storage.es.client.pollingTime=${apiman.es.pollingTime}
+#apiman-manager.storage.es.client.polling.time=${apiman.es.polling.time}
#apiman-manager.storage.es.client.initialize=${apiman.es.initialize}
#apiman-manager.storage.es.client.keystore.path=${apiman.es.keystore.path}
#apiman-manager.storage.es.client.keystore.password=${apiman.es.keystore.password}
@@ -102,6 +103,7 @@ apiman-manager.storage.jpa.initialize=true
#apiman-manager.storage.es.client.truststore.password=${apiman.es.truststore.password}
#apiman-manager.storage.es.client.allowSelfSigned=${apiman.es.allowSelfSigned}
#apiman-manager.storage.es.client.allowAnyHost=${apiman.es.allowAnyHost}
+#apiman-manager.storage.es.client.trustAll=${apiman.es.trustAll}
# API Manager metrics settings.
apiman-manager.metrics.type=io.apiman.manager.api.jdbc.JdbcMetricsAccessor
@@ -115,13 +117,14 @@ apiman-manager.metrics.datasource.jndi-location=${apiman-gateway.jdbc.jndi-locat
#apiman-manager.metrics.es.client.username=${apiman.es.username}
#apiman-manager.metrics.es.client.password=${apiman.es.password}
#apiman-manager.metrics.es.client.timeout=${apiman.es.timeout}
-#apiman-manager.metrics.es.client.pollingTime=${apiman.es.pollingTime}
+#apiman-manager.metrics.es.client.polling.time=${apiman.es.polling.time}
#apiman-manager.metrics.es.client.keystore.path=${apiman.es.keystore.path}
#apiman-manager.metrics.es.client.keystore.password=${apiman.es.keystore.password}
#apiman-manager.metrics.es.client.truststore.path=${apiman.es.truststore.path}
#apiman-manager.metrics.es.client.truststore.password=${apiman.es.truststore.password}
#apiman-manager.metrics.es.client.allowSelfSigned=$eapiman.es.allowSelfSigned}
#apiman-manager.metrics.es.client.allowAnyHost=${apiman.es.allowAnyHost}
+#apiman-manager.metrics.es.client.trustAll=${apiman.es.trustAll}
# API Manager API Catalog
apiman-manager.api-catalog.type=io.apiman.manager.api.core.catalog.JsonApiCatalog
@@ -169,13 +172,15 @@ apiman-gateway.metrics.datasource.jndi-location=${apiman-gateway.jdbc.jndi-locat
#apiman-gateway.metrics.client.username=${apiman.es.username}
#apiman-gateway.metrics.client.password=${apiman.es.password}
#apiman-gateway.metrics.client.timeout=${apiman.es.timeout}
-#apiman-gateway.metrics.es.client.pollingTime=${apiman.es.pollingTime}
+#apiman-gateway.metrics.es.client.polling.time=${apiman.es.polling.time}
#apiman-gateway.metrics.client.keystore.path=${apiman.es.keystore.path}
#apiman-gateway.metrics.client.keystore.password=${apiman.es.keystore.password}
#apiman-gateway.metrics.client.truststore.path=${apiman.es.truststore.path}
#apiman-gateway.metrics.client.truststore.password=${apiman.es.truststore.password}
#apiman-gateway.metrics.client.allowSelfSigned=${apiman.es.allowSelfSigned}
#apiman-gateway.metrics.client.allowAnyHost=${apiman.es.allowAnyHost}
+#apiman-gateway.metrics.client.trustAll=${apiman.es.trustAll}
+
# ---------------------------------------------------------------------
# SSL/TLS settings for the gateway connector(s).
@@ -233,7 +238,7 @@ apiman-gateway.initializers.jdbc.datasource.jndi-location=${apiman-gateway.jdbc.
#apiman-gateway.registry.client.username=${apiman.es.username}
#apiman-gateway.registry.client.password=${apiman.es.password}
#apiman-gateway.registry.client.timeout=${apiman.es.timeout}
-#apiman-gateway.registry.client.pollingTime=${apiman.es.pollingTime}
+#apiman-gateway.registry.client.polling.time=${apiman.es.polling.time}
#apiman-gateway.registry.client.keystore.path=${apiman.es.keystore.path}
#apiman-gateway.registry.client.keystore.password=${apiman.es.keystore.password}
#apiman-gateway.registry.client.truststore.path=${apiman.es.truststore.path}
@@ -241,6 +246,7 @@ apiman-gateway.initializers.jdbc.datasource.jndi-location=${apiman-gateway.jdbc.
##apiman-gateway.registry.cache-polling-interval=15
#apiman-gateway.registry.client.allowSelfSigned=${apiman.es.allowSelfSigned}
#apiman-gateway.registry.client.allowAnyHost=${apiman.es.allowAnyHost}
+#apiman-gateway.registry.client.trustAll=${apiman.es.trustAll}
# ---------------------------------------------------------------------
# Shared State Component Settings
@@ -257,13 +263,14 @@ apiman-gateway.components.ISharedStateComponent=io.apiman.gateway.engine.impl.In
#apiman-gateway.components.ISharedStateComponent.client.username=${apiman.es.username}
#apiman-gateway.components.ISharedStateComponent.client.password=${apiman.es.password}
#apiman-gateway.components.ISharedStateComponent.client.timeout=${apiman.es.timeout}
-#apiman-gateway.components.ISharedStateComponent.client.pollingTime=${apiman.es.pollingTime}
+#apiman-gateway.components.ISharedStateComponent.client.polling.time=${apiman.es.polling.time}
#apiman-gateway.components.ISharedStateComponent.client.keystore.path=${apiman.es.keystore.path}
#apiman-gateway.components.ISharedStateComponent.client.keystore.password=${apiman.es.keystore.password}
#apiman-gateway.components.ISharedStateComponent.client.truststore.path=${apiman.es.truststore.path}
#apiman-gateway.components.ISharedStateComponent.client.truststore.password=${apiman.es.truststore.password}
#apiman-gateway.components.ISharedStateComponent.client.allowSelfSigned=${apiman.es.allowSelfSigned}
#apiman-gateway.components.ISharedStateComponent.client.allowAnyHost=${apiman.es.allowAnyHost}
+#apiman-gateway.components.ISharedStateComponent.client.trustAll=${apiman.es.trustAll}
# ---------------------------------------------------------------------
@@ -288,6 +295,7 @@ apiman-gateway.components.IRateLimiterComponent=io.apiman.gateway.engine.impl.In
#apiman-gateway.components.IRateLimiterComponent.client.truststore.password=${apiman.es.truststore.password}
#apiman-gateway.components.IRateLimiterComponent.client.allowSelfSigned=${apiman.es.allowSelfSigned}
#apiman-gateway.components.IRateLimiterComponent.client.allowAnyHost=${apiman.es.allowAnyHost}
+#apiman-gateway.components.IRateLimiterComponent.client.trustAll=${apiman.es.trustAll}
# ---------------------------------------------------------------------
# Cache Store Component Settings
@@ -311,6 +319,7 @@ apiman-gateway.components.ICacheStoreComponent=io.apiman.gateway.engine.impl.InM
#apiman-gateway.components.ICacheStoreComponent.client.truststore.password=${apiman.es.truststore.password}
#apiman-gateway.components.ICacheStoreComponent.client.allowSelfSigned=${apiman.es.allowSelfSigned}
#apiman-gateway.components.ICacheStoreComponent.client.allowAnyHost=${apiman.es.allowAnyHost}
+#apiman-gateway.components.ICacheStoreComponent.client.trustAll=${apiman.es.trustAll}
# ---------------------------------------------------------------------
# Execute Blocking Component Settings

refactor(distro-wildfly): add `trustAll` option for ES client