You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by raakula <ra...@nsn.com> on 2011/12/13 11:08:47 UTC

CXF TLS configuration

Hi,
   We are using ServiceMix CXF Binding component, which has CXF 2.2.6
version.
In it we want to have the below functionality implemented.
1. Basic TLS configuration (2 way handshake)
2. In case if handshake fails due to invalid certificate, we want to findout
from where the request is coming and log the details of the client.
3. CRL support. I guess CXF 2.2.6 doesn't have CRL support. 

For 1> I have used below configuration 
---------------------------------------------------------------------
<httpj:engine-factory bus="cxf">
   <httpj:engine port="30510">

    <httpj:tlsServerParameters>
      <sec:keyManagers keyPassword="servicemix">
           <sec:keyStore type="JKS" resource="CertName.jks"
password="servicemix" />
      </sec:keyManagers>
    <sec:trustManagers>
               <sec:keyStore type="PKCS12" resource="clientpkcs.p12"
password="servicemix" />
      </sec:trustManagers>
    <sec:clientAuthentication want="true" required="true"/>  
 </httpj:tlsServerParameters>
---------------------------------------------------------------------
And then I tried to send the request using SOAPUi.
SOAPUI am getting the error --> Tue Dec 13 15:36:36 IST
2011:ERROR:java.net.SocketException: Connection closed by remote host
And the exception I am getting on the server side is -->
3937543 [1621935001@qtp-1894313925-4] WARN org.mortbay.log - EXCEPTION
javax.net.ssl.SSLHandshakeException: null cert chain
        at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1649)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:231)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.clientCertificate(ServerHandshaker.java:1369)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:160)
        at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
        at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
        at
org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:675)
        at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
--------------------------------------------------------
Any pointers on these 3 points would be really of great help.

Thanks and regards,
Ramu
 



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-TLS-configuration-tp5071021p5071021.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF TLS configuration

Posted by raakula <ra...@nsn.com>.
Freeman,
  Again no luck :-(

Same stack trace still :-(
DEBUG - CxfBcComponent                 - Service unit started
INFO  - AutoDeploymentService          - Directory: hotdeploy: Finished
installation of archive:  wsdl-first-sa.zip
2425121 [783983780@qtp-832293601-4] WARN org.mortbay.log - EXCEPTION
javax.net.ssl.SSLHandshakeException: null cert chain
        at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1649)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
        at
com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:231)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.clientCertificate(ServerHandshaker.java:1369)
        at
com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:160)
        at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
        at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
        at
org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:675)
        at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

--
View this message in context: http://servicemix.396122.n5.nabble.com/Re-CXF-TLS-configuration-tp5073601p5091331.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: CXF TLS configuration

Posted by Freeman Fang <fr...@gmail.com>.
Ok, try to add before  
Soap11FaultOutInterceptor.Soap11FaultOutInterceptorInternal which  
phase is Phase.MARSHAL,
This should work.

Freeman
On 2011-12-20, at 下午5:37, raakula wrote:

> Hi Freeman,
>  Thanks again, and no luck still :-(
> My class is looking something like -->
>
>
> 	public CXFHanlderInterceptor() {
>
> 		super(Phase.PRE_PROTOCOL);
> 		System.out
> 				.println("<<<<<<<<<<<<<<<<<<<<<<INSIDE CONST>>>>>>>>>>>>>>>>>>>");
> 		// getBefore().add(CertConstraintsInterceptor.class.getName());
> 		getBefore().add(
> 				org.apache.cxf.interceptor.FaultOutInterceptor.class.getName());
>
> 	}
>
> 	 @Override
> 	public void handleMessage(Message message)
> 	
> 	{
> 		LOG.debug("I AM IN HANDLE MESSAGE....");
> 		System.out
> 				.println("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>");
> 	
> 	}
> -------------------------------
> And my xbean is having -->
> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>       xmlns:person="http://servicemix.apache.org/samples/wsdl-first">
>
>  <cxfbc:consumer wsdl="classpath:person.wsdl"
>                      targetService="person:PersonService"
>                      targetInterface="person:Person"
>                      busCfg="tls-cxfbuscfg.xml">
>
>  <cxfbc:outFaultInterceptors>
>    <bean class="com.nsn.oss.mf.CXFHanlderInterceptor" />
>  </cxfbc:outFaultInterceptors>
>  </cxfbc:consumer>
>
> </beans>
> -------------------------------------------------------
>
> Any clues??
>
> regards,
> Ramu
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Re-CXF-TLS-configuration-tp5073601p5088416.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: CXF TLS configuration

Posted by raakula <ra...@nsn.com>.
Hi Freeman,
  Thanks again, and no luck still :-(
My class is looking something like -->


	public CXFHanlderInterceptor() {

		super(Phase.PRE_PROTOCOL);
		System.out
				.println("<<<<<<<<<<<<<<<<<<<<<<INSIDE CONST>>>>>>>>>>>>>>>>>>>");
		// getBefore().add(CertConstraintsInterceptor.class.getName());
		getBefore().add(
				org.apache.cxf.interceptor.FaultOutInterceptor.class.getName());

	}

	 @Override
	public void handleMessage(Message message) 
	 
	{
		LOG.debug("I AM IN HANDLE MESSAGE....");
		System.out
				.println("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>");
	
	}
-------------------------------
And my xbean is having -->
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
       xmlns:person="http://servicemix.apache.org/samples/wsdl-first">

  <cxfbc:consumer wsdl="classpath:person.wsdl"
                      targetService="person:PersonService"
                      targetInterface="person:Person"
                      busCfg="tls-cxfbuscfg.xml">
   
  <cxfbc:outFaultInterceptors>
    <bean class="com.nsn.oss.mf.CXFHanlderInterceptor" />                   
  </cxfbc:outFaultInterceptors>
  </cxfbc:consumer>

</beans>
-------------------------------------------------------

Any clues??

regards,
Ramu

--
View this message in context: http://servicemix.396122.n5.nabble.com/Re-CXF-TLS-configuration-tp5073601p5088416.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: CXF TLS configuration

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

My comment inline
On 2011-12-20, at 下午2:21, raakula wrote:

> Hi Freeman,
>   Once again thanks for the response. And for interceptor (2) -->
> I have added sysout statements already.
> My question is am I using the correct phase (RECEIVE) and also the
> predecessor interceptor. I tried both CertConstraintsInterceptor and
> PolicyInInterceptor as you could see in the sample code that I  
> pasted in my
> previous mail.
Basically you can add an customer interceptor in server  
outFaultInterceptors, ensure it was invoked before the  
org.apache.cxf.interceptor.FaultOutInterceptor[1], and in this  
customer interceptor you can do any operation on the Fault f =  
(Fault)message.getContent(Exception.class); you want, likely determine  
the exception type and log it separately if it's the type you concern.

[1]https://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/FaultOutInterceptor.java
>
> For CRL (3) -->
> Probably we can try to implement it through interceptors if it  
> doesn't come
> as part of SMX3.4 because migrating to SMX 4.4 would take lot of  
> time for
> us.
> By the way do you have some update on when we can get SMX3.4 for use?
Thanks Gert who recut SMX3.4 release candidate kit so SMX3.4 will ship  
wss4j 1.6.3, this is in VOTE now, if everything is OK will get  
released this week.

Freeman
> regards,
> Ramu
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Re-CXF-TLS-configuration-tp5073601p5088072.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: CXF TLS configuration

Posted by raakula <ra...@nsn.com>.
Hi Freeman,
   Once again thanks for the response. And for interceptor (2) -->
I have added sysout statements already.
My question is am I using the correct phase (RECEIVE) and also the
predecessor interceptor. I tried both CertConstraintsInterceptor and
PolicyInInterceptor as you could see in the sample code that I pasted in my
previous mail. 

For CRL (3) -->
Probably we can try to implement it through interceptors if it doesn't come
as part of SMX3.4 because migrating to SMX 4.4 would take lot of time for
us.
By the way do you have some update on when we can get SMX3.4 for use?
regards,
Ramu 


--
View this message in context: http://servicemix.396122.n5.nabble.com/Re-CXF-TLS-configuration-tp5073601p5088072.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: CXF TLS configuration

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Again, as servicemix-cxf jbi component is Apache Servicemix project,   
so please reply to servicemix users maillinglist, the address is users@servicemix.apache.org 
.

My other comment inline
On 2011-12-15, at 上午11:43, raakula wrote:

> Hi Freeman,
>   Thanks for the quick response. And I thought SMX is packaging CXF
> directly. So posted the Qs to CXF forum.
>
> Coming to the issues -->
>>> 1. Did your client SOAPUi also configure the SSL  support?
> Ramu>> Yes, I have configured TLS setting in SOAPUi project also.  
> But no
> luck. Probably I will try to use the sample testcases for my testing.
>>> 2. For the second question on adding interceptors
>>> You can basically write a customer interceptor and add it to
> servicemix-cxf-bc to do so.
> Ramu >> I tried to write custom interceptor with constructor as below
> public CXFHanlderInterceptor() {
>    	
>        super (Phase.RECEIVE);
>        System.out.println("<<<<<<<<<<<<<<<<<<<<<<INSIDE
> CONST>>>>>>>>>>>>>>>>>>>");
>        //getBefore().add(CertConstraintsInterceptor.class.getName());
>        getBefore().add(PolicyInInterceptor.class.getName());
>
>    }
> @Override
>    public void handleMessage(Message message)  {
>    	LOG.debug("I AM ALSO WORKING....");
>    	 
> System.out.println("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>");
>            }
>    @Override
>    public void handleFault(Message messageParam)
>    {
>    	try{
>
> System.out.println("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>");
>        LOG.debug("I TOOOO AM WORKING....");
>    	}
>        catch (Exception e)
>        {
>
> System.out.println("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>");
>            LOG.debug("I TOOOO AM WORKING....");
>        }
>    }
>
> In case of HandShake faiulre, I couldn't see any of my statemets.  
> Wondering
> what could be the correct Phase and the exact Interceptor before  
> which my
> custom Interceptor need to be invoked.
>
That's weird, could you ensure you enable DEBUG level log for your  
interceptor, as you're using SMX 3.3.2,there's a log4j.xml in conf  
folder.
Or you can simply use System.out.println(...)  in this case, just  
ensure your interceptor is added correctly.
>>>> 3 CRL -->
> Right now we are using SMX 3.3.2 and don't have immediate plans to  
> migrate
> to 4.x. But planning to migrate to SMX 3.4 once it's available.  
> Would it be
> so that SMX 3.4 also contain CRL support? i.e supports WSS4j1.6.1
SMX3.4 and SMX4.4 is in VOTE now.
For SMX4.4 we use wss4j 1.6.3 which have CRL support.
But SMX3.4 the component still embed wss4j 1.6.0, I will fix it soon,  
but I'm not sure it's a show stopper, as JBI is kind of deprecated and  
we suggest users try with SMX4.x for a long time and almost all our  
endeavor focus on SMX4.x, anyway community will make this decision.

Freeman

>
> Thanks in advance and regards,
> Ramu
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-TLS-configuration-tp5071021p5076439.html
> Sent from the cxf-user mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: CXF TLS configuration

Posted by raakula <ra...@nsn.com>.
Hi Freeman,
   Thanks for the quick response. And I thought SMX is packaging CXF
directly. So posted the Qs to CXF forum.

Coming to the issues -->
>> 1. Did your client SOAPUi also configure the SSL  support? 
Ramu>> Yes, I have configured TLS setting in SOAPUi project also. But no
luck. Probably I will try to use the sample testcases for my testing.
>> 2. For the second question on adding interceptors 
>> You can basically write a customer interceptor and add it to   
servicemix-cxf-bc to do so. 
Ramu >> I tried to write custom interceptor with constructor as below
public CXFHanlderInterceptor() {
    	
        super (Phase.RECEIVE);
        System.out.println("<<<<<<<<<<<<<<<<<<<<<<INSIDE
CONST>>>>>>>>>>>>>>>>>>>");
        //getBefore().add(CertConstraintsInterceptor.class.getName());
        getBefore().add(PolicyInInterceptor.class.getName());
        
    }
@Override
    public void handleMessage(Message message)  {
    	LOG.debug("I AM ALSO WORKING....");
    	System.out.println("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>");
            }
    @Override
    public void handleFault(Message messageParam)
    {
    	try{
       
System.out.println("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        LOG.debug("I TOOOO AM WORKING....");
    	}
        catch (Exception e)
        {
        
System.out.println("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>");
            LOG.debug("I TOOOO AM WORKING....");
        }
    }

In case of HandShake faiulre, I couldn't see any of my statemets. Wondering
what could be the correct Phase and the exact Interceptor before which my
custom Interceptor need to be invoked.

>>> 3 CRL -->
Right now we are using SMX 3.3.2 and don't have immediate plans to migrate
to 4.x. But planning to migrate to SMX 3.4 once it's available. Would it be
so that SMX 3.4 also contain CRL support? i.e supports WSS4j1.6.1

Thanks in advance and regards,
Ramu

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-TLS-configuration-tp5071021p5076439.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF TLS configuration

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I think you should put this question on servciemix mailling list.

Other comments inline
On 2011-12-13, at 下午6:08, raakula wrote:

> Hi,
>   We are using ServiceMix CXF Binding component, which has CXF 2.2.6
> version.
> In it we want to have the below functionality implemented.
> 1. Basic TLS configuration (2 way handshake)
Did your client SOAPUi also configure the SSL  support?
We have a testcase[1] in SMX to demonstrate how to configure it with  
both client[2] and server[3] in servicemix-cxf-bc, you may need take a  
look.

[1]https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcHttpsConsumerTest.java
[2]https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml
[3]https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/CherryServer.xml
> 2. In case if handshake fails due to invalid certificate, we want to  
> findout
> from where the request is coming and log the details of the client.
You can basically write a customer interceptor and add it to  
servicemix-cxf-bc to do so.
> 3. CRL support. I guess CXF 2.2.6 doesn't have CRL support.
No, CXF 2.2.6 not support CRL support, CRL is supported since from  
WSS4j1.6.1. So you can wait Servicemix 4.4(which is during release  
process) or use FUSE ESB[4].
[4]http://fusesource.com/products/enterprise-servicemix/

Freeman
>
> For 1> I have used below configuration
> ---------------------------------------------------------------------
> <httpj:engine-factory bus="cxf">
>   <httpj:engine port="30510">
>
>    <httpj:tlsServerParameters>
>      <sec:keyManagers keyPassword="servicemix">
>           <sec:keyStore type="JKS" resource="CertName.jks"
> password="servicemix" />
>      </sec:keyManagers>
>    <sec:trustManagers>
>               <sec:keyStore type="PKCS12" resource="clientpkcs.p12"
> password="servicemix" />
>      </sec:trustManagers>
>    <sec:clientAuthentication want="true" required="true"/>
> </httpj:tlsServerParameters>
> ---------------------------------------------------------------------
> And then I tried to send the request using SOAPUi.
> SOAPUI am getting the error --> Tue Dec 13 15:36:36 IST
> 2011:ERROR:java.net.SocketException: Connection closed by remote host
> And the exception I am getting on the server side is -->
> 3937543 [1621935001@qtp-1894313925-4] WARN org.mortbay.log - EXCEPTION
> javax.net.ssl.SSLHandshakeException: null cert chain
>        at
> com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
>        at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java: 
> 1649)
>        at
> com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
>        at
> com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:231)
>        at
> com 
> .sun 
> .net 
> .ssl 
> .internal 
> .ssl.ServerHandshaker.clientCertificate(ServerHandshaker.java:1369)
>        at
> com 
> .sun 
> .net 
> .ssl 
> .internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java: 
> 160)
>        at
> com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java: 
> 593)
>        at
> com 
> .sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java: 
> 529)
>        at
> com 
> .sun 
> .net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
>        at
> com 
> .sun 
> .net 
> .ssl 
> .internal 
> .ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
>        at
> com 
> .sun 
> .net 
> .ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 
> 1165)
>        at
> com 
> .sun 
> .net 
> .ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 
> 1149)
>        at
> org.mortbay.jetty.security.SslSocketConnector 
> $SslConnection.run(SslSocketConnector.java:675)
>        at
> org.mortbay.thread.QueuedThreadPool 
> $PoolThread.run(QueuedThreadPool.java:582)
> --------------------------------------------------------
> Any pointers on these 3 points would be really of great help.
>
> Thanks and regards,
> Ramu
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-TLS-configuration-tp5071021p5071021.html
> Sent from the cxf-user mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: CXF TLS configuration

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I think you should put this question on servciemix mailling list.

Other comments inline
On 2011-12-13, at 下午6:08, raakula wrote:

> Hi,
>   We are using ServiceMix CXF Binding component, which has CXF 2.2.6
> version.
> In it we want to have the below functionality implemented.
> 1. Basic TLS configuration (2 way handshake)
Did your client SOAPUi also configure the SSL  support?
We have a testcase[1] in SMX to demonstrate how to configure it with  
both client[2] and server[3] in servicemix-cxf-bc, you may need take a  
look.

[1]https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcHttpsConsumerTest.java
[2]https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml
[3]https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/CherryServer.xml
> 2. In case if handshake fails due to invalid certificate, we want to  
> findout
> from where the request is coming and log the details of the client.
You can basically write a customer interceptor and add it to  
servicemix-cxf-bc to do so.
> 3. CRL support. I guess CXF 2.2.6 doesn't have CRL support.
No, CXF 2.2.6 not support CRL support, CRL is supported since from  
WSS4j1.6.1. So you can wait Servicemix 4.4(which is during release  
process) or use FUSE ESB[4].
[4]http://fusesource.com/products/enterprise-servicemix/

Freeman
>
> For 1> I have used below configuration
> ---------------------------------------------------------------------
> <httpj:engine-factory bus="cxf">
>   <httpj:engine port="30510">
>
>    <httpj:tlsServerParameters>
>      <sec:keyManagers keyPassword="servicemix">
>           <sec:keyStore type="JKS" resource="CertName.jks"
> password="servicemix" />
>      </sec:keyManagers>
>    <sec:trustManagers>
>               <sec:keyStore type="PKCS12" resource="clientpkcs.p12"
> password="servicemix" />
>      </sec:trustManagers>
>    <sec:clientAuthentication want="true" required="true"/>
> </httpj:tlsServerParameters>
> ---------------------------------------------------------------------
> And then I tried to send the request using SOAPUi.
> SOAPUI am getting the error --> Tue Dec 13 15:36:36 IST
> 2011:ERROR:java.net.SocketException: Connection closed by remote host
> And the exception I am getting on the server side is -->
> 3937543 [1621935001@qtp-1894313925-4] WARN org.mortbay.log - EXCEPTION
> javax.net.ssl.SSLHandshakeException: null cert chain
>        at
> com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
>        at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java: 
> 1649)
>        at
> com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
>        at
> com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:231)
>        at
> com 
> .sun 
> .net 
> .ssl 
> .internal 
> .ssl.ServerHandshaker.clientCertificate(ServerHandshaker.java:1369)
>        at
> com 
> .sun 
> .net 
> .ssl 
> .internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java: 
> 160)
>        at
> com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java: 
> 593)
>        at
> com 
> .sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java: 
> 529)
>        at
> com 
> .sun 
> .net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
>        at
> com 
> .sun 
> .net 
> .ssl 
> .internal 
> .ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
>        at
> com 
> .sun 
> .net 
> .ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 
> 1165)
>        at
> com 
> .sun 
> .net 
> .ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 
> 1149)
>        at
> org.mortbay.jetty.security.SslSocketConnector 
> $SslConnection.run(SslSocketConnector.java:675)
>        at
> org.mortbay.thread.QueuedThreadPool 
> $PoolThread.run(QueuedThreadPool.java:582)
> --------------------------------------------------------
> Any pointers on these 3 points would be really of great help.
>
> Thanks and regards,
> Ramu
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-TLS-configuration-tp5071021p5071021.html
> Sent from the cxf-user mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com