You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Malisetti, Ramanjaneyulu" <Ra...@ca.com> on 2014/11/03 12:03:50 UTC
dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Hi,
I am keep debugging but not getting clue about issue. Could you give me any hint?. How can I trace where these header elements are dropped? Basically, my client code is adding username and password like below.
dispatch.getRequestContext().put("ws-security.username", "cat");
dispatch.getRequestContext().put("ws-security.password", "cat");
Regards
Raman
From: Malisetti, Ramanjaneyulu
Sent: Saturday, October 25, 2014 9:24 AM
To: users@cxf.apache.org
Subject: wsse:UsernameToken in request header - change from 2.7.1 to 3.0.2
Hi,
Our web services client code which used to work in CXF 2.7.1 is not working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>. Before making request we add following map to the dispatch.getRequestContext(), it is basically builds UserNameToken in webservice request
{ws-security.username=cat, ws-security.encryption.properties={org.apache.ws.security.crypto.merlin.keystore.password=default, org.apache.ws.security.crypto.merlin.keystore.type=JKS, org.apache.ws.security.crypto.merlin.file=/C:/ default-truststore.jks, org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin}, ws-security.password=cat, ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782<ma...@2cc782>}
When I trace request with CXF 2.7.1, it shows like below ..
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><international xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></international><RequestContext xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><MessageID<http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMessageID> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-417c-b13b-95b817218194</MessageID><To xmlns="http://www.w3.org/2005/08/addressing">https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo> xmlns="http://www.w3.org/2005/08/addressing"><Address>http://www.w3.org/2005/08/addressing/anonymous</Address></ReplyTo><Security<http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/ReplyTo%3e%3cSecurity> xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soap:mustUnderstand="1"><wsse:UsernameToken wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken></Security></soap:Header><soap:Body><GetMetadata xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
Same code in CXF 3.0.2, I don't see UsernameToken is added in request. The following is the request coming from client based on CXF 3.0.2
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><international xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></international><RequestContext xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><MessageID<http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMessageID> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-43af-8193-0fe94fafc412</MessageID><To xmlns="http://www.w3.org/2005/08/addressing">https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo> xmlns="http://www.w3.org/2005/08/addressing"><Address>http://www.w3.org/2005/08/addressing/anonymous</Address></ReplyTo></soap:Header><soap:Body><GetMetadata<http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/ReplyTo%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
What I am missing? Could you help?
Regards
Raman
RE: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Posted by "Malisetti, Ramanjaneyulu" <Ra...@ca.com>.
In case of testcase, I see the following, does it make difference?
STSClient stsClient = createDispatchSTSClient(bus);
String location = "https://localhost:" + test.getStsPort() + "/SecurityTokenService/Transport";
stsClient.setLocation(location);
stsClient.setPolicy("classpath:/org/apache/cxf/systest/sts/issuer/sts-transport-policy.xml");
Regards
Raman
From: Malisetti, Ramanjaneyulu
Sent: Tuesday, November 04, 2014 11:04 AM
To: 'Daniel Kulp'; users@cxf.apache.org
Subject: RE: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Yes, it is there, in fact I see it is being added when getConduit() is called. We are calling getConduit() to add TLS parameters. Also, I see on server side UsernameTokenInterceptor.handleMessage() is called and throwing exception as there is no securityheader.
[cid:image003.png@01CFF821.01F8B740]
[cid:image004.png@01CFF821.01F8B740]
Regards
Raman
-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Monday, November 03, 2014 10:58 PM
To: users@cxf.apache.org<ma...@cxf.apache.org>; Malisetti, Ramanjaneyulu
Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Do you have the cxf-rt-ws-policy jar on the class path?
--
Daniel Kulp
dkulp@apache.org<ma...@apache.org> - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
> On Nov 3, 2014, at 12:18 PM, Malisetti, Ramanjaneyulu <Ra...@ca.com>> wrote:
>
> In my case, I see only [MAPCodec] engaged whereas in sample case there are 3 interceptors in pre-protocol [MAPCodec, PolicyBasedWSS4JOutInterceptor, UsernameTokenInterceptor]
>
> Regards
> Raman
>
>
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> Sent: Monday, November 03, 2014 7:23 PM
> To: users@cxf.apache.org<ma...@cxf.apache.org>
> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>
> See here ("testSAML2Dispatch"):
>
> https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob_plain;f=services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java;hb=HEAD
>
> Colm.
>
>
> On Mon, Nov 3, 2014 at 12:02 PM, Malisetti, Ramanjaneyulu < Ramanjaneyulu.Malisetti@ca.com<ma...@ca.com>> wrote:
>
>> What is the sample/test available in CXF I can use to verify problem
>> outside of my program?
>>
>> Regards
>> Raman
>>
>> -----Original Message-----
>> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
>> Sent: Monday, November 03, 2014 4:41 PM
>> To: users@cxf.apache.org<ma...@cxf.apache.org>
>> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>>
>> I'd really need to see a test-case. Dispatch + WS-Security is working
>> fine with CXF 3.0.x, but maybe there is an issue with the metadata call.
>>
>> Colm.
>>
>> On Mon, Nov 3, 2014 at 11:03 AM, Malisetti, Ramanjaneyulu <
>> Ramanjaneyulu.Malisetti@ca.com<ma...@ca.com>> wrote:
>>
>>> Hi,
>>> I am keep debugging but not getting clue about issue.
>>> Could you give me any hint?. How can I trace where these header
>>> elements are dropped? Basically, my client code is adding username
>>> and password like below.
>>>
>>>
>>> dispatch.getRequestContext().put("ws-security.username", "cat");
>>> dispatch.getRequestContext().put("ws-security.password", "cat");
>>>
>>> Regards
>>> Raman
>>>
>>> From: Malisetti, Ramanjaneyulu
>>> Sent: Saturday, October 25, 2014 9:24 AM
>>> To: users@cxf.apache.org<ma...@cxf.apache.org>
>>> Subject: wsse:UsernameToken in request header - change from 2.7.1 to
>>> 3.0.2
>>>
>>> Hi,
>>>
>>> Our web services client code which used to work in CXF 2.7.1 is not
>>> working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>.
>>> Before making request we add following map to the
>>> dispatch.getRequestContext(), it is basically builds UserNameToken
>>> in webservice request
>>>
>>> {ws-security.username=cat,
>>> ws-security.encryption.properties={org.apache.ws.security.crypto.mer
>>> li
>>> n.keystore.password=default,
>>> org.apache.ws.security.crypto.merlin.keystore.type=JKS,
>>> org.apache.ws.security.crypto.merlin.file=/C:/
>>> default-truststore.jks,
>>> org.apache.ws.security.crypto.provider=org.apache.ws.security.compon
>>> en
>>> ts.crypto.Merlin},
>>> ws-security.password=cat,
>>> ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallba
>>> ck
>>> Handler@2cc782
>>> <mailto:ws-security.callback-handler
>>> =com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782<ma...@2cc782>>}
>>>
>>> When I trace request with CXF 2.7.1, it shows like below ..
>>>
>>> <soap:Envelope
>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
>>> <i
>>> nternational
>>> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
>>> te
>>> rnational><RequestContext
>>> xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action xmlns="
>>> http://www.w3.org/2005/08/addressing">
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag<http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMessag>
>>> eI
>>> D<
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
>>> Me
>>> ssageID>
>>> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-
>>> 41
>>> 7c-b13b-95b817218194</MessageID><To
>>> xmlns="http://www.w3.org/2005/08/addressing">
>>> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<<https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo%3c>
>>> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
>>>> xmlns="http://www.w3.org/2005/08/addressing"><Address>
>>> http://www.w3.org/2005/08/addressing/anonymous
>>> </Address></ReplyTo><Security<
>>> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
>>> yT
>>> o%3e%3cSecurity>
>>> xmlns="
>>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
>> ext-1.0.xsd
>> "
>>> xmlns:wsse="
>>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
>> ext-1.0.xsd
>> "
>>> xmlns:wsu="
>>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-uti
>> lity-1.0.xsd
>> "
>>> soap:mustUnderstand="1"><wsse:UsernameToken
>>> wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Pas
>>> sw
>>> ord
>>> Type="
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-tok
>>> en
>>> -profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken><
>>> /S
>>> ecurity></soap:Header><soap:Body><GetMetadata
>>> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
>>> Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
>>>
>>>
>>> Same code in CXF 3.0.2, I don't see UsernameToken is added in request.
>>> The following is the request coming from client based on CXF 3.0.2
>>>
>>> <soap:Envelope
>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
>>> <i
>>> nternational
>>> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
>>> te
>>> rnational><RequestContext
>>> xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="
>>> http://www.w3.org/2005/08/addressing">
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag<http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMessag>
>>> eI
>>> D<
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
>>> Me
>>> ssageID>
>>> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-
>>> 43
>>> af-8193-0fe94fafc412</MessageID><To
>>> xmlns="http://www.w3.org/2005/08/addressing">
>>> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<<https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo%3c>
>>> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
>>>> xmlns="http://www.w3.org/2005/08/addressing"><Address>
>>> http://www.w3.org/2005/08/addressing/anonymous
>>> </Address></ReplyTo></soap:Header><soap:Body><GetMetadata<
>>> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
>>> yT o%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata>
>>> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
>>> Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
>>>
>>>
>>> What I am missing? Could you help?
>>>
>>> Regards
>>> Raman
>>>
>>>
>>
>>
>> --
>> Colm O hEigeartaigh
>>
>> Talend Community Coder
>> http://coders.talend.com
>>
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
RE: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Posted by "Malisetti, Ramanjaneyulu" <Ra...@ca.com>.
Yes, it is there, in fact I see it is being added when getConduit() is called. We are calling getConduit() to add TLS parameters. Also, I see on server side UsernameTokenInterceptor.handleMessage() is called and throwing exception as there is no securityheader.
[cid:image001.png@01CFF81D.21DDFC90]
[cid:image002.png@01CFF81D.21DDFC90]
Regards
Raman
-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Monday, November 03, 2014 10:58 PM
To: users@cxf.apache.org; Malisetti, Ramanjaneyulu
Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Do you have the cxf-rt-ws-policy jar on the class path?
--
Daniel Kulp
dkulp@apache.org<ma...@apache.org> - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
> On Nov 3, 2014, at 12:18 PM, Malisetti, Ramanjaneyulu <Ra...@ca.com>> wrote:
>
> In my case, I see only [MAPCodec] engaged whereas in sample case there are 3 interceptors in pre-protocol [MAPCodec, PolicyBasedWSS4JOutInterceptor, UsernameTokenInterceptor]
>
> Regards
> Raman
>
>
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> Sent: Monday, November 03, 2014 7:23 PM
> To: users@cxf.apache.org<ma...@cxf.apache.org>
> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>
> See here ("testSAML2Dispatch"):
>
> https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob_plain;f=services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java;hb=HEAD
>
> Colm.
>
>
> On Mon, Nov 3, 2014 at 12:02 PM, Malisetti, Ramanjaneyulu < Ramanjaneyulu.Malisetti@ca.com<ma...@ca.com>> wrote:
>
>> What is the sample/test available in CXF I can use to verify problem
>> outside of my program?
>>
>> Regards
>> Raman
>>
>> -----Original Message-----
>> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
>> Sent: Monday, November 03, 2014 4:41 PM
>> To: users@cxf.apache.org<ma...@cxf.apache.org>
>> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>>
>> I'd really need to see a test-case. Dispatch + WS-Security is working
>> fine with CXF 3.0.x, but maybe there is an issue with the metadata call.
>>
>> Colm.
>>
>> On Mon, Nov 3, 2014 at 11:03 AM, Malisetti, Ramanjaneyulu <
>> Ramanjaneyulu.Malisetti@ca.com<ma...@ca.com>> wrote:
>>
>>> Hi,
>>> I am keep debugging but not getting clue about issue.
>>> Could you give me any hint?. How can I trace where these header
>>> elements are dropped? Basically, my client code is adding username
>>> and password like below.
>>>
>>>
>>> dispatch.getRequestContext().put("ws-security.username", "cat");
>>> dispatch.getRequestContext().put("ws-security.password", "cat");
>>>
>>> Regards
>>> Raman
>>>
>>> From: Malisetti, Ramanjaneyulu
>>> Sent: Saturday, October 25, 2014 9:24 AM
>>> To: users@cxf.apache.org<ma...@cxf.apache.org>
>>> Subject: wsse:UsernameToken in request header - change from 2.7.1 to
>>> 3.0.2
>>>
>>> Hi,
>>>
>>> Our web services client code which used to work in CXF 2.7.1 is not
>>> working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>.
>>> Before making request we add following map to the
>>> dispatch.getRequestContext(), it is basically builds UserNameToken
>>> in webservice request
>>>
>>> {ws-security.username=cat,
>>> ws-security.encryption.properties={org.apache.ws.security.crypto.mer
>>> li
>>> n.keystore.password=default,
>>> org.apache.ws.security.crypto.merlin.keystore.type=JKS,
>>> org.apache.ws.security.crypto.merlin.file=/C:/
>>> default-truststore.jks,
>>> org.apache.ws.security.crypto.provider=org.apache.ws.security.compon
>>> en
>>> ts.crypto.Merlin},
>>> ws-security.password=cat,
>>> ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallba
>>> ck
>>> Handler@2cc782
>>> <mailto:ws-security.callback-handler
>>> =com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782<ma...@2cc782>>}
>>>
>>> When I trace request with CXF 2.7.1, it shows like below ..
>>>
>>> <soap:Envelope
>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
>>> <i
>>> nternational
>>> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
>>> te
>>> rnational><RequestContext
>>> xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action xmlns="
>>> http://www.w3.org/2005/08/addressing">
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag<http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMessag>
>>> eI
>>> D<
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
>>> Me
>>> ssageID>
>>> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-
>>> 41
>>> 7c-b13b-95b817218194</MessageID><To
>>> xmlns="http://www.w3.org/2005/08/addressing">
>>> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<<https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo%3c>
>>> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
>>>> xmlns="http://www.w3.org/2005/08/addressing"><Address>
>>> http://www.w3.org/2005/08/addressing/anonymous
>>> </Address></ReplyTo><Security<
>>> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
>>> yT
>>> o%3e%3cSecurity>
>>> xmlns="
>>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
>> ext-1.0.xsd
>> "
>>> xmlns:wsse="
>>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
>> ext-1.0.xsd
>> "
>>> xmlns:wsu="
>>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-uti
>> lity-1.0.xsd
>> "
>>> soap:mustUnderstand="1"><wsse:UsernameToken
>>> wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Pas
>>> sw
>>> ord
>>> Type="
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-tok
>>> en
>>> -profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken><
>>> /S
>>> ecurity></soap:Header><soap:Body><GetMetadata
>>> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
>>> Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
>>>
>>>
>>> Same code in CXF 3.0.2, I don't see UsernameToken is added in request.
>>> The following is the request coming from client based on CXF 3.0.2
>>>
>>> <soap:Envelope
>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
>>> <i
>>> nternational
>>> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
>>> te
>>> rnational><RequestContext
>>> xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="
>>> http://www.w3.org/2005/08/addressing">
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag<http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMessag>
>>> eI
>>> D<
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
>>> Me
>>> ssageID>
>>> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-
>>> 43
>>> af-8193-0fe94fafc412</MessageID><To
>>> xmlns="http://www.w3.org/2005/08/addressing">
>>> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<<https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo%3c>
>>> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
>>>> xmlns="http://www.w3.org/2005/08/addressing"><Address>
>>> http://www.w3.org/2005/08/addressing/anonymous
>>> </Address></ReplyTo></soap:Header><soap:Body><GetMetadata<
>>> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
>>> yT o%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata>
>>> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
>>> Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
>>>
>>>
>>> What I am missing? Could you help?
>>>
>>> Regards
>>> Raman
>>>
>>>
>>
>>
>> --
>> Colm O hEigeartaigh
>>
>> Talend Community Coder
>> http://coders.talend.com
>>
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Posted by Daniel Kulp <dk...@apache.org>.
Do you have the cxf-rt-ws-policy jar on the class path?
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
> On Nov 3, 2014, at 12:18 PM, Malisetti, Ramanjaneyulu <Ra...@ca.com> wrote:
>
> In my case, I see only [MAPCodec] engaged whereas in sample case there are 3 interceptors in pre-protocol [MAPCodec, PolicyBasedWSS4JOutInterceptor, UsernameTokenInterceptor]
>
> Regards
> Raman
>
>
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> Sent: Monday, November 03, 2014 7:23 PM
> To: users@cxf.apache.org
> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>
> See here ("testSAML2Dispatch"):
>
> https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob_plain;f=services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java;hb=HEAD
>
> Colm.
>
>
> On Mon, Nov 3, 2014 at 12:02 PM, Malisetti, Ramanjaneyulu < Ramanjaneyulu.Malisetti@ca.com> wrote:
>
>> What is the sample/test available in CXF I can use to verify problem
>> outside of my program?
>>
>> Regards
>> Raman
>>
>> -----Original Message-----
>> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
>> Sent: Monday, November 03, 2014 4:41 PM
>> To: users@cxf.apache.org
>> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>>
>> I'd really need to see a test-case. Dispatch + WS-Security is working
>> fine with CXF 3.0.x, but maybe there is an issue with the metadata call.
>>
>> Colm.
>>
>> On Mon, Nov 3, 2014 at 11:03 AM, Malisetti, Ramanjaneyulu <
>> Ramanjaneyulu.Malisetti@ca.com> wrote:
>>
>>> Hi,
>>> I am keep debugging but not getting clue about issue.
>>> Could you give me any hint?. How can I trace where these header
>>> elements are dropped? Basically, my client code is adding username
>>> and password like below.
>>>
>>>
>>> dispatch.getRequestContext().put("ws-security.username", "cat");
>>> dispatch.getRequestContext().put("ws-security.password", "cat");
>>>
>>> Regards
>>> Raman
>>>
>>> From: Malisetti, Ramanjaneyulu
>>> Sent: Saturday, October 25, 2014 9:24 AM
>>> To: users@cxf.apache.org
>>> Subject: wsse:UsernameToken in request header - change from 2.7.1 to
>>> 3.0.2
>>>
>>> Hi,
>>>
>>> Our web services client code which used to work in CXF 2.7.1 is not
>>> working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>.
>>> Before making request we add following map to the
>>> dispatch.getRequestContext(), it is basically builds UserNameToken
>>> in webservice request
>>>
>>> {ws-security.username=cat,
>>> ws-security.encryption.properties={org.apache.ws.security.crypto.mer
>>> li
>>> n.keystore.password=default,
>>> org.apache.ws.security.crypto.merlin.keystore.type=JKS,
>>> org.apache.ws.security.crypto.merlin.file=/C:/
>>> default-truststore.jks,
>>> org.apache.ws.security.crypto.provider=org.apache.ws.security.compon
>>> en
>>> ts.crypto.Merlin},
>>> ws-security.password=cat,
>>> ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallba
>>> ck
>>> Handler@2cc782
>>> <mailto:ws-security.callback-handler
>>> =com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782>}
>>>
>>> When I trace request with CXF 2.7.1, it shows like below ..
>>>
>>> <soap:Envelope
>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
>>> <i
>>> nternational
>>> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
>>> te
>>> rnational><RequestContext
>>> xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action xmlns="
>>> http://www.w3.org/2005/08/addressing">
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag
>>> eI
>>> D<
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
>>> Me
>>> ssageID>
>>> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-
>>> 41
>>> 7c-b13b-95b817218194</MessageID><To
>>> xmlns="http://www.w3.org/2005/08/addressing">
>>> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
>>> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
>>>> xmlns="http://www.w3.org/2005/08/addressing"><Address>
>>> http://www.w3.org/2005/08/addressing/anonymous
>>> </Address></ReplyTo><Security<
>>> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
>>> yT
>>> o%3e%3cSecurity>
>>> xmlns="
>>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
>> ext-1.0.xsd
>> "
>>> xmlns:wsse="
>>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
>> ext-1.0.xsd
>> "
>>> xmlns:wsu="
>>>
>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-uti
>> lity-1.0.xsd
>> "
>>> soap:mustUnderstand="1"><wsse:UsernameToken
>>> wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Pas
>>> sw
>>> ord
>>> Type="
>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-tok
>>> en
>>> -profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken><
>>> /S
>>> ecurity></soap:Header><soap:Body><GetMetadata
>>> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
>>> Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
>>>
>>>
>>> Same code in CXF 3.0.2, I don't see UsernameToken is added in request.
>>> The following is the request coming from client based on CXF 3.0.2
>>>
>>> <soap:Envelope
>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
>>> <i
>>> nternational
>>> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
>>> te
>>> rnational><RequestContext
>>> xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="
>>> http://www.w3.org/2005/08/addressing">
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag
>>> eI
>>> D<
>>> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
>>> Me
>>> ssageID>
>>> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-
>>> 43
>>> af-8193-0fe94fafc412</MessageID><To
>>> xmlns="http://www.w3.org/2005/08/addressing">
>>> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
>>> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
>>>> xmlns="http://www.w3.org/2005/08/addressing"><Address>
>>> http://www.w3.org/2005/08/addressing/anonymous
>>> </Address></ReplyTo></soap:Header><soap:Body><GetMetadata<
>>> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
>>> yT o%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata>
>>> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
>>> Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
>>>
>>>
>>> What I am missing? Could you help?
>>>
>>> Regards
>>> Raman
>>>
>>>
>>
>>
>> --
>> Colm O hEigeartaigh
>>
>> Talend Community Coder
>> http://coders.talend.com
>>
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
RE: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Posted by "Malisetti, Ramanjaneyulu" <Ra...@ca.com>.
Security policy is in WSDL. While creating org<eclipse-javadoc:%E2%98%82=com.ca.ucf.core.bind/C:%5C/ca%5C/catalyst%5C/3.4.1%5C/build%5C/osgi-bundles%5C/cxf-rt-frontend-jaxws-3.0.2.jar%3Corg>.apache<eclipse-javadoc:%E2%98%82=com.ca.ucf.core.bind/C:%5C/ca%5C/catalyst%5C/3.4.1%5C/build%5C/osgi-bundles%5C/cxf-rt-frontend-jaxws-3.0.2.jar%3Corg.apache>.cxf<eclipse-javadoc:%E2%98%82=com.ca.ucf.core.bind/C:%5C/ca%5C/catalyst%5C/3.4.1%5C/build%5C/osgi-bundles%5C/cxf-rt-frontend-jaxws-3.0.2.jar%3Corg.apache.cxf>.jaxws<eclipse-javadoc:%E2%98%82=com.ca.ucf.core.bind/C:%5C/ca%5C/catalyst%5C/3.4.1%5C/build%5C/osgi-bundles%5C/cxf-rt-frontend-jaxws-3.0.2.jar%3Corg.apache.cxf.jaxws>.ServiceImpl, I am passing WSDL URL like below ..
service = new ServiceImpl(bus, nodeWSDL, WSProxyUtil.SERVICE_X509_NAME, ServiceImpl.class);
<wsp:Policy wsu:Id="X509V3BindingPolicy">
<wsp:ExactlyOne>
<wsp:All>
<sp:AsymmetricBinding>
<wsp:Policy>
<sp:InitiatorToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:RequireThumbprintReference />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorToken>
<sp:RecipientToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
<wsp:Policy>
<sp:RequireThumbprintReference />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientToken>
<sp:Layout>
<wsp:Policy>
<sp:Strict />
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp />
<sp:OnlySignEntireHeadersAndBody />
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:TripleDesRsa15 />
</wsp:Policy>
</sp:AlgorithmSuite>
</wsp:Policy>
</sp:AsymmetricBinding>
<sp:SignedSupportingTokens>
<wsp:Policy>
<sp:UsernameToken
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Once"
wsp:Optional="true">
<wsp:Policy>
<sp:WssUsernameToken10 />
</wsp:Policy>
</sp:UsernameToken>
</wsp:Policy>
</sp:SignedSupportingTokens>
<sp:SignedParts>
<sp:Body />
</sp:SignedParts>
<sp:EncryptedParts>
<sp:Body />
</sp:EncryptedParts>
<sp:EncryptedElements>
<sp:XPath>//node:RequestContext</sp:XPath>
<sp:XPath>//node:ResponseContext</sp:XPath>
<sp:XPath>//wsse:SecurityContextToken</sp:XPath>
</sp:EncryptedElements>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
Sent: Tuesday, November 04, 2014 3:35 PM
To: Malisetti, Ramanjaneyulu
Cc: users@cxf.apache.org
Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Is the a security policy in the WSDL you are using? How are you configuring the STSClient?
Colm.
On Mon, Nov 3, 2014 at 5:18 PM, Malisetti, Ramanjaneyulu <Ra...@ca.com>> wrote:
In my case, I see only [MAPCodec] engaged whereas in sample case there are 3 interceptors in pre-protocol [MAPCodec, PolicyBasedWSS4JOutInterceptor, UsernameTokenInterceptor]
Regards
Raman
-----Original Message-----
From: Colm O hEigeartaigh [mailto:coheigea@apache.org<ma...@apache.org>]
Sent: Monday, November 03, 2014 7:23 PM
To: users@cxf.apache.org<ma...@cxf.apache.org>
Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
See here ("testSAML2Dispatch"):
https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob_plain;f=services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java;hb=HEAD
Colm.
On Mon, Nov 3, 2014 at 12:02 PM, Malisetti, Ramanjaneyulu < Ramanjaneyulu.Malisetti@ca.com<ma...@ca.com>> wrote:
> What is the sample/test available in CXF I can use to verify problem
> outside of my program?
>
> Regards
> Raman
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org<ma...@apache.org>]
> Sent: Monday, November 03, 2014 4:41 PM
> To: users@cxf.apache.org<ma...@cxf.apache.org>
> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>
> I'd really need to see a test-case. Dispatch + WS-Security is working
> fine with CXF 3.0.x, but maybe there is an issue with the metadata call.
>
> Colm.
>
> On Mon, Nov 3, 2014 at 11:03 AM, Malisetti, Ramanjaneyulu <
> Ramanjaneyulu.Malisetti@ca.com<ma...@ca.com>> wrote:
>
> > Hi,
> > I am keep debugging but not getting clue about issue.
> > Could you give me any hint?. How can I trace where these header
> > elements are dropped? Basically, my client code is adding username
> > and password like below.
> >
> >
> > dispatch.getRequestContext().put("ws-security.username", "cat");
> > dispatch.getRequestContext().put("ws-security.password", "cat");
> >
> > Regards
> > Raman
> >
> > From: Malisetti, Ramanjaneyulu
> > Sent: Saturday, October 25, 2014 9:24 AM
> > To: users@cxf.apache.org<ma...@cxf.apache.org>
> > Subject: wsse:UsernameToken in request header - change from 2.7.1 to
> > 3.0.2
> >
> > Hi,
> >
> > Our web services client code which used to work in CXF 2.7.1 is not
> > working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>.
> > Before making request we add following map to the
> > dispatch.getRequestContext(), it is basically builds UserNameToken
> > in webservice request
> >
> > {ws-security.username=cat,
> > ws-security.encryption.properties={org.apache.ws.security.crypto.mer
> > li
> > n.keystore.password=default,
> > org.apache.ws.security.crypto.merlin.keystore.type=JKS,
> > org.apache.ws.security.crypto.merlin.file=/C:/
> > default-truststore.jks,
> > org.apache.ws.security.crypto.provider=org.apache.ws.security.compon
> > en
> > ts.crypto.Merlin},
> > ws-security.password=cat,
> > ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallba
> > ck
> > Handler@2cc782
> > <mailto:ws-security.callback-handler<mailto:ws-security.callback-handler>
> > =com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782<ma...@2cc782>>}
> >
> > When I trace request with CXF 2.7.1, it shows like below ..
> >
> > <soap:Envelope
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
> > <i
> > nternational
> > xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
> > te
> > rnational><RequestContext
> > xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action xmlns="
> > http://www.w3.org/2005/08/addressing">
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag
> > eI
> > D<
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
> > Me
> > ssageID>
> > xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-
> > 41
> > 7c-b13b-95b817218194</MessageID><To
> > xmlns="http://www.w3.org/2005/08/addressing">
> > https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> > https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
> > > xmlns="http://www.w3.org/2005/08/addressing"><Address>
> > http://www.w3.org/2005/08/addressing/anonymous
> > </Address></ReplyTo><Security<
> > http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
> > yT
> > o%3e%3cSecurity>
> > xmlns="
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
> ext-1.0.xsd
> "
> > xmlns:wsse="
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
> ext-1.0.xsd
> "
> > xmlns:wsu="
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-uti
> lity-1.0.xsd
> "
> > soap:mustUnderstand="1"><wsse:UsernameToken
> > wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Pas
> > sw
> > ord
> > Type="
> > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-tok
> > en
> > -profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken><
> > /S
> > ecurity></soap:Header><soap:Body><GetMetadata
> > xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> > Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
> >
> >
> > Same code in CXF 3.0.2, I don't see UsernameToken is added in request.
> > The following is the request coming from client based on CXF 3.0.2
> >
> > <soap:Envelope
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
> > <i
> > nternational
> > xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
> > te
> > rnational><RequestContext
> > xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="
> > http://www.w3.org/2005/08/addressing">
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag
> > eI
> > D<
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
> > Me
> > ssageID>
> > xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-
> > 43
> > af-8193-0fe94fafc412</MessageID><To
> > xmlns="http://www.w3.org/2005/08/addressing">
> > https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> > https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
> > > xmlns="http://www.w3.org/2005/08/addressing"><Address>
> > http://www.w3.org/2005/08/addressing/anonymous
> > </Address></ReplyTo></soap:Header><soap:Body><GetMetadata<
> > http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
> > yT o%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata>
> > xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> > Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
> >
> >
> > What I am missing? Could you help?
> >
> > Regards
> > Raman
> >
> >
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Posted by Colm O hEigeartaigh <co...@apache.org>.
Is the a security policy in the WSDL you are using? How are you configuring
the STSClient?
Colm.
On Mon, Nov 3, 2014 at 5:18 PM, Malisetti, Ramanjaneyulu <
Ramanjaneyulu.Malisetti@ca.com> wrote:
> In my case, I see only [MAPCodec] engaged whereas in sample case there
> are 3 interceptors in pre-protocol [MAPCodec,
> PolicyBasedWSS4JOutInterceptor, UsernameTokenInterceptor]
>
> Regards
> Raman
>
>
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> Sent: Monday, November 03, 2014 7:23 PM
> To: users@cxf.apache.org
> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>
> See here ("testSAML2Dispatch"):
>
>
> https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob_plain;f=services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java;hb=HEAD
>
> Colm.
>
>
> On Mon, Nov 3, 2014 at 12:02 PM, Malisetti, Ramanjaneyulu <
> Ramanjaneyulu.Malisetti@ca.com> wrote:
>
> > What is the sample/test available in CXF I can use to verify problem
> > outside of my program?
> >
> > Regards
> > Raman
> >
> > -----Original Message-----
> > From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> > Sent: Monday, November 03, 2014 4:41 PM
> > To: users@cxf.apache.org
> > Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
> >
> > I'd really need to see a test-case. Dispatch + WS-Security is working
> > fine with CXF 3.0.x, but maybe there is an issue with the metadata call.
> >
> > Colm.
> >
> > On Mon, Nov 3, 2014 at 11:03 AM, Malisetti, Ramanjaneyulu <
> > Ramanjaneyulu.Malisetti@ca.com> wrote:
> >
> > > Hi,
> > > I am keep debugging but not getting clue about issue.
> > > Could you give me any hint?. How can I trace where these header
> > > elements are dropped? Basically, my client code is adding username
> > > and password like below.
> > >
> > >
> > > dispatch.getRequestContext().put("ws-security.username", "cat");
> > > dispatch.getRequestContext().put("ws-security.password", "cat");
> > >
> > > Regards
> > > Raman
> > >
> > > From: Malisetti, Ramanjaneyulu
> > > Sent: Saturday, October 25, 2014 9:24 AM
> > > To: users@cxf.apache.org
> > > Subject: wsse:UsernameToken in request header - change from 2.7.1 to
> > > 3.0.2
> > >
> > > Hi,
> > >
> > > Our web services client code which used to work in CXF 2.7.1 is not
> > > working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>.
> > > Before making request we add following map to the
> > > dispatch.getRequestContext(), it is basically builds UserNameToken
> > > in webservice request
> > >
> > > {ws-security.username=cat,
> > > ws-security.encryption.properties={org.apache.ws.security.crypto.mer
> > > li
> > > n.keystore.password=default,
> > > org.apache.ws.security.crypto.merlin.keystore.type=JKS,
> > > org.apache.ws.security.crypto.merlin.file=/C:/
> > > default-truststore.jks,
> > > org.apache.ws.security.crypto.provider=org.apache.ws.security.compon
> > > en
> > > ts.crypto.Merlin},
> > > ws-security.password=cat,
> > > ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallba
> > > ck
> > > Handler@2cc782
> > > <mailto:ws-security.callback-handler
> > > =com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782>}
> > >
> > > When I trace request with CXF 2.7.1, it shows like below ..
> > >
> > > <soap:Envelope
> > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
> > > <i
> > > nternational
> > > xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
> > > te
> > > rnational><RequestContext
> > > xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action
> xmlns="
> > > http://www.w3.org/2005/08/addressing">
> > > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag
> > > eI
> > > D<
> > > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
> > > Me
> > > ssageID>
> > > xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-
> > > 41
> > > 7c-b13b-95b817218194</MessageID><To
> > > xmlns="http://www.w3.org/2005/08/addressing">
> > > https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> > > https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
> > > > xmlns="http://www.w3.org/2005/08/addressing"><Address>
> > > http://www.w3.org/2005/08/addressing/anonymous
> > > </Address></ReplyTo><Security<
> > > http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
> > > yT
> > > o%3e%3cSecurity>
> > > xmlns="
> > >
> > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
> > ext-1.0.xsd
> > "
> > > xmlns:wsse="
> > >
> > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
> > ext-1.0.xsd
> > "
> > > xmlns:wsu="
> > >
> > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-uti
> > lity-1.0.xsd
> > "
> > > soap:mustUnderstand="1"><wsse:UsernameToken
> > > wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Pas
> > > sw
> > > ord
> > > Type="
> > > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-tok
> > > en
> > > -profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken><
> > > /S
> > > ecurity></soap:Header><soap:Body><GetMetadata
> > > xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> > > Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
> > >
> > >
> > > Same code in CXF 3.0.2, I don't see UsernameToken is added in request.
> > > The following is the request coming from client based on CXF 3.0.2
> > >
> > > <soap:Envelope
> > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
> > > <i
> > > nternational
> > > xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
> > > te
> > > rnational><RequestContext
> > > xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="
> > > http://www.w3.org/2005/08/addressing">
> > > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag
> > > eI
> > > D<
> > > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
> > > Me
> > > ssageID>
> > > xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-
> > > 43
> > > af-8193-0fe94fafc412</MessageID><To
> > > xmlns="http://www.w3.org/2005/08/addressing">
> > > https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> > > https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
> > > > xmlns="http://www.w3.org/2005/08/addressing"><Address>
> > > http://www.w3.org/2005/08/addressing/anonymous
> > > </Address></ReplyTo></soap:Header><soap:Body><GetMetadata<
> > > http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
> > > yT o%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata>
> > > xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> > > Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
> > >
> > >
> > > What I am missing? Could you help?
> > >
> > > Regards
> > > Raman
> > >
> > >
> >
> >
> > --
> > Colm O hEigeartaigh
> >
> > Talend Community Coder
> > http://coders.talend.com
> >
>
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
RE: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Posted by "Malisetti, Ramanjaneyulu" <Ra...@ca.com>.
In my case, I see only [MAPCodec] engaged whereas in sample case there are 3 interceptors in pre-protocol [MAPCodec, PolicyBasedWSS4JOutInterceptor, UsernameTokenInterceptor]
Regards
Raman
-----Original Message-----
From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
Sent: Monday, November 03, 2014 7:23 PM
To: users@cxf.apache.org
Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
See here ("testSAML2Dispatch"):
https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob_plain;f=services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java;hb=HEAD
Colm.
On Mon, Nov 3, 2014 at 12:02 PM, Malisetti, Ramanjaneyulu < Ramanjaneyulu.Malisetti@ca.com> wrote:
> What is the sample/test available in CXF I can use to verify problem
> outside of my program?
>
> Regards
> Raman
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> Sent: Monday, November 03, 2014 4:41 PM
> To: users@cxf.apache.org
> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>
> I'd really need to see a test-case. Dispatch + WS-Security is working
> fine with CXF 3.0.x, but maybe there is an issue with the metadata call.
>
> Colm.
>
> On Mon, Nov 3, 2014 at 11:03 AM, Malisetti, Ramanjaneyulu <
> Ramanjaneyulu.Malisetti@ca.com> wrote:
>
> > Hi,
> > I am keep debugging but not getting clue about issue.
> > Could you give me any hint?. How can I trace where these header
> > elements are dropped? Basically, my client code is adding username
> > and password like below.
> >
> >
> > dispatch.getRequestContext().put("ws-security.username", "cat");
> > dispatch.getRequestContext().put("ws-security.password", "cat");
> >
> > Regards
> > Raman
> >
> > From: Malisetti, Ramanjaneyulu
> > Sent: Saturday, October 25, 2014 9:24 AM
> > To: users@cxf.apache.org
> > Subject: wsse:UsernameToken in request header - change from 2.7.1 to
> > 3.0.2
> >
> > Hi,
> >
> > Our web services client code which used to work in CXF 2.7.1 is not
> > working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>.
> > Before making request we add following map to the
> > dispatch.getRequestContext(), it is basically builds UserNameToken
> > in webservice request
> >
> > {ws-security.username=cat,
> > ws-security.encryption.properties={org.apache.ws.security.crypto.mer
> > li
> > n.keystore.password=default,
> > org.apache.ws.security.crypto.merlin.keystore.type=JKS,
> > org.apache.ws.security.crypto.merlin.file=/C:/
> > default-truststore.jks,
> > org.apache.ws.security.crypto.provider=org.apache.ws.security.compon
> > en
> > ts.crypto.Merlin},
> > ws-security.password=cat,
> > ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallba
> > ck
> > Handler@2cc782
> > <mailto:ws-security.callback-handler
> > =com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782>}
> >
> > When I trace request with CXF 2.7.1, it shows like below ..
> >
> > <soap:Envelope
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
> > <i
> > nternational
> > xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
> > te
> > rnational><RequestContext
> > xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action xmlns="
> > http://www.w3.org/2005/08/addressing">
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag
> > eI
> > D<
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
> > Me
> > ssageID>
> > xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-
> > 41
> > 7c-b13b-95b817218194</MessageID><To
> > xmlns="http://www.w3.org/2005/08/addressing">
> > https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> > https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
> > > xmlns="http://www.w3.org/2005/08/addressing"><Address>
> > http://www.w3.org/2005/08/addressing/anonymous
> > </Address></ReplyTo><Security<
> > http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
> > yT
> > o%3e%3cSecurity>
> > xmlns="
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
> ext-1.0.xsd
> "
> > xmlns:wsse="
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
> ext-1.0.xsd
> "
> > xmlns:wsu="
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-uti
> lity-1.0.xsd
> "
> > soap:mustUnderstand="1"><wsse:UsernameToken
> > wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Pas
> > sw
> > ord
> > Type="
> > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-tok
> > en
> > -profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken><
> > /S
> > ecurity></soap:Header><soap:Body><GetMetadata
> > xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> > Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
> >
> >
> > Same code in CXF 3.0.2, I don't see UsernameToken is added in request.
> > The following is the request coming from client based on CXF 3.0.2
> >
> > <soap:Envelope
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header>
> > <i
> > nternational
> > xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></in
> > te
> > rnational><RequestContext
> > xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="
> > http://www.w3.org/2005/08/addressing">
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><Messag
> > eI
> > D<
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3c
> > Me
> > ssageID>
> > xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-
> > 43
> > af-8193-0fe94fafc412</MessageID><To
> > xmlns="http://www.w3.org/2005/08/addressing">
> > https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> > https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo
> > > xmlns="http://www.w3.org/2005/08/addressing"><Address>
> > http://www.w3.org/2005/08/addressing/anonymous
> > </Address></ReplyTo></soap:Header><soap:Body><GetMetadata<
> > http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/Repl
> > yT o%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata>
> > xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> > Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
> >
> >
> > What I am missing? Could you help?
> >
> > Regards
> > Raman
> >
> >
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Posted by Colm O hEigeartaigh <co...@apache.org>.
See here ("testSAML2Dispatch"):
https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob_plain;f=services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java;hb=HEAD
Colm.
On Mon, Nov 3, 2014 at 12:02 PM, Malisetti, Ramanjaneyulu <
Ramanjaneyulu.Malisetti@ca.com> wrote:
> What is the sample/test available in CXF I can use to verify problem
> outside of my program?
>
> Regards
> Raman
>
> -----Original Message-----
> From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
> Sent: Monday, November 03, 2014 4:41 PM
> To: users@cxf.apache.org
> Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
>
> I'd really need to see a test-case. Dispatch + WS-Security is working fine
> with CXF 3.0.x, but maybe there is an issue with the metadata call.
>
> Colm.
>
> On Mon, Nov 3, 2014 at 11:03 AM, Malisetti, Ramanjaneyulu <
> Ramanjaneyulu.Malisetti@ca.com> wrote:
>
> > Hi,
> > I am keep debugging but not getting clue about issue.
> > Could you give me any hint?. How can I trace where these header
> > elements are dropped? Basically, my client code is adding username
> > and password like below.
> >
> >
> > dispatch.getRequestContext().put("ws-security.username", "cat");
> > dispatch.getRequestContext().put("ws-security.password", "cat");
> >
> > Regards
> > Raman
> >
> > From: Malisetti, Ramanjaneyulu
> > Sent: Saturday, October 25, 2014 9:24 AM
> > To: users@cxf.apache.org
> > Subject: wsse:UsernameToken in request header - change from 2.7.1 to
> > 3.0.2
> >
> > Hi,
> >
> > Our web services client code which used to work in CXF 2.7.1 is not
> > working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>.
> > Before making request we add following map to the
> > dispatch.getRequestContext(), it is basically builds UserNameToken in
> > webservice request
> >
> > {ws-security.username=cat,
> > ws-security.encryption.properties={org.apache.ws.security.crypto.merli
> > n.keystore.password=default,
> > org.apache.ws.security.crypto.merlin.keystore.type=JKS,
> > org.apache.ws.security.crypto.merlin.file=/C:/ default-truststore.jks,
> > org.apache.ws.security.crypto.provider=org.apache.ws.security.componen
> > ts.crypto.Merlin},
> > ws-security.password=cat,
> > ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallback
> > Handler@2cc782
> > <mailto:ws-security.callback-handler
> > =com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782>}
> >
> > When I trace request with CXF 2.7.1, it shows like below ..
> >
> > <soap:Envelope
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><i
> > nternational
> > xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></inte
> > rnational><RequestContext
> > xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action xmlns="
> > http://www.w3.org/2005/08/addressing">
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><MessageI
> > D<
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMe
> > ssageID>
> > xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-41
> > 7c-b13b-95b817218194</MessageID><To
> > xmlns="http://www.w3.org/2005/08/addressing">
> > https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> > https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo>
> > xmlns="http://www.w3.org/2005/08/addressing"><Address>
> > http://www.w3.org/2005/08/addressing/anonymous
> > </Address></ReplyTo><Security<
> > http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/ReplyT
> > o%3e%3cSecurity>
> > xmlns="
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> > xmlns:wsse="
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> > xmlns:wsu="
> >
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "
> > soap:mustUnderstand="1"><wsse:UsernameToken
> > wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Passw
> > ord
> > Type="
> > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token
> > -profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken></S
> > ecurity></soap:Header><soap:Body><GetMetadata
> > xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> > Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
> >
> >
> > Same code in CXF 3.0.2, I don't see UsernameToken is added in request.
> > The following is the request coming from client based on CXF 3.0.2
> >
> > <soap:Envelope
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><i
> > nternational
> > xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></inte
> > rnational><RequestContext
> > xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="
> > http://www.w3.org/2005/08/addressing">
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><MessageI
> > D<
> > http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMe
> > ssageID>
> > xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-43
> > af-8193-0fe94fafc412</MessageID><To
> > xmlns="http://www.w3.org/2005/08/addressing">
> > https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> > https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo>
> > xmlns="http://www.w3.org/2005/08/addressing"><Address>
> > http://www.w3.org/2005/08/addressing/anonymous
> > </Address></ReplyTo></soap:Header><soap:Body><GetMetadata<
> > http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/ReplyT
> > o%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata>
> > xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> > Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
> >
> >
> > What I am missing? Could you help?
> >
> > Regards
> > Raman
> >
> >
>
>
> --
> Colm O hEigeartaigh
>
> Talend Community Coder
> http://coders.talend.com
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
RE: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Posted by "Malisetti, Ramanjaneyulu" <Ra...@ca.com>.
What is the sample/test available in CXF I can use to verify problem outside of my program?
Regards
Raman
-----Original Message-----
From: Colm O hEigeartaigh [mailto:coheigea@apache.org]
Sent: Monday, November 03, 2014 4:41 PM
To: users@cxf.apache.org
Subject: Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
I'd really need to see a test-case. Dispatch + WS-Security is working fine with CXF 3.0.x, but maybe there is an issue with the metadata call.
Colm.
On Mon, Nov 3, 2014 at 11:03 AM, Malisetti, Ramanjaneyulu < Ramanjaneyulu.Malisetti@ca.com> wrote:
> Hi,
> I am keep debugging but not getting clue about issue.
> Could you give me any hint?. How can I trace where these header
> elements are dropped? Basically, my client code is adding username
> and password like below.
>
>
> dispatch.getRequestContext().put("ws-security.username", "cat");
> dispatch.getRequestContext().put("ws-security.password", "cat");
>
> Regards
> Raman
>
> From: Malisetti, Ramanjaneyulu
> Sent: Saturday, October 25, 2014 9:24 AM
> To: users@cxf.apache.org
> Subject: wsse:UsernameToken in request header - change from 2.7.1 to
> 3.0.2
>
> Hi,
>
> Our web services client code which used to work in CXF 2.7.1 is not
> working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>.
> Before making request we add following map to the
> dispatch.getRequestContext(), it is basically builds UserNameToken in
> webservice request
>
> {ws-security.username=cat,
> ws-security.encryption.properties={org.apache.ws.security.crypto.merli
> n.keystore.password=default,
> org.apache.ws.security.crypto.merlin.keystore.type=JKS,
> org.apache.ws.security.crypto.merlin.file=/C:/ default-truststore.jks,
> org.apache.ws.security.crypto.provider=org.apache.ws.security.componen
> ts.crypto.Merlin},
> ws-security.password=cat,
> ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallback
> Handler@2cc782
> <mailto:ws-security.callback-handler
> =com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782>}
>
> When I trace request with CXF 2.7.1, it shows like below ..
>
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><i
> nternational
> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></inte
> rnational><RequestContext
> xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action xmlns="
> http://www.w3.org/2005/08/addressing">
> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><MessageI
> D<
> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMe
> ssageID>
> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-41
> 7c-b13b-95b817218194</MessageID><To
> xmlns="http://www.w3.org/2005/08/addressing">
> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo>
> xmlns="http://www.w3.org/2005/08/addressing"><Address>
> http://www.w3.org/2005/08/addressing/anonymous
> </Address></ReplyTo><Security<
> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/ReplyT
> o%3e%3cSecurity>
> xmlns="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> soap:mustUnderstand="1"><wsse:UsernameToken
> wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Passw
> ord
> Type="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token
> -profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken></S
> ecurity></soap:Header><soap:Body><GetMetadata
> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
>
>
> Same code in CXF 3.0.2, I don't see UsernameToken is added in request.
> The following is the request coming from client based on CXF 3.0.2
>
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><i
> nternational
> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></inte
> rnational><RequestContext
> xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="
> http://www.w3.org/2005/08/addressing">
> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><MessageI
> D<
> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMe
> ssageID>
> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-43
> af-8193-0fe94fafc412</MessageID><To
> xmlns="http://www.w3.org/2005/08/addressing">
> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo>
> xmlns="http://www.w3.org/2005/08/addressing"><Address>
> http://www.w3.org/2005/08/addressing/anonymous
> </Address></ReplyTo></soap:Header><soap:Body><GetMetadata<
> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/ReplyT
> o%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata>
> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
>
>
> What I am missing? Could you help?
>
> Regards
> Raman
>
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
Re: dispatch.getRequestContext() - change from 2.7.1 to 3.0.2
Posted by Colm O hEigeartaigh <co...@apache.org>.
I'd really need to see a test-case. Dispatch + WS-Security is working fine
with CXF 3.0.x, but maybe there is an issue with the metadata call.
Colm.
On Mon, Nov 3, 2014 at 11:03 AM, Malisetti, Ramanjaneyulu <
Ramanjaneyulu.Malisetti@ca.com> wrote:
> Hi,
> I am keep debugging but not getting clue about issue. Could
> you give me any hint?. How can I trace where these header elements are
> dropped? Basically, my client code is adding username and password like
> below.
>
>
> dispatch.getRequestContext().put("ws-security.username", "cat");
> dispatch.getRequestContext().put("ws-security.password", "cat");
>
> Regards
> Raman
>
> From: Malisetti, Ramanjaneyulu
> Sent: Saturday, October 25, 2014 9:24 AM
> To: users@cxf.apache.org
> Subject: wsse:UsernameToken in request header - change from 2.7.1 to 3.0.2
>
> Hi,
>
> Our web services client code which used to work in CXF 2.7.1 is not
> working with CXF 3.0.2. Our client is based on Dispatch<DOMSource>.
> Before making request we add following map to the
> dispatch.getRequestContext(), it is basically builds UserNameToken in
> webservice request
>
> {ws-security.username=cat,
> ws-security.encryption.properties={org.apache.ws.security.crypto.merlin.keystore.password=default,
> org.apache.ws.security.crypto.merlin.keystore.type=JKS,
> org.apache.ws.security.crypto.merlin.file=/C:/ default-truststore.jks,
> org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin},
> ws-security.password=cat,
> ws-security.callback-handler=com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782
> <mailto:ws-security.callback-handler
> =com.ca.ucf.security.impl.PasswordCallbackHandler@2cc782>}
>
> When I trace request with CXF 2.7.1, it shows like below ..
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><international
> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></international><RequestContext
> xmlns="http://ns.ca.com/catalyst/node"></RequestContext><Action xmlns="
> http://www.w3.org/2005/08/addressing">
> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><MessageID<
> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMessageID>
> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:f4d09ed5-390a-417c-b13b-95b817218194</MessageID><To
> xmlns="http://www.w3.org/2005/08/addressing">
> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo>
> xmlns="http://www.w3.org/2005/08/addressing"><Address>
> http://www.w3.org/2005/08/addressing/anonymous
> </Address></ReplyTo><Security<
> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/ReplyTo%3e%3cSecurity>
> xmlns="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
> soap:mustUnderstand="1"><wsse:UsernameToken
> wsu:Id="UsernameToken-1"><wsse:Username>cat</wsse:Username><wsse:Password
> Type="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">cat</wsse:Password></wsse:UsernameToken></Security></soap:Header><soap:Body><GetMetadata
> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> Type="SCHEMA"></Dialect></GetMetadata></soap:Body></soap:Envelope>
>
>
> Same code in CXF 3.0.2, I don't see UsernameToken is added in request.
> The following is the request coming from client based on CXF 3.0.2
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><international
> xmlns="http://www.w3.org/2005/09/ws-i18n"><locale>en_US</locale></international><RequestContext
> xmlns="http://ns.ca.com/catalyst/node"/><Action xmlns="
> http://www.w3.org/2005/08/addressing">
> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request</Action><MessageID<
> http://www.w3.org/2010/08/ws-mex/GetMetadata/Request%3c/Action%3e%3cMessageID>
> xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:d133fc8e-1eaa-43af-8193-0fe94fafc412</MessageID><To
> xmlns="http://www.w3.org/2005/08/addressing">
> https://hostA:9443/node/wsman/DummyModuleInstance</To><ReplyTo<
> https://hostA:9443/node/wsman/DummyModuleInstance%3c/To%3e%3cReplyTo>
> xmlns="http://www.w3.org/2005/08/addressing"><Address>
> http://www.w3.org/2005/08/addressing/anonymous
> </Address></ReplyTo></soap:Header><soap:Body><GetMetadata<
> http://www.w3.org/2005/08/addressing/anonymous%3c/Address%3e%3c/ReplyTo%3e%3c/soap:Header%3e%3csoap:Body%3e%3cGetMetadata>
> xmlns="http://www.w3.org/2010/08/ws-mex"><Dialect
> Type="SCHEMA"/></GetMetadata></soap:Body></soap:Envelope>
>
>
> What I am missing? Could you help?
>
> Regards
> Raman
>
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com