Hi,

Could you please help us with the below mail. We are trying to evaluate STS 
with CXF and facing problem. I have used the same server given in CXF sample. 
Please find the attached code.
We are revamping our entire stack to use CXF and this issue is hindering us 
from implementing WS-Trust with CXF, one of the important features for clients. 

Thanks,
Renu


-----Original Message-----
From: Mishra, Praveen 
Sent: Tuesday, February 11, 2014 11:01 PM
To: [email protected]; [email protected]
Cc: Gupta, Renu
Subject: FW: WELCOME to [email protected]


Hi,

We are using STS sample to evaluate how we can use the dispatch API to achieve 
WS-trust support in CXF and facing problem in setting the effective policy.
 The stsclient properties and request context properties as follows:

Policy wsaPolicy = PolicyHelper.parsePolicy(client, "/wsa-policy.xml"); 
dispatch.getRequestContext().put(CLIENT_ADDRESSING_PROPERTIES,createMaps());
dispatch.getRequestContext().put(PolicyConstants.POLICY_OVERRIDE, wsaPolicy); 
Map<String,Object> stsmap = setSTSMaps(); 
client.getRequestContext().putAll(stsmap);
STSClient sts = new STSClient(client.getBus()); sts.setServiceQName(new 
QName("http://docs.oasis-open.org/ws-sx/ws-trust/200512/","SecurityTokenService";));
sts.setEndpointName("{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}UT_Port";);
client.getRequestContext().put("ws-security.sts.client", sts ); Map<String, 
Object> stsprop = new HashMap<String, Object>() ; 
stsprop.put("ws-security.username","alice");
stsprop.put("ws-security.callback-handler","ClientCallbackHandler");
stsprop.put("ws-security.encryption.properties","clientKeystore.properties");
stsprop.put("ws-security.encryption.username","mystskey");
stsprop.put("ws-security.sts.token.username","myclientkey");
stsprop.put("ws-security.sts.token.properties","clientKeystore.properties");
stsprop.put("ws-security.sts.token.usecert","true");
sts.getProperties().putAll(stsprop);

We are trying to evaluate the Apache CXf STS Sample comes with Sample examples. 
We are trying to setup Dynamically through properties.

Please let us know what are the required properties needs to be set. Or if we 
are missing anything above. 

                
Thanks,
Praveen

Reply via email to