You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sebastian Gomez <sa...@gmail.com> on 2008/06/23 14:59:02 UTC
Security in CXF-BC (truststore)
Hi.
Up until now I had been using servicemix-http to communicate with
external WS from my application. In the ssl parameters I could easily
configure the location of the truststore. Having a look at the example
of security in cxfbc I've seen it's also easy to configure the
location of the keystore, but not the truststore.
How can I configure the truststore?
Thanks in advance.
Sebastian Gomez.
P.S: This is what the .properties file for ssl security in cxfbc looks like:
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=password
org.apache.ws.security.crypto.merlin.keystore.alias=alice
org.apache.ws.security.crypto.merlin.file=src/test/resources/org/apache/servicemix/cxfbc/ws/security/alice.jks
Re: Security in CXF-BC (truststore)
Posted by Sebastian Gomez <sa...@gmail.com>.
Hi again.
Basically the only difference between your test and mine is the fact
of launching a HttpsServer, which loads the CherryServer.xml. That
shouldn't be necessary in my case should it? My test setUp method
looks like this:
protected void setUp() throws Exception {
super.setUp();
}
Should I be setting up something else?
The other difference is that I'm using a PKCS12 certificate, but I've
seen in the CXF page that there's an example with that type, so that
shouldn't be the problem.
I'll have a look at the cxf examples and see if I find anything.
Thanks.
On Tue, Jun 24, 2008 at 1:28 PM, Freeman Fang <fr...@gmail.com> wrote:
> Hi,
>
> I just doubt your busCfg file is not loaded if you get same error as you
> didn't specify the busCfg.
> Could you list the SU package tree path and the way how you specify busCfg?
> And if possible please append the xbean.xml and your ssl settings xml.
>
> Regards
> Freeman
>
> Sebastian Gomez wrote:
>>
>> Hi.
>>
>> I've tried to do something similar against a real WS, not the
>> HttpsServer deployed in the example and I get the error
>> "sun.security.validator.ValidatorException: No trusted certificate
>> found".
>>
>> My application context file with the cxf-bc endpoint has the "busCfg"
>> pointing to my xml file with the ssl settings, and this one is the
>> same as the WibbleClient.xml except for the modifications so as to use
>> my certificates instead of those in the example.
>>
>> So apart from the different certificates, the other differences are
>> that I don't deploy either the cxf-se component (I don't think I need
>> it) or the HttpsServer (I shouldn't need it either if I'm
>> authenticating against my WS).
>>
>> Any idea why I may be getting that exception? The certificates are
>> correct, because I can use them out of the test and they work ok. (I'm
>> not using the CherryServer.xml file, should I be using some part of
>> it?)
>>
>> Thanks in advance.
>>
>> Sebastian Gomez.
>>
>> On Mon, Jun 23, 2008 at 3:54 PM, Freeman Fang <fr...@gmail.com>
>> wrote:
>>
>>>
>>> Hi,
>>>
>>> We can configure it in the spring file, take a look at [1] and [2], also
>>> [3]
>>> which is a test to use there configuration.
>>>
>>>
>>> [1]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/CherryServer.xml
>>>
>>> [2]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml
>>>
>>> [3]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderSecurityTest.java
>>>
>>> Regards
>>> Freeman
>>>
>>> Sebastian Gomez wrote:
>>>
>>>>
>>>> Hi.
>>>>
>>>> Up until now I had been using servicemix-http to communicate with
>>>> external WS from my application. In the ssl parameters I could easily
>>>> configure the location of the truststore. Having a look at the example
>>>> of security in cxfbc I've seen it's also easy to configure the
>>>> location of the keystore, but not the truststore.
>>>>
>>>> How can I configure the truststore?
>>>>
>>>> Thanks in advance.
>>>>
>>>> Sebastian Gomez.
>>>>
>>>>
>>>> P.S: This is what the .properties file for ssl security in cxfbc looks
>>>> like:
>>>>
>>>>
>>>>
>>>> org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
>>>> org.apache.ws.security.crypto.merlin.keystore.type=jks
>>>> org.apache.ws.security.crypto.merlin.keystore.password=password
>>>> org.apache.ws.security.crypto.merlin.keystore.alias=alice
>>>>
>>>>
>>>> org.apache.ws.security.crypto.merlin.file=src/test/resources/org/apache/servicemix/cxfbc/ws/security/alice.jks
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: Security in CXF-BC (truststore)
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
I just doubt your busCfg file is not loaded if you get same error as you
didn't specify the busCfg.
Could you list the SU package tree path and the way how you specify
busCfg? And if possible please append the xbean.xml and your ssl
settings xml.
Regards
Freeman
Sebastian Gomez wrote:
> Hi.
>
> I've tried to do something similar against a real WS, not the
> HttpsServer deployed in the example and I get the error
> "sun.security.validator.ValidatorException: No trusted certificate
> found".
>
> My application context file with the cxf-bc endpoint has the "busCfg"
> pointing to my xml file with the ssl settings, and this one is the
> same as the WibbleClient.xml except for the modifications so as to use
> my certificates instead of those in the example.
>
> So apart from the different certificates, the other differences are
> that I don't deploy either the cxf-se component (I don't think I need
> it) or the HttpsServer (I shouldn't need it either if I'm
> authenticating against my WS).
>
> Any idea why I may be getting that exception? The certificates are
> correct, because I can use them out of the test and they work ok. (I'm
> not using the CherryServer.xml file, should I be using some part of
> it?)
>
> Thanks in advance.
>
> Sebastian Gomez.
>
> On Mon, Jun 23, 2008 at 3:54 PM, Freeman Fang <fr...@gmail.com> wrote:
>
>> Hi,
>>
>> We can configure it in the spring file, take a look at [1] and [2], also [3]
>> which is a test to use there configuration.
>>
>> [1]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/CherryServer.xml
>> [2]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml
>> [3]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderSecurityTest.java
>>
>> Regards
>> Freeman
>>
>> Sebastian Gomez wrote:
>>
>>> Hi.
>>>
>>> Up until now I had been using servicemix-http to communicate with
>>> external WS from my application. In the ssl parameters I could easily
>>> configure the location of the truststore. Having a look at the example
>>> of security in cxfbc I've seen it's also easy to configure the
>>> location of the keystore, but not the truststore.
>>>
>>> How can I configure the truststore?
>>>
>>> Thanks in advance.
>>>
>>> Sebastian Gomez.
>>>
>>>
>>> P.S: This is what the .properties file for ssl security in cxfbc looks
>>> like:
>>>
>>>
>>> org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
>>> org.apache.ws.security.crypto.merlin.keystore.type=jks
>>> org.apache.ws.security.crypto.merlin.keystore.password=password
>>> org.apache.ws.security.crypto.merlin.keystore.alias=alice
>>>
>>> org.apache.ws.security.crypto.merlin.file=src/test/resources/org/apache/servicemix/cxfbc/ws/security/alice.jks
>>>
>>>
>>>
>>
>
>
Re: Security in CXF-BC (truststore)
Posted by Sebastian Gomez <sa...@gmail.com>.
Hi.
I've tried to do something similar against a real WS, not the
HttpsServer deployed in the example and I get the error
"sun.security.validator.ValidatorException: No trusted certificate
found".
My application context file with the cxf-bc endpoint has the "busCfg"
pointing to my xml file with the ssl settings, and this one is the
same as the WibbleClient.xml except for the modifications so as to use
my certificates instead of those in the example.
So apart from the different certificates, the other differences are
that I don't deploy either the cxf-se component (I don't think I need
it) or the HttpsServer (I shouldn't need it either if I'm
authenticating against my WS).
Any idea why I may be getting that exception? The certificates are
correct, because I can use them out of the test and they work ok. (I'm
not using the CherryServer.xml file, should I be using some part of
it?)
Thanks in advance.
Sebastian Gomez.
On Mon, Jun 23, 2008 at 3:54 PM, Freeman Fang <fr...@gmail.com> wrote:
> Hi,
>
> We can configure it in the spring file, take a look at [1] and [2], also [3]
> which is a test to use there configuration.
>
> [1]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/CherryServer.xml
> [2]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml
> [3]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderSecurityTest.java
>
> Regards
> Freeman
>
> Sebastian Gomez wrote:
>>
>> Hi.
>>
>> Up until now I had been using servicemix-http to communicate with
>> external WS from my application. In the ssl parameters I could easily
>> configure the location of the truststore. Having a look at the example
>> of security in cxfbc I've seen it's also easy to configure the
>> location of the keystore, but not the truststore.
>>
>> How can I configure the truststore?
>>
>> Thanks in advance.
>>
>> Sebastian Gomez.
>>
>>
>> P.S: This is what the .properties file for ssl security in cxfbc looks
>> like:
>>
>>
>> org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
>> org.apache.ws.security.crypto.merlin.keystore.type=jks
>> org.apache.ws.security.crypto.merlin.keystore.password=password
>> org.apache.ws.security.crypto.merlin.keystore.alias=alice
>>
>> org.apache.ws.security.crypto.merlin.file=src/test/resources/org/apache/servicemix/cxfbc/ws/security/alice.jks
>>
>>
>
>
Re: Security in CXF-BC (truststore)
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
We can configure it in the spring file, take a look at [1] and [2], also
[3] which is a test to use there configuration.
[1]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/CherryServer.xml
[2]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider/WibbleClient.xml
[3]http://svn.apache.org/repos/asf/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderSecurityTest.java
Regards
Freeman
Sebastian Gomez wrote:
> Hi.
>
> Up until now I had been using servicemix-http to communicate with
> external WS from my application. In the ssl parameters I could easily
> configure the location of the truststore. Having a look at the example
> of security in cxfbc I've seen it's also easy to configure the
> location of the keystore, but not the truststore.
>
> How can I configure the truststore?
>
> Thanks in advance.
>
> Sebastian Gomez.
>
>
> P.S: This is what the .properties file for ssl security in cxfbc looks like:
>
> org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
> org.apache.ws.security.crypto.merlin.keystore.type=jks
> org.apache.ws.security.crypto.merlin.keystore.password=password
> org.apache.ws.security.crypto.merlin.keystore.alias=alice
> org.apache.ws.security.crypto.merlin.file=src/test/resources/org/apache/servicemix/cxfbc/ws/security/alice.jks
>
>