camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jspyeatt <john.pye...@singlewire.com>
Subject Re: https4 2.15.2 not recognizing my httpClientConfigurer endpoint option
Date Tue, 09 Jun 2015 17:52:12 GMT
My class that implements HttpClientConfigurer now looks like this from your
suggestions: and it still doesn't work.



My createRegistry() looks like this:
    @Override


I added a jndi.properties file that looks like this:


My uri now looks like this

https4://172.30.228.23:8444/InformaCast/RESTServices/V1/Admin/System/ldap/isLdapConfigured?x509HostnameVerifier=*allHostnameVerifier*&httpClientConfigurer=*monteTrustingConfigurer*

So I thought I now have all of my ducks in a row. But my sslContext created
in configureHttpClient() still isn't calling my isTrusted() method.

There must be something I'm still missing for the HttpComponent that isn't
matching the uri arguments for x509HostnameVerifier and httpClientConfigurer
to my registry.

I've done a deep dive into the source code of HttpComponent.java with a
debugger.

when coming out of createEndpoint() in the source code the endpoint variable
appears to at least partially be configured correctly.

endpoint.endpointUri="https4://172.30.228.23:8444/InformaCast/RESTServices/V1/Admin/System/ldap/isLdapConfigured?httpClientConfigurer=monteTrustingConfigurer&x509HostnameVerifier=allHostnameVerifier"

endpoint.httpClientConfigurer is set to an instance of my class that
implements the above configureHttpClient(), TrustingHttpClientConfigurer.

endpoint.*component*.httpClientConfigurer is null   (which might be OK if
it's only used as the default)
endpoint.*component*.x509HostnameVerifier is set to BROWSER_COMPATIBLE (this
isn't what I want, but again, may just be a default). But I don't see my
override value org.apache.http.conn.ssl.AllowAllHostnameVerifier()

Now looking at endpoint.camelContext.registry

endpoint.camelContext.registry.context.delegate.defaultInitCtx.bindings.0  
monteTrustingConfigurer = instance of TrustingHttpClientConfigurer
endpoint.camelContext.registry.context.delegate.defaultInitCtx.bindings.1  
java.naming.factory.initial =
org.apache.camel.util.jndi.CamelInitialContextFactory
endpoint.camelContext.registry.context.delegate.defaultInitCtx.bindings.2 
allHostnameVerifier = ALLOW_ALL


Does anyone see what other little nuggets of knowledge I'm missing?



--
View this message in context: http://camel.465427.n5.nabble.com/https4-2-15-2-not-recognizing-my-httpClientConfigurer-endpoint-option-tp5767922p5768038.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message