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