camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nferr...@apache.org
Subject [12/13] camel git commit: CAMEL-10650: putting flag to enable global SSL config in all components
Date Tue, 11 Apr 2017 14:12:08 GMT
CAMEL-10650: putting flag to enable global SSL config in all components


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d51aa65d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d51aa65d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d51aa65d

Branch: refs/heads/master
Commit: d51aa65d312d0399d3927b1b4b4b2205594f00d6
Parents: aab30b4
Author: Nicola Ferraro <ni.ferraro@gmail.com>
Authored: Tue Apr 11 13:29:31 2017 +0200
Committer: Nicola Ferraro <ni.ferraro@gmail.com>
Committed: Tue Apr 11 16:04:22 2017 +0200

----------------------------------------------------------------------
 .../apache/camel/SSLContextParametersAware.java | 17 +++++++-
 .../camel/component/ahc/AhcComponent.java       | 15 +++++++
 ...entConfigGlobalSslContextParametersTest.java |  3 ++
 .../camel/component/cometd/CometdComponent.java | 15 +++++++
 ...extParametersCometdProducerConsumerTest.java |  3 ++
 .../camel/component/consul/ConsulComponent.java | 17 +++++++-
 .../component/consul/ConsulConfiguration.java   | 14 +------
 .../camel/component/cxf/CxfComponent.java       | 15 +++++++
 .../component/cxf/jaxrs/CxfRsComponent.java     | 17 ++++++++
 .../cxf/jaxrs/CxfRsGlobalSslProducerTest.java   |  2 +
 .../camel/component/cxf/ssl/SslGlobalTest.java  |  2 +
 .../camel/component/etcd/EtcdComponent.java     | 17 +++++++-
 .../camel/component/etcd/EtcdConfiguration.java | 18 ++------
 .../component/file/remote/FtpsComponent.java    | 17 ++++++++
 ...ntAuthAndGlobalSSLContextParametersTest.java |  3 ++
 .../src/main/docs/http-component.adoc           |  5 ++-
 .../camel/component/http/HttpComponent.java     | 18 +++++++-
 .../camel/component/http4/HttpComponent.java    | 15 +++++++
 .../camel/component/irc/IrcComponent.java       | 17 ++++++++
 .../component/jetty/JettyHttpComponent.java     | 15 +++++++
 .../camel/component/kafka/KafkaComponent.java   | 17 +++++++-
 .../component/kafka/KafkaConfiguration.java     | 13 +-----
 .../lumberjack/LumberjackComponent.java         | 17 ++++----
 .../LumberjackComponentGlobalSSLTest.java       |  7 ++--
 .../camel/component/mail/MailComponent.java     | 15 +++++++
 .../camel/component/mina2/Mina2Component.java   | 18 +++++++-
 .../component/mina2/Mina2Configuration.java     | 13 ------
 .../Mina2SslGlobalContextParametersTcpTest.java | 13 +-----
 .../camel/component/nats/NatsComponent.java     | 17 ++++++++
 .../netty/http/NettyHttpComponent.java          | 15 +++++++
 .../netty/http/NettyHttpGlobalSSLTest.java      |  3 ++
 .../camel/component/netty/NettyComponent.java   | 15 +++++++
 .../NettyGlobalSSLContextParametersTest.java    |  3 ++
 .../netty4/http/NettyHttpComponent.java         | 15 +++++++
 .../camel/component/netty4/NettyComponent.java  | 15 +++++++
 .../NettyGlobalSSLContextParametersTest.java    |  3 ++
 .../component/olingo2/Olingo2Component.java     | 17 ++++++++
 .../component/olingo4/Olingo4Component.java     | 17 ++++++++
 .../component/restlet/RestletComponent.java     | 15 +++++++
 ...HttpsWithGlobalSSLContextParametersTest.java |  3 ++
 .../salesforce/SalesforceComponent.java         | 12 ++++++
 .../servicenow/ServiceNowComponent.java         | 17 +++++++-
 .../servicenow/ServiceNowConfiguration.java     | 14 +------
 .../spring/ws/SpringWebserviceComponent.java    | 17 ++++++++
 .../camel/component/stomp/StompComponent.java   | 17 +++++++-
 .../component/stomp/StompConfiguration.java     | 12 ------
 .../stomp/StompGlobalSslConsumerTest.java       |  5 ++-
 .../component/undertow/UndertowComponent.java   | 14 +++++++
 .../component/websocket/WebsocketComponent.java | 24 +++++------
 .../component/websocket/WebsocketEndpoint.java  | 13 ------
 ...bsocketSSLContextGlobalRouteExampleTest.java |  3 ++
 .../springboot/HttpComponentConfiguration.java  | 13 ++++++
 .../HttpComponentSSLAutoConfiguration.java      | 37 +++++++++--------
 .../HttpComponentSSLConfiguration.java          | 43 --------------------
 54 files changed, 538 insertions(+), 199 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java b/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
index b76c041..07f684a 100644
--- a/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
+++ b/camel-core/src/main/java/org/apache/camel/SSLContextParametersAware.java
@@ -24,10 +24,23 @@ import org.apache.camel.util.jsse.SSLContextParameters;
 public interface SSLContextParametersAware extends CamelContextAware {
 
     /**
-     * Returns the global {@link SSLContextParameters} if configured.
+     * Returns the global {@link SSLContextParameters} if enabled on the implementing object, null otherwise.
      */
     default SSLContextParameters getGlobalSSLContextParameters() {
-        return getCamelContext().getSSLContextParameters();
+        if (isUseGlobalSSLContextParameters()) {
+            return getCamelContext().getSSLContextParameters();
+        }
+        return null;
     }
 
+    /**
+     * Determine if the implementing object is using global SSL context parameters.
+     */
+    boolean isUseGlobalSSLContextParameters();
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters);
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java b/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
index bf2aec1..cef473d 100644
--- a/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
+++ b/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java
@@ -55,6 +55,8 @@ public class AhcComponent extends HeaderFilterStrategyComponent implements SSLCo
     private AhcBinding binding;
     @Metadata(label = "security")
     private SSLContextParameters sslContextParameters;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
     @Metadata(label = "advanced")
     private boolean allowJavaSerializedObject;
 
@@ -211,6 +213,19 @@ public class AhcComponent extends HeaderFilterStrategyComponent implements SSLCo
         this.allowJavaSerializedObject = allowJavaSerializedObject;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     protected String createAddressUri(String uri, String remaining) {
         return remaining;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigGlobalSslContextParametersTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigGlobalSslContextParametersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigGlobalSslContextParametersTest.java
index 3314fbf..4aa3254 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigGlobalSslContextParametersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigGlobalSslContextParametersTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.SSLContextParametersAware;
 
 /**
  * Lookup from the registry should work when only one set of context parameters is present.
@@ -27,6 +28,8 @@ public class AhcComponentClientConfigGlobalSslContextParametersTest extends AhcC
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = super.createCamelContext();
         context.setSSLContextParameters(createSSLContextParameters());
+        ((SSLContextParametersAware) context.getComponent("ahc")).setUseGlobalSSLContextParameters(true);
+        ((SSLContextParametersAware) context.getComponent("jetty")).setUseGlobalSSLContextParameters(true);
         return context;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java
index f4b9f4c..66845d2 100644
--- a/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java
+++ b/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java
@@ -69,6 +69,8 @@ public class CometdComponent extends UriEndpointComponent implements SSLContextP
     private List<BayeuxServer.Extension> extensions;
     @Metadata(label = "security")
     private SSLContextParameters sslContextParameters;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     class ConnectorRef {
         Connector connector;
@@ -326,6 +328,19 @@ public class CometdComponent extends UriEndpointComponent implements SSLContextP
         this.sslContextParameters = sslContextParameters;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     protected Server createServer() throws Exception {
         Server server = new Server();
         ContextHandlerCollection collection = new ContextHandlerCollection();

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/SslGlobalContextParametersCometdProducerConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/SslGlobalContextParametersCometdProducerConsumerTest.java b/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/SslGlobalContextParametersCometdProducerConsumerTest.java
index 0291f23..b818a84 100644
--- a/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/SslGlobalContextParametersCometdProducerConsumerTest.java
+++ b/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/SslGlobalContextParametersCometdProducerConsumerTest.java
@@ -20,6 +20,7 @@ import java.util.List;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.AvailablePortFinder;
@@ -93,6 +94,8 @@ public class SslGlobalContextParametersCometdProducerConsumerTest extends CamelT
         sslContextParameters.setKeyManagers(kmp);
         sslContextParameters.setTrustManagers(tmp);
         context.setSSLContextParameters(sslContextParameters);
+
+        ((SSLContextParametersAware) context.getComponent("cometd")).setUseGlobalSSLContextParameters(true);
         return context;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulComponent.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulComponent.java
index 77eb564..ff9070c 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulComponent.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulComponent.java
@@ -44,6 +44,8 @@ public class ConsulComponent extends DefaultComponent implements SSLContextParam
 
     @Metadata(label = "advanced")
     private ConsulConfiguration configuration = new ConsulConfiguration();
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
     
     public ConsulComponent() {
         super();
@@ -94,6 +96,19 @@ public class ConsulComponent extends DefaultComponent implements SSLContextParam
         configuration.setSslContextParameters(sslContextParameters);
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     public String getAclToken() {
         return configuration.getAclToken();
     }
@@ -148,7 +163,7 @@ public class ConsulComponent extends DefaultComponent implements SSLContextParam
         configuration.setCamelContext(getCamelContext());
 
         // using global ssl context parameters if set
-        if (configuration.isUseGlobalSslContextParameters() && configuration.getSslContextParameters() == null) {
+        if (configuration.getSslContextParameters() == null) {
             configuration.setSslContextParameters(getGlobalSSLContextParameters());
         }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java
index 06d270f..ceb1f20 100644
--- a/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java
+++ b/components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulConfiguration.java
@@ -23,6 +23,7 @@ import java.util.Set;
 
 import com.orbitz.consul.Consul;
 import com.orbitz.consul.option.ConsistencyMode;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
@@ -48,8 +49,6 @@ public class ConsulConfiguration implements CamelContextAware, Cloneable {
 
     @UriParam(label = "security")
     private SSLContextParameters sslContextParameters;
-    @UriParam(label = "security", defaultValue = "false")
-    private boolean useGlobalSslContextParameters;
     @UriParam(label = "security", secret = true)
     private String aclToken;
     @UriParam(label = "security", secret = true)
@@ -204,17 +203,6 @@ public class ConsulConfiguration implements CamelContextAware, Cloneable {
         this.sslContextParameters = sslContextParameters;
     }
 
-    public boolean isUseGlobalSslContextParameters() {
-        return useGlobalSslContextParameters;
-    }
-
-    /**
-     * Enable usage of Camel global SSL configuration
-     */
-    public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) {
-        this.useGlobalSslContextParameters = useGlobalSslContextParameters;
-    }
-
     public String getAclToken() {
         return aclToken;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
index 1e64503..2734e21 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
@@ -39,6 +39,8 @@ public class CxfComponent extends HeaderFilterStrategyComponent implements SSLCo
 
     @Metadata(label = "advanced")
     private Boolean allowStreaming;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public CxfComponent() {
         super(CxfEndpoint.class);
@@ -60,6 +62,19 @@ public class CxfComponent extends HeaderFilterStrategyComponent implements SSLCo
         return allowStreaming;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     /**
      * Create a {@link CxfEndpoint} which, can be a Spring bean endpoint having
      * URI format cxf:bean:<i>beanId</i> or transport address endpoint having URI format

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java
index f18c2ef..82b3a2d 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsComponent.java
@@ -26,6 +26,7 @@ import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.component.cxf.blueprint.BlueprintSupport;
 import org.apache.camel.component.cxf.common.message.CxfConstants;
 import org.apache.camel.impl.HeaderFilterStrategyComponent;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.util.CastUtils;
 import org.apache.camel.util.ObjectHelper;
@@ -40,6 +41,9 @@ public class CxfRsComponent extends HeaderFilterStrategyComponent implements SSL
 
     private static final Logger LOG = LoggerFactory.getLogger(CxfRsComponent.class);
 
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
+
     public CxfRsComponent() {
         super(CxfRsEndpoint.class);
     }
@@ -126,4 +130,17 @@ public class CxfRsComponent extends HeaderFilterStrategyComponent implements SSL
         CxfRsEndpoint cxfRsEndpoint = (CxfRsEndpoint) endpoint;
         cxfRsEndpoint.updateEndpointUri(uri);
     }
+
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsGlobalSslProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsGlobalSslProducerTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsGlobalSslProducerTest.java
index c9d279e..f9be03e 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsGlobalSslProducerTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsGlobalSslProducerTest.java
@@ -21,6 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.component.cxf.CXFTestSupport;
 import org.apache.camel.component.cxf.common.message.CxfConstants;
 import org.apache.camel.component.cxf.jaxrs.testbean.Customer;
@@ -54,6 +55,7 @@ public class CxfRsGlobalSslProducerTest extends CamelSpringTestSupport {
         CamelContext context = super.createCamelContext();
         SSLContextParameters parameters = context.getRegistry().lookupByNameAndType("mySslContext", SSLContextParameters.class);
         context.setSSLContextParameters(parameters);
+        ((SSLContextParametersAware) context.getComponent("cxfrs")).setUseGlobalSSLContextParameters(true);
         return context;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ssl/SslGlobalTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ssl/SslGlobalTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ssl/SslGlobalTest.java
index 7fe5e4f..8310437 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ssl/SslGlobalTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ssl/SslGlobalTest.java
@@ -22,6 +22,7 @@ import java.util.List;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.component.cxf.CXFTestSupport;
 import org.apache.camel.component.cxf.common.message.CxfConstants;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
@@ -48,6 +49,7 @@ public class SslGlobalTest extends CamelSpringTestSupport {
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = super.createCamelContext();
         SSLContextParameters parameters = context.getRegistry().lookupByNameAndType("mySslContext", SSLContextParameters.class);
+        ((SSLContextParametersAware) context.getComponent("cxf")).setUseGlobalSSLContextParameters(true);
         context.setSSLContextParameters(parameters);
         return context;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdComponent.java b/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdComponent.java
index c6f54d0..7322675 100644
--- a/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdComponent.java
+++ b/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdComponent.java
@@ -34,6 +34,8 @@ public class EtcdComponent extends DefaultComponent implements SSLContextParamet
 
     @Metadata(label = "advanced")
     private EtcdConfiguration configuration = new EtcdConfiguration();
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public EtcdComponent() {
         super();
@@ -107,6 +109,19 @@ public class EtcdComponent extends DefaultComponent implements SSLContextParamet
     }
 
     @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
+    @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         String ns = StringHelper.before(remaining, "/");
         String path = StringHelper.after(remaining, "/");
@@ -148,7 +163,7 @@ public class EtcdComponent extends DefaultComponent implements SSLContextParamet
 
         setProperties(configuration, parameters);
 
-        if (configuration.isUseGlobalSslContextParameters() && configuration.getSslContextParameters() == null) {
+        if (configuration.getSslContextParameters() == null) {
             configuration.setSslContextParameters(getGlobalSSLContextParameters());
         }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdConfiguration.java b/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdConfiguration.java
index 92ea889..e784fa5 100644
--- a/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdConfiguration.java
+++ b/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdConfiguration.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.etcd;
 
-import mousio.etcd4j.EtcdClient;
-import mousio.etcd4j.EtcdSecurityContext;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
@@ -25,6 +23,9 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.util.jsse.SSLContextParameters;
 
+import mousio.etcd4j.EtcdClient;
+import mousio.etcd4j.EtcdSecurityContext;
+
 @UriParams
 public class EtcdConfiguration implements CamelContextAware, Cloneable {
 
@@ -32,8 +33,6 @@ public class EtcdConfiguration implements CamelContextAware, Cloneable {
     private String uris = EtcdConstants.ETCD_DEFAULT_URIS;
     @UriParam(label = "security")
     private SSLContextParameters sslContextParameters;
-    @UriParam(label = "security", defaultValue = "false")
-    private boolean useGlobalSslContextParameters;
     @UriParam(label = "security", secret = true)
     private String userName;
     @UriParam(label = "security", secret = true)
@@ -93,17 +92,6 @@ public class EtcdConfiguration implements CamelContextAware, Cloneable {
         this.sslContextParameters = sslContextParameters;
     }
 
-    public boolean isUseGlobalSslContextParameters() {
-        return useGlobalSslContextParameters;
-    }
-
-    /**
-     * Enable usage of Camel global SSL parameters.
-     */
-    public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) {
-        this.useGlobalSslContextParameters = useGlobalSslContextParameters;
-    }
-
     public String getUserName() {
         return userName;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
index a981c9b..162f13f 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsComponent.java
@@ -22,6 +22,7 @@ import java.util.Map;
 import org.apache.camel.CamelContext;
 import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.component.file.GenericFileEndpoint;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.util.IntrospectionSupport;
 import org.apache.commons.net.ftp.FTPFile;
 
@@ -34,6 +35,9 @@ import org.apache.commons.net.ftp.FTPFile;
  */
 public class FtpsComponent extends FtpComponent implements SSLContextParametersAware {
 
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
+
     public FtpsComponent() {
         setEndpointClass(FtpsEndpoint.class);
     }
@@ -90,4 +94,17 @@ public class FtpsComponent extends FtpComponent implements SSLContextParametersA
         }
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthAndGlobalSSLContextParametersTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthAndGlobalSSLContextParametersTest.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthAndGlobalSSLContextParametersTest.java
index b9195d3..69c7238 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthAndGlobalSSLContextParametersTest.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthAndGlobalSSLContextParametersTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.file.remote;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.util.jsse.KeyStoreParameters;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.apache.camel.util.jsse.TrustManagersParameters;
@@ -37,6 +38,8 @@ public class FileToFtpsExplicitSSLWithoutClientAuthAndGlobalSSLContextParameters
         sslContextParameters.setSecureSocketProtocol("SSL");
         sslContextParameters.setTrustManagers(tmp);
         context.setSSLContextParameters(sslContextParameters);
+
+        ((SSLContextParametersAware) context.getComponent("ftps")).setUseGlobalSSLContextParameters(true);
         return context;
     }
     

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-http/src/main/docs/http-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/docs/http-component.adoc b/components/camel-http/src/main/docs/http-component.adoc
index c56c007..5499706 100644
--- a/components/camel-http/src/main/docs/http-component.adoc
+++ b/components/camel-http/src/main/docs/http-component.adoc
@@ -114,7 +114,7 @@ from("direct:start")
 
 
 // component options: START
-The HTTP component supports 7 options which are listed below.
+The HTTP component supports 8 options which are listed below.
 
 
 
@@ -126,6 +126,7 @@ The HTTP component supports 7 options which are listed below.
 | **httpBinding** (producer) | To use a custom HttpBinding to control the mapping between Camel message and HttpClient. |  | HttpBinding
 | **httpConfiguration** (producer) | To use the shared HttpConfiguration as base configuration. |  | HttpConfiguration
 | **allowJavaSerialized Object** (producer) | Whether to allow java serialization when a request uses context-type=application/x-java-serialized-object This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk. | false | boolean
+| **useGlobalSSLContext Parameters** (security) | Enable usage of global SSL context parameters. | false | boolean
 | **headerFilterStrategy** (filter) | To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. |  | HeaderFilterStrategy
 | **resolveProperty Placeholders** (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean
 |=======================================================================
@@ -545,4 +546,4 @@ keystore and truststore as described above, it will work fine.
 * link:endpoint.html[Endpoint]
 * link:getting-started.html[Getting Started]
 
-* link:jetty.html[Jetty]
\ No newline at end of file
+* link:jetty.html[Jetty]

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
index e64bca8..4f6089a 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
@@ -28,6 +28,7 @@ import org.apache.camel.ComponentVerifier;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Producer;
 import org.apache.camel.ResolveEndpointFailedException;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.VerifiableComponent;
 import org.apache.camel.http.common.HttpBinding;
 import org.apache.camel.http.common.HttpCommonComponent;
@@ -53,12 +54,14 @@ import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
  *
  */
 @Metadata(label = "verifiers", enums = "parameters,connectivity")
-public class HttpComponent extends HttpCommonComponent implements RestProducerFactory, VerifiableComponent {
+public class HttpComponent extends HttpCommonComponent implements RestProducerFactory, VerifiableComponent, SSLContextParametersAware {
 
     @Metadata(label = "advanced")
     protected HttpClientConfigurer httpClientConfigurer;
     @Metadata(label = "advanced")
     protected HttpConnectionManager httpConnectionManager;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public HttpComponent() {
         super(HttpEndpoint.class);
@@ -371,6 +374,19 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         super.setAllowJavaSerializedObject(allowJavaSerializedObject);
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     /**
      * TODO: document
      */

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
index b9996d9..cf3f362 100644
--- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
+++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
@@ -85,6 +85,8 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         + " Important: Only one instance of org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent."
         + " If you need to use 2 or more different instances, you need to define a new HttpComponent per instance you need.")
     protected SSLContextParameters sslContextParameters;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
     @Metadata(label = "security", description = "To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier.")
     protected HostnameVerifier x509HostnameVerifier = new DefaultHostnameVerifier();
     @Metadata(label = "producer", description = "To use a custom org.apache.http.client.CookieStore."
@@ -458,6 +460,19 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
         this.sslContextParameters = sslContextParameters;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     public HostnameVerifier getX509HostnameVerifier() {
         return x509HostnameVerifier;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcComponent.java b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcComponent.java
index d7926aa..d0c5f04 100644
--- a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcComponent.java
+++ b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcComponent.java
@@ -22,6 +22,7 @@ import java.util.Map;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.impl.UriEndpointComponent;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.schwering.irc.lib.IRCConnection;
 import org.schwering.irc.lib.IRCEventListener;
@@ -38,6 +39,9 @@ public class IrcComponent extends UriEndpointComponent implements SSLContextPara
     private static final Logger LOG = LoggerFactory.getLogger(IrcComponent.class);
     private final transient Map<String, IRCConnection> connectionCache = new HashMap<String, IRCConnection>();
 
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
+
     public IrcComponent() {
         super(IrcEndpoint.class);
     }
@@ -148,4 +152,17 @@ public class IrcComponent extends UriEndpointComponent implements SSLContextPara
     protected String preProcessUri(String uri) {
         return IrcConfiguration.sanitize(uri);
     }
+
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
index ac4059f..98076f1 100644
--- a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
+++ b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
@@ -129,6 +129,7 @@ public abstract class JettyHttpComponent extends HttpCommonComponent implements
     protected Long continuationTimeout;
     protected boolean useContinuation = true;
     protected SSLContextParameters sslContextParameters;
+    protected boolean useGlobalSSLContextParameters;
     protected Integer requestBufferSize;
     protected Integer requestHeaderSize;
     protected Integer responseBufferSize;
@@ -949,6 +950,20 @@ public abstract class JettyHttpComponent extends HttpCommonComponent implements
         this.sslContextParameters = sslContextParameters;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters
+     */
+    @Override
+    @Metadata(description = "Enable usage of global SSL context parameters", label = "security", defaultValue = "false")
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     public Integer getResponseBufferSize() {
         return responseBufferSize;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
index eeb9b71..3f83633 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaComponent.java
@@ -32,6 +32,8 @@ public class KafkaComponent extends UriEndpointComponent implements SSLContextPa
 
     @Metadata(label = "advanced")
     private ExecutorService workerPool;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public KafkaComponent() {
         super(KafkaEndpoint.class);
@@ -63,7 +65,7 @@ public class KafkaComponent extends UriEndpointComponent implements SSLContextPa
         setProperties(endpoint.getConfiguration(), params);
         setProperties(endpoint, params);
 
-        if (endpoint.getConfiguration().isUseGlobalSslContextParameters() && endpoint.getConfiguration().getSslContextParameters() == null) {
+        if (endpoint.getConfiguration().getSslContextParameters() == null) {
             endpoint.getConfiguration().setSslContextParameters(getGlobalSSLContextParameters());
         }
 
@@ -112,4 +114,17 @@ public class KafkaComponent extends UriEndpointComponent implements SSLContextPa
         this.workerPool = workerPool;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
index 65d2728..a609c79 100644
--- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
+++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
@@ -202,8 +202,7 @@ public class KafkaConfiguration implements Cloneable {
     // SSL
     @UriParam(label = "common,security")
     private SSLContextParameters sslContextParameters;
-    @UriParam(label = "common,security", defaultValue = "false")
-    private boolean useGlobalSslContextParameters;
+
     // SSL
     // ssl.key.password
     @UriParam(label = "producer,security", secret = true)
@@ -958,16 +957,6 @@ public class KafkaConfiguration implements Cloneable {
         this.sslContextParameters = sslContextParameters;
     }
 
-    public boolean isUseGlobalSslContextParameters() {
-        return useGlobalSslContextParameters;
-    }
-
-    /**
-     * Enable usage of Camel global SSL config
-     */
-    public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) {
-        this.useGlobalSslContextParameters = useGlobalSslContextParameters;
-    }
 
     public String getSslKeyPassword() {
         return sslKeyPassword;

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/LumberjackComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/LumberjackComponent.java b/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/LumberjackComponent.java
index 3e58e29..ff782a8 100644
--- a/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/LumberjackComponent.java
+++ b/components/camel-lumberjack/src/main/java/org/apache/camel/component/lumberjack/LumberjackComponent.java
@@ -32,9 +32,8 @@ public class LumberjackComponent extends UriEndpointComponent implements SSLCont
 
     @Metadata(label = "security")
     private SSLContextParameters sslContextParameters;
-
     @Metadata(label = "security", defaultValue = "false")
-    private boolean useGlobalSslContextParameters;
+    private boolean useGlobalSSLContextParameters;
 
     public LumberjackComponent() {
         this(LumberjackEndpoint.class);
@@ -62,7 +61,7 @@ public class LumberjackComponent extends UriEndpointComponent implements SSLCont
         LumberjackEndpoint answer = new LumberjackEndpoint(uri, this, host, port);
         setProperties(answer, parameters);
 
-        if (isUseGlobalSslContextParameters() && answer.getSslContextParameters() == null) {
+        if (answer.getSslContextParameters() == null) {
             answer.setSslContextParameters(getGlobalSSLContextParameters());
         }
 
@@ -81,15 +80,17 @@ public class LumberjackComponent extends UriEndpointComponent implements SSLCont
         this.sslContextParameters = sslContextParameters;
     }
 
-    public boolean isUseGlobalSslContextParameters() {
-        return useGlobalSslContextParameters;
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
     }
 
     /**
-     * Enable usage of Camel global SSL parameters
+     * Enable usage of global SSL context parameters.
      */
-    public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) {
-        this.useGlobalSslContextParameters = useGlobalSslContextParameters;
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-lumberjack/src/test/java/org/apache/camel/component/lumberjack/LumberjackComponentGlobalSSLTest.java
----------------------------------------------------------------------
diff --git a/components/camel-lumberjack/src/test/java/org/apache/camel/component/lumberjack/LumberjackComponentGlobalSSLTest.java b/components/camel-lumberjack/src/test/java/org/apache/camel/component/lumberjack/LumberjackComponentGlobalSSLTest.java
index 6343735..11f2061 100644
--- a/components/camel-lumberjack/src/test/java/org/apache/camel/component/lumberjack/LumberjackComponentGlobalSSLTest.java
+++ b/components/camel-lumberjack/src/test/java/org/apache/camel/component/lumberjack/LumberjackComponentGlobalSSLTest.java
@@ -43,7 +43,9 @@ public class LumberjackComponentGlobalSSLTest extends CamelTestSupport {
     @Override
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = super.createCamelContext();
-        context.setSSLContextParameters(createClientSSLContextParameters());
+        context.setSSLContextParameters(createServerSSLContextParameters());
+        LumberjackComponent component = (LumberjackComponent) context.getComponent("lumberjack");
+        component.setUseGlobalSSLContextParameters(true);
         return context;
     }
 
@@ -52,9 +54,6 @@ public class LumberjackComponentGlobalSSLTest extends CamelTestSupport {
         return new RouteBuilder() {
             public void configure() {
 
-                LumberjackComponent component = (LumberjackComponent) context().getComponent("lumberjack");
-                component.setUseGlobalSslContextParameters(true);
-
                 // Lumberjack configured with SSL
                 from("lumberjack:0.0.0.0:" + port).to("mock:output");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
index 78a15f1..5ccf9d2 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
@@ -41,6 +41,8 @@ public class MailComponent extends UriEndpointComponent implements SSLContextPar
     private MailConfiguration configuration;
     @Metadata(label = "advanced")
     private ContentTypeResolver contentTypeResolver;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public MailComponent() {
         super(MailEndpoint.class);
@@ -149,4 +151,17 @@ public class MailComponent extends UriEndpointComponent implements SSLContextPar
     public void setContentTypeResolver(ContentTypeResolver contentTypeResolver) {
         this.contentTypeResolver = contentTypeResolver;
     }
+
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java
----------------------------------------------------------------------
diff --git a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java
index fdd767b..7b93726 100644
--- a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java
+++ b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Component.java
@@ -37,6 +37,8 @@ public class Mina2Component extends UriEndpointComponent implements SSLContextPa
 
     @Metadata(label = "advanced")
     private Mina2Configuration configuration;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public Mina2Component() {
         super(Mina2Endpoint.class);
@@ -68,7 +70,7 @@ public class Mina2Component extends UriEndpointComponent implements SSLContextPa
         config.setFilters(resolveAndRemoveReferenceListParameter(parameters, "filters", IoFilter.class));
         setProperties(config, parameters);
 
-        if (config.isUseGlobalSslContextParameters() && config.getSslContextParameters() == null) {
+        if (config.getSslContextParameters() == null) {
             config.setSslContextParameters(getGlobalSSLContextParameters());
         }
 
@@ -117,4 +119,18 @@ public class Mina2Component extends UriEndpointComponent implements SSLContextPa
     public void setConfiguration(Mina2Configuration configuration) {
         this.configuration = configuration;
     }
+
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java
----------------------------------------------------------------------
diff --git a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java
index e05d438..2721791 100644
--- a/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java
+++ b/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Configuration.java
@@ -76,8 +76,6 @@ public class Mina2Configuration implements Cloneable {
     @UriParam(label = "security")
     private SSLContextParameters sslContextParameters;
     @UriParam(label = "security", defaultValue = "true")
-    private boolean useGlobalSslContextParameters = true;
-    @UriParam(label = "security", defaultValue = "true")
     private boolean autoStartTls = true;
     @UriParam(label = "advanced", defaultValue = "16")
     private int maximumPoolSize = 16; // 16 is the default mina setting
@@ -343,17 +341,6 @@ public class Mina2Configuration implements Cloneable {
         this.sslContextParameters = sslContextParameters;
     }
 
-    public boolean isUseGlobalSslContextParameters() {
-        return useGlobalSslContextParameters;
-    }
-
-    /**
-     * Enable usage of Camel global sslContextParameters.
-     */
-    public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) {
-        this.useGlobalSslContextParameters = useGlobalSslContextParameters;
-    }
-
     public boolean isAutoStartTls() {
         return autoStartTls;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2SslGlobalContextParametersTcpTest.java
----------------------------------------------------------------------
diff --git a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2SslGlobalContextParametersTcpTest.java b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2SslGlobalContextParametersTcpTest.java
index 7b865e1..af4aa2d 100644
--- a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2SslGlobalContextParametersTcpTest.java
+++ b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2SslGlobalContextParametersTcpTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.mina2;
 
 import org.apache.camel.CamelContext;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
@@ -30,6 +31,7 @@ public class Mina2SslGlobalContextParametersTcpTest extends BaseMina2Test {
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = super.createCamelContext();
         context.setSSLContextParameters(createSslContextParameters());
+        ((SSLContextParametersAware) context.getComponent("mina2")).setUseGlobalSSLContextParameters(true);
         return context;
     }
 
@@ -43,17 +45,6 @@ public class Mina2SslGlobalContextParametersTcpTest extends BaseMina2Test {
 
         assertMockEndpointsSatisfied();
     }
-
-    @Test
-    public void testMinaRouteWithoutSSL() throws Exception {
-        MockEndpoint endpoint = getMockEndpoint("mock:result");
-        Object body = "Hello there!";
-        endpoint.expectedBodiesReceived(body);
-
-        template.sendBodyAndHeader("mina2:tcp://localhost:" + getPort() + "?useGlobalSslContextParameters=false&sync=false&minaLogger=true", body, "cheese", 123);
-
-        endpoint.assertIsNotSatisfied(100);
-    }
     
     @Override
     protected boolean isUseSslContext() {

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsComponent.java b/components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsComponent.java
index 6c1cf32..dd0072d 100644
--- a/components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsComponent.java
+++ b/components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsComponent.java
@@ -21,9 +21,13 @@ import java.util.Map;
 import org.apache.camel.Endpoint;
 import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.spi.Metadata;
 
 public class NatsComponent extends DefaultComponent implements SSLContextParametersAware {
 
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
+
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         NatsConfiguration config = new NatsConfiguration();
@@ -38,4 +42,17 @@ public class NatsComponent extends DefaultComponent implements SSLContextParamet
         return endpoint;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
index 583e13a..239622b 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
@@ -62,6 +62,8 @@ public class NettyHttpComponent extends NettyComponent implements HeaderFilterSt
     private HeaderFilterStrategy headerFilterStrategy;
     @Metadata(label = "security")
     private NettyHttpSecurityConfiguration securityConfiguration;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public NettyHttpComponent() {
         // use the http configuration and filter strategy
@@ -254,6 +256,19 @@ public class NettyHttpComponent extends NettyComponent implements HeaderFilterSt
         this.securityConfiguration = securityConfiguration;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     public synchronized HttpServerConsumerChannelFactory getMultiplexChannelHandler(int port) {
         HttpServerConsumerChannelFactory answer = multiplexChannelHandlers.get(port);
         if (answer == null) {

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGlobalSSLTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGlobalSSLTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGlobalSSLTest.java
index 760e836..a12c337 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGlobalSSLTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGlobalSSLTest.java
@@ -23,6 +23,7 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.RoutesBuilder;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.AvailablePortFinder;
@@ -76,6 +77,8 @@ public class NettyHttpGlobalSSLTest extends CamelTestSupport {
         trustManagers.setKeyStore(keyStore);
         sslContextParameters.setTrustManagers(trustManagers);
         context.setSSLContextParameters(sslContextParameters);
+
+        ((SSLContextParametersAware) context.getComponent("netty-http")).setUseGlobalSSLContextParameters(true);
         return context;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java
index 7b2f04a..9f87838 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java
@@ -42,6 +42,8 @@ public class NettyComponent extends UriEndpointComponent implements SSLContextPa
     private NettyConfiguration configuration;
     @Metadata(label = "advanced", defaultValue = "16")
     private int maximumPoolSize = 16;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public NettyComponent() {
         super(NettyEndpoint.class);
@@ -121,6 +123,19 @@ public class NettyComponent extends UriEndpointComponent implements SSLContextPa
         this.maximumPoolSize = maximumPoolSize;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     public Timer getTimer() {
         return timer;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyGlobalSSLContextParametersTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyGlobalSSLContextParametersTest.java b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyGlobalSSLContextParametersTest.java
index 9a352bf..61d8658 100644
--- a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyGlobalSSLContextParametersTest.java
+++ b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyGlobalSSLContextParametersTest.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.netty;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.util.jsse.ClientAuthentication;
 import org.apache.camel.util.jsse.KeyManagersParameters;
@@ -56,6 +57,8 @@ public class NettyGlobalSSLContextParametersTest extends BaseNettyTest {
         sslContextParameters.setServerParameters(scsp);
 
         context.setSSLContextParameters(sslContextParameters);
+
+        ((SSLContextParametersAware) context.getComponent("netty")).setUseGlobalSSLContextParameters(true);
         return context;
     }
     

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
index 3068f62..b82ac5b 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
@@ -64,6 +64,8 @@ public class NettyHttpComponent extends NettyComponent implements HeaderFilterSt
     private HeaderFilterStrategy headerFilterStrategy;
     @Metadata(label = "security")
     private NettyHttpSecurityConfiguration securityConfiguration;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
     
     public NettyHttpComponent() {
         // use the http configuration and filter strategy
@@ -264,6 +266,19 @@ public class NettyHttpComponent extends NettyComponent implements HeaderFilterSt
         this.securityConfiguration = securityConfiguration;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     public synchronized HttpServerConsumerChannelFactory getMultiplexChannelHandler(int port) {
         HttpServerConsumerChannelFactory answer = multiplexChannelHandlers.get(port);
         if (answer == null) {

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java
index 3740b77..2e365e2 100644
--- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java
+++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java
@@ -40,6 +40,8 @@ public class NettyComponent extends UriEndpointComponent implements SSLContextPa
     private int maximumPoolSize = 16;
     @Metadata(label = "advanced")
     private volatile EventExecutorGroup executorService;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public NettyComponent() {
         super(NettyEndpoint.class);
@@ -125,6 +127,19 @@ public class NettyComponent extends UriEndpointComponent implements SSLContextPa
         this.executorService = executorService;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     public EventExecutorGroup getExecutorService() {
         return executorService;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyGlobalSSLContextParametersTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyGlobalSSLContextParametersTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyGlobalSSLContextParametersTest.java
index a9f06da..c469a52 100644
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyGlobalSSLContextParametersTest.java
+++ b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyGlobalSSLContextParametersTest.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.netty4;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.util.jsse.ClientAuthentication;
 import org.apache.camel.util.jsse.KeyManagersParameters;
@@ -54,6 +55,8 @@ public class NettyGlobalSSLContextParametersTest extends BaseNettyTest {
         sslContextParameters.setTrustManagers(tmp);
         sslContextParameters.setServerParameters(scsp);
         context.setSSLContextParameters(sslContextParameters);
+
+        ((SSLContextParametersAware) context.getComponent("netty4")).setUseGlobalSSLContextParameters(true);
         return context;
     }
     

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
----------------------------------------------------------------------
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
index 21d472c..6fd46d5 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
@@ -26,6 +26,7 @@ import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.component.olingo2.api.impl.Olingo2AppImpl;
 import org.apache.camel.component.olingo2.internal.Olingo2ApiCollection;
 import org.apache.camel.component.olingo2.internal.Olingo2ApiName;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.component.AbstractApiComponent;
 import org.apache.camel.util.jsse.SSLContextParameters;
@@ -39,6 +40,9 @@ import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
  */
 public class Olingo2Component extends AbstractApiComponent<Olingo2ApiName, Olingo2Configuration, Olingo2ApiCollection> implements SSLContextParametersAware {
 
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
+
     // component level shared proxy
     private Olingo2AppWrapper apiProxy;
 
@@ -124,6 +128,19 @@ public class Olingo2Component extends AbstractApiComponent<Olingo2ApiName, Oling
         return result;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     private Olingo2AppWrapper createOlingo2App(Olingo2Configuration configuration) {
 
         Object clientBuilder = configuration.getHttpAsyncClientBuilder();

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Component.java
----------------------------------------------------------------------
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Component.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Component.java
index c4829a7..c8e1455 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Component.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Component.java
@@ -26,6 +26,7 @@ import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.component.olingo4.api.impl.Olingo4AppImpl;
 import org.apache.camel.component.olingo4.internal.Olingo4ApiCollection;
 import org.apache.camel.component.olingo4.internal.Olingo4ApiName;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.component.AbstractApiComponent;
 import org.apache.camel.util.jsse.SSLContextParameters;
@@ -39,6 +40,9 @@ import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
  */
 public class Olingo4Component extends AbstractApiComponent<Olingo4ApiName, Olingo4Configuration, Olingo4ApiCollection> implements SSLContextParametersAware {
 
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
+
     // component level shared proxy
     private Olingo4AppWrapper apiProxy;
 
@@ -173,6 +177,19 @@ public class Olingo4Component extends AbstractApiComponent<Olingo4ApiName, Oling
         return apiProxy;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     public void closeApiProxy(Olingo4AppWrapper apiProxy) {
         if (this.apiProxy != apiProxy) {
             // not a shared proxy

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
index 5522cac..94095be 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
@@ -114,6 +114,8 @@ public class RestletComponent extends HeaderFilterStrategyComponent implements R
     private Boolean synchronous;
     @Metadata(label = "advanced")
     private List<String> enabledConverters;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public RestletComponent() {
         this(new Component());
@@ -729,6 +731,19 @@ public class RestletComponent extends HeaderFilterStrategyComponent implements R
     }
 
     @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
+    @Override
     public Consumer createConsumer(CamelContext camelContext, Processor processor, String verb, String basePath, String uriTemplate,
                                    String consumes, String produces, RestConfiguration configuration, Map<String, Object> parameters) throws Exception {
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletHttpsWithGlobalSSLContextParametersTest.java
----------------------------------------------------------------------
diff --git a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletHttpsWithGlobalSSLContextParametersTest.java b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletHttpsWithGlobalSSLContextParametersTest.java
index 1c80547..6511108 100644
--- a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletHttpsWithGlobalSSLContextParametersTest.java
+++ b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletHttpsWithGlobalSSLContextParametersTest.java
@@ -21,6 +21,7 @@ import java.net.URL;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
+import org.apache.camel.SSLContextParametersAware;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.util.jsse.KeyManagersParameters;
 import org.apache.camel.util.jsse.KeyStoreParameters;
@@ -53,6 +54,8 @@ public class RestletHttpsWithGlobalSSLContextParametersTest extends RestletTestS
         sslContextParameters.setKeyManagers(kmp);
 
         context.setSSLContextParameters(sslContextParameters);
+
+        ((SSLContextParametersAware) context.getComponent("restlet")).setUseGlobalSSLContextParameters(true);
         return context;
     }
     

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
index 0f0b72d..b138553 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
@@ -133,6 +133,8 @@ public class SalesforceComponent extends DefaultComponent implements VerifiableC
     @Metadata(description = "SSL parameters to use, see SSLContextParameters class for all available options.",
         label = "common,security")
     private SSLContextParameters sslContextParameters;
+    @Metadata(description = "Enable usage of global SSL context parameters", label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     // Proxy host and port
     @Metadata(description = "Hostname of the HTTP proxy server to use.", label = "common,proxy")
@@ -525,6 +527,16 @@ public class SalesforceComponent extends DefaultComponent implements VerifiableC
         this.sslContextParameters = sslContextParameters;
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     public String getHttpProxyHost() {
         return httpProxyHost;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
index 965eece..af8fa9a 100644
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
+++ b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
@@ -36,6 +36,8 @@ public class ServiceNowComponent extends UriEndpointComponent implements Verifia
 
     @Metadata(label = "advanced")
     private ServiceNowConfiguration configuration;
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
 
     public ServiceNowComponent() {
         super(ServiceNowEndpoint.class);
@@ -79,7 +81,7 @@ public class ServiceNowComponent extends UriEndpointComponent implements Verifia
             configuration.setOauthTokenUrl(String.format("https://%s.service-now.com/oauth_token.do", instanceName));
         }
 
-        if (configuration.isUseGlobalSslContextParameters() && configuration.getSslContextParameters() == null) {
+        if (configuration.getSslContextParameters() == null) {
             configuration.setSslContextParameters(getGlobalSSLContextParameters());
         }
 
@@ -168,6 +170,19 @@ public class ServiceNowComponent extends UriEndpointComponent implements Verifia
         configuration.setOauthTokenUrl(oauthTokenUrl);
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
     /**
      * TODO: document
      */

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
index 2ff5d53..d16b31e 100644
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
+++ b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
@@ -22,6 +22,7 @@ import java.util.Map;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
+
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
@@ -110,8 +111,6 @@ public class ServiceNowConfiguration implements Cloneable {
     private ServiceNowRelease release = ServiceNowRelease.HELSINKI;
     @UriParam(label = "security")
     private SSLContextParameters sslContextParameters;
-    @UriParam(label = "security", defaultValue = "false")
-    private boolean useGlobalSslContextParameters;
     @UriParam(label = "advanced")
     private HTTPClientPolicy httpClientPolicy;
     @UriParam(label = "advanced")
@@ -506,17 +505,6 @@ public class ServiceNowConfiguration implements Cloneable {
         this.sslContextParameters = sslContextParameters;
     }
 
-    public boolean isUseGlobalSslContextParameters() {
-        return useGlobalSslContextParameters;
-    }
-
-    /**
-     * Enable usage of Camel global SSL configuration.
-     */
-    public void setUseGlobalSslContextParameters(boolean useSslContextParameters) {
-        this.useGlobalSslContextParameters = useSslContextParameters;
-    }
-
     public HTTPClientPolicy getHttpClientPolicy() {
         return httpClientPolicy;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d51aa65d/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceComponent.java b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceComponent.java
index 0076f24..a7249fe 100644
--- a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceComponent.java
+++ b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceComponent.java
@@ -33,6 +33,7 @@ import org.apache.camel.component.spring.ws.type.EndpointMappingKey;
 import org.apache.camel.component.spring.ws.type.EndpointMappingType;
 import org.apache.camel.converter.jaxp.XmlConverter;
 import org.apache.camel.impl.UriEndpointComponent;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.util.EndpointHelper;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
@@ -48,6 +49,9 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
 public class SpringWebserviceComponent extends UriEndpointComponent implements SSLContextParametersAware {
     private static final Logger LOG = LoggerFactory.getLogger(SpringWebserviceComponent.class);
 
+    @Metadata(label = "security", defaultValue = "false")
+    private boolean useGlobalSSLContextParameters;
+
     public SpringWebserviceComponent() {
         super(SpringWebserviceEndpoint.class);
     }
@@ -185,4 +189,17 @@ public class SpringWebserviceComponent extends UriEndpointComponent implements S
         }
     }
 
+    @Override
+    public boolean isUseGlobalSSLContextParameters() {
+        return this.useGlobalSSLContextParameters;
+    }
+
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    @Override
+    public void setUseGlobalSSLContextParameters(boolean useGlobalSSLContextParameters) {
+        this.useGlobalSSLContextParameters = useGlobalSSLContextParameters;
+    }
+
 }


Mime
View raw message