camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apatel <apa...@asg.bellsouth.net>
Subject Re: https4(Apache Camel 2.10.3) component option httpClientConfigurer for SSL is not working when i have two different configure for two different route
Date Fri, 03 May 2013 17:24:28 GMT
Following things we have tried:

* two routes with different "sslContextParametersRef" endpoint options.
* two routes with different "httpClientConfigurerRef" endpoint options 
* two routes with different "httpClientConfigurerRef" AND "

File:  encoreSSLParams.groovy
----------------------------------------------
beans {
   
     
encoreSslKeyStoreParametersRef(org.apache.camel.util.jsse.KeyStoreParameters)
{
               password = "xxxxx"
               resource =
"${System.getProperty('NIMBUS_HOME')}/qa2certs/EncoreKeyStore.jks".toString()
      } 
     
encoreSslTrustStoreParametersRef(org.apache.camel.util.jsse.KeyStoreParameters)
{
               password = "xxxxx"
               resource =
"${System.getProperty('NIMBUS_HOME')}/qa2certs/EncoreTrustStore.jks".toString()
      }

    
encoreSslKeyManagersParametersRef(org.apache.camel.util.jsse.KeyManagersParameters)
{
               keyStore = ref encoreSslKeyStoreParametersRef
               keyPassword = "xxxxx"
     }
   
     
encoreTrustManagersParametersRef(org.apache.camel.util.jsse.TrustManagersParameters)
{
                keyStore = ref encoreSslTrustStoreParametersRef
      }
     
encoreSslContextParametersRef(org.apache.camel.util.jsse.SSLContextParameters)
{ bean ->
           bean.singleton = false
           keyManagers = ref encoreSslKeyManagersParametersRef
           trustManagers = ref encoreTrustManagersParametersRef
      }

}

File: partialSSLParams.groovy

beans {
   
     
partialSslTrustStoreParametersRef(org.apache.camel.util.jsse.KeyStoreParameters)
{
               password = "weblogic1234"
               resource =
"${System.getProperty('NIMBUS_HOME')}/qa2certs/EncoreTrustStore.jks".toString()
      }

   
     
partialTrustManagersParametersRef(org.apache.camel.util.jsse.TrustManagersParameters)
{
                keyStore = ref partialSslTrustStoreParametersRef
      }

     
partialSslContextParametersRef(org.apache.camel.util.jsse.SSLContextParameters)
{  bean ->
           bean.singleton = false
           trustManagers = ref partialTrustManagersParametersRef
      }

}

Beans File used for trying multiple configurators, as well as multiple
seperate clientConnectionManagers to see if using seperate
clientConnectionManagers where the ssl stuff was desired to be seperated
would help:


import org.apache.camel.component.http4.HttpClientConfigurer
import org.apache.camel.component.http4.HttpComponent
import org.apache.camel.component.http4.HttpEndpoint
import nimbus.ExtBeans.TracingHttp4.TracingHttp4Configurator
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
import org.apache.http.conn.scheme.SchemeRegistry;

beans {
                 
                 http4ClientSchemeRegistry(SchemeRegistry)
                 tracingHttp4ClientSchemeRegistry(SchemeRegistry)

                http4ClientConnMgr(ThreadSafeClientConnManager,
ref("http4ClientSchemeRegistry"))

                 tracingHttp4ClientConnMgr(ThreadSafeClientConnManager,
ref("tracingHttp4ClientSchemeRegistry"))

                 tracingHttp4ConfiguratorBean(TracingHttp4Configurator) 

                      
}

Two routes that you play with the see the effects:


Tracing test route:
<route xmlns="http://camel.apache.org/schema/spring" trace="true"
id="nimbus.ssltests:tracingHttp4Test:1.0" >
  <from uri=\"servlet:///test/onMobileWith2WaySSL" />
  <setHeader headerName="Exchange.HTTP_URI">    
	<constant>https4://xxxxxxxxx:443</constant>
</setHeader>
 <to
uri="https4://dummy10?sslContextParametersRef=encoreSslContextParametersRef"/>

</route>

Non Tracing test route:

<route xmlns="http://camel.apache.org/schema/spring" trace="true"
id="nimbus.ssltests:http4Test:1.0" >
  <from uri=\"servlet:///test/onMobileWithSsl" />
  <setHeader headerName="Exchange.HTTP_URI">    
	<constant>https4://xxxxxxxxxx:443</constant>
</setHeader>
 <to
uri="https4://dummy20?sslContextParametersRef=partialSslContextParametersRef"/>

</route>



--
View this message in context: http://camel.465427.n5.nabble.com/https4-Apache-Camel-2-10-3-component-option-httpClientConfigurer-for-SSL-is-not-working-when-i-have-e-tp5731929p5731994.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message