Search code examples
sslapache-cameljbossfuse

Camel CXF consumer using basic authentication over HTTPS


I am trying to workout how to configure a CXF consumer to use https, but use basic authentication.

I presume we need to attach our certificate using the httpj:engine-factory but whenever I try and do that the server generated the follwing error:

javax.net.ssl.SSLHandshakeException: null cert chain

EDIT: I believe what is happening is that the server is requesting a client certificate, but the client does not send one. For "One Directional" SLL, I don't think the server should be asking for a certificate from the client.

How do I prevent the server from requesting a client certificate?

Any assistance greatly appreciated.


Solution

  • It turned out to be quite simple. In the httpj:engine-factory, there is a setting for client authentication.

     <sec:clientAuthentication want="false" required="false"/>
    

    This controls whether the server requests a certificate from the client. I had copied this from samples with Bi-Directional SSL and these values were set to true.