You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by jeffc <je...@bcbsil.com> on 2014/04/30 05:30:57 UTC

PolicyException when using BST with custom ValueType

I have my client and and service working without issue for Username tokens
use case and return SAML token from STS.  But when I change my configuration
so that the STS accepts Binary Security Token of a custom value type, I am
getting the error: policy alternatives can not be satisfied SupportingTokens

The BST is of a custom value type since it holds an SMSESSION token
(Siteminder token) and the STS we are using (Layer 7) will validate the
SMSESSION and then return a SAML 2 token.  Now the STSClient does call the
STS and it processes the request and returns the SAML 2 token in the
response as expected.   But it throws this exception before calling service.

I believe this has something to do with this warning I see in logs:

org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl.handleNoRegisteredBuilder(AssertionBuilderRegistryImpl.java:109)
 WARN  : No assertion builder for type
{http://schemas.hcsc.com/ws/securitypolicy}SmSessionToken registered.

ERROR:

WARN  : Interceptor for
{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService#{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Issue
has thrown exception, unwinding now
org.apache.cxf.ws.policy.PolicyException: These policy alternatives can not
be satisfied: 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
	at
org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(AssertionInfoMap.java:179)
	at
org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(PolicyVerificationInInterceptor.java:101)
	at
org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:44)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:835)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1606)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1502)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
	at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
	at
org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:759)

The supporting token in STS WSDL is defined as:

    <wsp:Policy wsu:Id="BST_Policy">
        <sp:SupportingTokens
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
            <wsp:Policy>
                <hcsc:SmSessionToken
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient"
xmlns:hcsc="http://schemas.hcsc.com/ws/securitypolicy"/>
            </wsp:Policy>
        </sp:SupportingTokens>
    </wsp:Policy>

This is what the incoming ws-trust message to STS looks like:

2014-04-29 22:18:25,603 [WebContainer : 1]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.BareOutInterceptor@1acf0376
2014-04-29 22:18:25,603 [WebContainer : 1]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor@58abd51a
2014-04-29 22:18:25,603 [WebContainer : 1]
org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor.handle(PolicyVerificationOutInterceptor.java:72)
 DEBUG : An exception was thrown when verifying that the effective policy
for this request was satisfied.  However, this exception will not result in
a fault.  The exception raised is: org.apache.cxf.ws.policy.PolicyException:
These policy alternatives can not be satisfied: 
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
2014-04-29 22:18:25,613 [WebContainer : 1]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor@c88f07ad
2014-04-29 22:18:25,613 [WebContainer : 1]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.StaxOutEndingInterceptor@9e81798
2014-04-29 22:18:25,613 [WebContainer : 1]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@a1c14891
2014-04-29 22:18:25,613 [WebContainer : 1]
org.apache.cxf.interceptor.AbstractLoggingInterceptor.log(AbstractLoggingInterceptor.java:234)
 INFO  : Outbound Message

---------------------------
ID: 1
Address: http://mysts.dev.mycompany.com:8080/eaa_sts
Encoding: UTF-8
Http-Method: POST
Content-Type: application/soap+xml;
action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue"
Headers: {Accept=[*/*]}
Payload: 
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<wsse:Security soap:mustUnderstand="true"
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
<wsse:BinarySecurityToken
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://schemas.hcsc.com/ws/securitypolicy/token-profile#SMSESSION"
wsu:Id="SecurityToken">YwjtLDRg...</wsse:BinarySecurityToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<wst:RequestSecurityToken
xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
<wst:SecondaryParameters>
<t:TokenType
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">urn:oasis:names:tc:SAML:2.0:assertion</t:TokenType>
<t:KeyType
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
</wst:SecondaryParameters>
<wst:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</wst:RequestType>
<wsp:AppliesTo xmlns:wsp="http://www.w3.org/ns/ws-policy">
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost:9084/myapp/services/AccountMaintenance</wsa:Address>
</wsa:EndpointReference>
</wsp:AppliesTo>
<wst:Renewing Allow="false"/>
</wst:RequestSecurityToken>
</soap:Body>
</soap:Envelope>
--------------------------------------



--
View this message in context: http://cxf.547215.n5.nabble.com/PolicyException-when-using-BST-with-custom-ValueType-tp5743444.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: PolicyException when using BST with custom ValueType

Posted by jeffc <je...@bcbsil.com>.
The AssertionBuilder:

package com.hcsc.security.sts;

import org.apache.cxf.ws.security.policy.SP11Constants;
import org.apache.neethi.Assertion;
import org.apache.neethi.AssertionBuilderFactory;
import org.apache.neethi.PolicyBuilder;
import org.apache.neethi.builders.AssertionBuilder;
import org.w3c.dom.Element;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.xml.namespace.QName;

public class SmSessionBuilder implements AssertionBuilder<Element> {
    // class level logger
    private static final Logger logger =
LoggerFactory.getLogger(SmSessionBuilder.class);

    PolicyBuilder builder;

    public SmSessionBuilder(PolicyBuilder b) {
        builder = b;
    }

    public SmSessionBuilder() {
    }

    public Assertion build(Element element, AssertionBuilderFactory factory)
throws IllegalArgumentException {
        // method's name
        String methodName = "build()";
        // return object
        SmSessionToken smSessionToken;

        logger.info(methodName + ": entered.");

        logger.debug(methodName + ": element: [" + element + "]");

        String nsUri = element.getNamespaceURI();

        logger.debug(methodName + ": nsUri: [" + nsUri + "]");

        smSessionToken = new SmSessionToken(SP11Constants.INSTANCE);

        logger.info(methodName + ": exiting...");

        return smSessionToken;
    }

    public QName[] getKnownElements() {
        return new QName[]{Constants.QN_SMSESSION_TOKEN};
    }
}




--
View this message in context: http://cxf.547215.n5.nabble.com/PolicyException-when-using-BST-with-custom-ValueType-tp5743444p5743550.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: PolicyException when using BST with custom ValueType

Posted by Colm O hEigeartaigh <co...@apache.org>.
Ok, what you have done sounds about right. As the SiteMinder token thing is
not standard, CXF will not parse that policy and hence policy validation
fails.

Colm.


On Wed, Apr 30, 2014 at 11:05 PM, jeffc <je...@bcbsil.com> wrote:

> Lastly the Policy Interceptor:
>
> It is this class I least understand all of what it is doing.
> The  WSSecSmSessionToken which extends WSSecBase actually build the BST
> token and puts the Siteminder session token in it and then adds it to
> security header.
>
> package com.hcsc.security.sts;
>
> import org.apache.cxf.binding.soap.SoapMessage;
> import org.apache.cxf.headers.Header;
> import org.apache.cxf.helpers.CastUtils;
> import org.apache.cxf.helpers.DOMUtils;
> import org.apache.cxf.helpers.XMLUtils;
> import org.apache.cxf.interceptor.Fault;
> import org.apache.cxf.interceptor.security.DefaultSecurityContext;
> import org.apache.cxf.security.SecurityContext;
> import org.apache.cxf.transport.http.AbstractHTTPDestination;
> import org.apache.cxf.ws.policy.AssertionInfo;
> import org.apache.cxf.ws.policy.AssertionInfoMap;
> import org.apache.cxf.ws.security.policy.SP12Constants;
> import org.apache.cxf.ws.security.wss4j.AbstractTokenInterceptor;
> import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
> import org.apache.ws.security.WSConstants;
> import org.apache.ws.security.WSSConfig;
> import org.apache.ws.security.WSSecurityEngineResult;
> import org.apache.ws.security.WSSecurityException;
> import org.apache.ws.security.handler.WSHandlerConstants;
> import org.apache.ws.security.handler.WSHandlerResult;
> import org.springframework.context.support.ClassPathXmlApplicationContext;
> import org.w3c.dom.Element;
> import javax.security.auth.Subject;
> import javax.servlet.http.Cookie;
> import javax.servlet.http.HttpServletRequest;
> import java.security.Principal;
> import java.util.ArrayList;
> import java.util.Collection;
> import java.util.List;
> import org.slf4j.Logger;
> import org.slf4j.LoggerFactory;
>
>
> public class SmSessionAssertionInterceptor extends AbstractTokenInterceptor
> {
>     // class level logger
>     private static final Logger logger =
> LoggerFactory.getLogger(SmSessionAssertionInterceptor.class);
>     // spring context
>     ClassPathXmlApplicationContext context;
>     // configuration holder
>     Configuration config;
>
>     public SmSessionAssertionInterceptor() {
>         super();
>         //context = new ClassPathXmlApplicationContext(new
> String[]{"classpath*:applicationContext.xml"});
>
>         //config = (Configuration) context.getBean("configurationManager");
>     }
>
>     protected void processToken(SoapMessage soapMessage) {
>         // method's name
>         String methodName = "processToken()";
>
>         logger.info(methodName + ": entered.");
>
>         Header h = findSecurityHeader(soapMessage, false);
>         if (h == null)
>             return;
>
>         Element el = (Element) h.getObject();
>         Element child = DOMUtils.getFirstElement(el);
>         while (child != null) {
>             if (WSConstants.BINARY_TOKEN_LN.equals(child.getLocalName())
>                     && WSConstants.WSSE_NS.equals(child.getNamespaceURI())
>                     &&
>
> Constants.VALUE_TYPE_SMSESSION.equals(child.getAttribute(Constants.ATTR_NAME_VALUE_TYPE)))
> {
>                 try {
>                     final SmSessionTokenPrincipal princ =
> getPrincipal(child, soapMessage);
>
>                     if (princ != null) {
>                         List<WSSecurityEngineResult> v = new
> ArrayList<WSSecurityEngineResult>();
>
>                         int action = WSConstants.BST;
>
>                         v.add(0, new WSSecurityEngineResult(action, princ,
> null, null, null));
>                         List<WSHandlerResult> results =
> CastUtils.cast((List<?>) soapMessage.get(WSHandlerConstants.RECV_RESULTS));
>
>                         if (results == null) {
>                             results = new ArrayList<WSHandlerResult>();
>
> soapMessage.put(WSHandlerConstants.RECV_RESULTS,
> results);
>                         }
>
>                         WSHandlerResult rResult = new WSHandlerResult(null,
> v);
>                         results.add(0, rResult);
>
>                         assertTokens(soapMessage, princ, false);
>
> soapMessage.put(WSS4JInInterceptor.PRINCIPAL_RESULT,
> princ);
>
>                         SecurityContext sc =
> soapMessage.get(SecurityContext.class);
>
>                         if (sc == null || sc.getUserPrincipal() == null) {
>                             Subject subject =
> createSubject(princ.getName());
>                             soapMessage.put(SecurityContext.class,
> createSecurityContext(princ, subject));
>                         }
>                     }
>                 }
>                 catch (WSSecurityException ex) {
>                     throw new Fault(ex);
>                 }
>             }
>             child = DOMUtils.getNextElement(child);
>         }
>
>         logger.info(methodName + ": exiting...");
>     }
>
>     protected void addToken(SoapMessage soapMessage) {
>         // method's name
>         String methodName = "addToken()";
>
>         logger.info(methodName + ": entered.");
>
>         SmSessionToken token = assertTokens(soapMessage);
>         logger.debug(methodName + ": token: [" + token + "]");
>
>         Header h = findSecurityHeader(soapMessage, true);
>         logger.debug(methodName + ": h: [" + h + "]");
>
>         WSSecSmSessionToken builder = addSmSessionToken(soapMessage,
> token);
>         logger.debug(methodName + ": builder: [" + builder + "]");
>
>         if (builder == null) {
>             AssertionInfoMap aim = soapMessage.get(AssertionInfoMap.class);
>             logger.debug(methodName + ": aim: [" + aim + "]");
>             Collection<AssertionInfo> ais =
> aim.getAssertionInfo(Constants.QN_SMSESSION_TOKEN);
>             logger.debug(methodName + ": ais: [" + ais + "]");
>
>             for (AssertionInfo ai : ais)
>                 if (ai.isAsserted())
>                     ai.setAsserted(false);
>
>             return;
>         }
>
>         Element el = (Element) h.getObject();
>         builder.prepare(el.getOwnerDocument());
>         el.appendChild(builder.getSmSessionTokenElement());
>
>         logger.info(methodName + ": exiting...");
>     }
>
>     protected WSSecSmSessionToken addSmSessionToken(SoapMessage message,
> SmSessionToken token) {
>         // method's name
>         String methodName = "addSmSessionToken()";
>
>         logger.info(methodName + ": entered.");
>
>         String smSession =
>
> "qau2xn3J4MRjG4kKVokU7In/410XJu5hS8aGPihhsAfKCVzhi/NTmG8lKMsXLBSVEsoMRBLexwSWUjT/eEFXXuk5xFPEKDAFu/uwKfwo+Ila2CydzdCppYRLE8nYUKnw9rq0KiwPWohJBkUH0asMCBrRueICl5ue3VeZA/L9MAhtX6cNbH20aNtlmqIT8E5ERIp+GxKVi60Bx4jI5DS4/znLvGOC1MYJy8n9eeK4Ddlm2qFaUuyrHFL5fcFFm1x4o1hDP3OvoUQ8aeFnTJuyQ8w0RjTjlrWA3MdSPeBQmxh2pYC4CmmyW7DtmgyrNMbPNs2Pn+YHQ2qYXMyFdxGqIenmXepFkmyqTobJ451krYRVprbUdMOi9J1spPhzpo9iApY1zgPtVOMmjGzYZkv2Vyfuo016ACNkc+TrWiyoOCjljLjMpvDRrBGG3balG7xhWV0hfaBSmrMSzn/OfFn2NG+8sCGMvHqmpuPlzq5Y0AEM+z21r7hEDTqRl8GZS1ksLsrz1D3qAN5Bl4q1fd/lKNUr4KnwCtgVuOYfhnNA/NcjboLLOPzSUPqHgkdavILA2RtXkr/Uqc7L2FEe4zfaFQfcZKsE5jB8xN86gQ4g2DRsptFR7Xmqzyqmb9Cfebj8zPfEziMdU5q+5g1E9Lv7p+pQCoHHVY5Yulb9A0/T6oj65k4JvSXNz74BzIIjVXwGXLzbS5HuEalgJNkYnbm7RdIm6zLgafSXvjripuQ6fG4ED96nYuPirn8RqQyDohLECXvEnM8ODT8D3yc/emJedvlQ88kvxZ22uS9UbSKhNqueUYOr0tyHkx0uVoCb8YcgbQMXNhUBsLvPO8jLPN0wHgxh8lCljlAeyc1wrnvARcfCaZFtmIRCz28U89ndmEdhmcJTQy2GQvwFKOHWNDKteRdPp4xn9lc5";
>
>         WSSConfig wssConfig = (WSSConfig)
> message.getContextualProperty(WSSConfig.class.getName());
>         if (wssConfig == null) {
>             wssConfig = WSSConfig.getNewInstance();
>         }
>
>         WSSecSmSessionToken builder = new WSSecSmSessionToken(wssConfig);
>
>         builder.setTokenValue(smSession);
>
>         logger.info(methodName + ": exiting...");
>
>         return builder;
>     }
>
>
>     protected SmSessionToken assertTokens(SoapMessage soapMessage) {
>         // method's name
>         String methodName = "assertTokens()";
>         // return object
>         SmSessionToken smSessionToken = null;
>
>         logger.info(methodName + ": entered.");
>
>         try {
>             smSessionToken = (SmSessionToken) assertTokens(soapMessage,
> Constants.QN_SMSESSION_TOKEN, true);
>         }
>         catch (Exception e) {
>             logger.error(methodName + ": exception caught: " +
> e.getMessage());
>         }
>         finally {
>             logger.debug(methodName + ": exiting...");
>         }
>
>         return smSessionToken;
>     }
>
>     protected SmSessionTokenPrincipal getPrincipal(Element tokenElement,
> final SoapMessage message) throws WSSecurityException {
>         // method's name
>         String methodName = "getPrincipal()";
>         // return object
>         SmSessionTokenPrincipal principal;
>
>         logger.info(methodName + ": entered.");
>
>         String smSession = null;
>
>         logger.debug(methodName + ": tokenElement: [" +
> XMLUtils.toString(tokenElement) + "]");
>
>         String valueType =
> tokenElement.getAttribute(Constants.ATTR_NAME_VALUE_TYPE);
>         logger.debug(methodName + ": valueType: [" + valueType + "]");
>
>         if (valueType != null &&
> valueType.equals(Constants.VALUE_TYPE_SMSESSION))
>             smSession = tokenElement.getTextContent();
>
>         logger.debug(methodName + ": smSession: [" + smSession + "]");
>
>         try {
>             boolean isValidEcho = true;
>
>             if (!isValidEcho)
>                 throw new WSSecurityException("SMSESSION validation
> failed...");
>
>             principal = new SmSessionTokenPrincipal("eaa0001");
>         }
>         catch (Exception e) {
>             logger.error(methodName + ": exception caught: " +
> e.getMessage());
>             throw new WSSecurityException(e.getMessage(), e);
>         }
>         finally {
>             logger.debug(methodName + ": exiting...");
>         }
>
>         return principal;
>     }
>
>     private SmSessionToken assertTokens(SoapMessage message,
> SmSessionTokenPrincipal princ, boolean signed) {
>         // method's name
>         String methodName = "assertTokens()";
>
>         logger.info(methodName + ": entered.");
>
>         AssertionInfoMap aim = message.get(AssertionInfoMap.class);
>         Collection<AssertionInfo> ais =
> aim.getAssertionInfo(Constants.QN_SMSESSION_TOKEN);
>
>         SmSessionToken token = null;
>         for (AssertionInfo ai : ais) {
>             token = (SmSessionToken) ai.getAssertion();
>             ai.setAsserted(true);
>         }
>
>         ais = aim.getAssertionInfo(SP12Constants.SUPPORTING_TOKENS);
>         for (AssertionInfo ai : ais) {
>             ai.setAsserted(true); // this flag determines the assertion
> result
>         }
>
>         if (signed || isTLSInUse(message)) {
>             ais =
> aim.getAssertionInfo(SP12Constants.SIGNED_SUPPORTING_TOKENS);
>             for (AssertionInfo ai : ais) {
>                 ai.setAsserted(true);
>             }
>         }
>
>         logger.info(methodName + ": exiting...");
>
>         return token;
>     }
>
>     protected Subject createSubject(String name) throws SecurityException {
>         return null;
>     }
>
>     protected SecurityContext createSecurityContext(final Principal p,
> Subject subject) {
>         return new DefaultSecurityContext(p, subject);
>     }
> }
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/PolicyException-when-using-BST-with-custom-ValueType-tp5743444p5743552.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: PolicyException when using BST with custom ValueType

Posted by jeffc <je...@bcbsil.com>.
Lastly the Policy Interceptor:

It is this class I least understand all of what it is doing.  
The  WSSecSmSessionToken which extends WSSecBase actually build the BST
token and puts the Siteminder session token in it and then adds it to
security header.

package com.hcsc.security.sts;

import org.apache.cxf.binding.soap.SoapMessage;
import org.apache.cxf.headers.Header;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.helpers.DOMUtils;
import org.apache.cxf.helpers.XMLUtils;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.interceptor.security.DefaultSecurityContext;
import org.apache.cxf.security.SecurityContext;
import org.apache.cxf.transport.http.AbstractHTTPDestination;
import org.apache.cxf.ws.policy.AssertionInfo;
import org.apache.cxf.ws.policy.AssertionInfoMap;
import org.apache.cxf.ws.security.policy.SP12Constants;
import org.apache.cxf.ws.security.wss4j.AbstractTokenInterceptor;
import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
import org.apache.ws.security.WSConstants;
import org.apache.ws.security.WSSConfig;
import org.apache.ws.security.WSSecurityEngineResult;
import org.apache.ws.security.WSSecurityException;
import org.apache.ws.security.handler.WSHandlerConstants;
import org.apache.ws.security.handler.WSHandlerResult;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.w3c.dom.Element;
import javax.security.auth.Subject;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import java.security.Principal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class SmSessionAssertionInterceptor extends AbstractTokenInterceptor
{
    // class level logger
    private static final Logger logger =
LoggerFactory.getLogger(SmSessionAssertionInterceptor.class);
    // spring context
    ClassPathXmlApplicationContext context;
    // configuration holder
    Configuration config;

    public SmSessionAssertionInterceptor() {
        super();
        //context = new ClassPathXmlApplicationContext(new
String[]{"classpath*:applicationContext.xml"});

        //config = (Configuration) context.getBean("configurationManager");
    }

    protected void processToken(SoapMessage soapMessage) {
        // method's name
        String methodName = "processToken()";

        logger.info(methodName + ": entered.");

        Header h = findSecurityHeader(soapMessage, false);
        if (h == null)
            return;

        Element el = (Element) h.getObject();
        Element child = DOMUtils.getFirstElement(el);
        while (child != null) {
            if (WSConstants.BINARY_TOKEN_LN.equals(child.getLocalName())
                    && WSConstants.WSSE_NS.equals(child.getNamespaceURI())
                    &&
Constants.VALUE_TYPE_SMSESSION.equals(child.getAttribute(Constants.ATTR_NAME_VALUE_TYPE)))
{
                try {
                    final SmSessionTokenPrincipal princ =
getPrincipal(child, soapMessage);

                    if (princ != null) {
                        List<WSSecurityEngineResult> v = new
ArrayList<WSSecurityEngineResult>();

                        int action = WSConstants.BST;

                        v.add(0, new WSSecurityEngineResult(action, princ,
null, null, null));
                        List<WSHandlerResult> results =
CastUtils.cast((List<?>) soapMessage.get(WSHandlerConstants.RECV_RESULTS));

                        if (results == null) {
                            results = new ArrayList<WSHandlerResult>();
                            soapMessage.put(WSHandlerConstants.RECV_RESULTS,
results);
                        }

                        WSHandlerResult rResult = new WSHandlerResult(null,
v);
                        results.add(0, rResult);

                        assertTokens(soapMessage, princ, false);
                        soapMessage.put(WSS4JInInterceptor.PRINCIPAL_RESULT,
princ);

                        SecurityContext sc =
soapMessage.get(SecurityContext.class);

                        if (sc == null || sc.getUserPrincipal() == null) {
                            Subject subject =
createSubject(princ.getName());
                            soapMessage.put(SecurityContext.class,
createSecurityContext(princ, subject));
                        }
                    }
                }
                catch (WSSecurityException ex) {
                    throw new Fault(ex);
                }
            }
            child = DOMUtils.getNextElement(child);
        }

        logger.info(methodName + ": exiting...");
    }

    protected void addToken(SoapMessage soapMessage) {
        // method's name
        String methodName = "addToken()";

        logger.info(methodName + ": entered.");

        SmSessionToken token = assertTokens(soapMessage);
        logger.debug(methodName + ": token: [" + token + "]");

        Header h = findSecurityHeader(soapMessage, true);
        logger.debug(methodName + ": h: [" + h + "]");

        WSSecSmSessionToken builder = addSmSessionToken(soapMessage, token);
        logger.debug(methodName + ": builder: [" + builder + "]");

        if (builder == null) {
            AssertionInfoMap aim = soapMessage.get(AssertionInfoMap.class);
            logger.debug(methodName + ": aim: [" + aim + "]");
            Collection<AssertionInfo> ais =
aim.getAssertionInfo(Constants.QN_SMSESSION_TOKEN);
            logger.debug(methodName + ": ais: [" + ais + "]");

            for (AssertionInfo ai : ais)
                if (ai.isAsserted())
                    ai.setAsserted(false);

            return;
        }

        Element el = (Element) h.getObject();
        builder.prepare(el.getOwnerDocument());
        el.appendChild(builder.getSmSessionTokenElement());

        logger.info(methodName + ": exiting...");
    }

    protected WSSecSmSessionToken addSmSessionToken(SoapMessage message,
SmSessionToken token) {
        // method's name
        String methodName = "addSmSessionToken()";

        logger.info(methodName + ": entered.");

        String smSession =
"qau2xn3J4MRjG4kKVokU7In/410XJu5hS8aGPihhsAfKCVzhi/NTmG8lKMsXLBSVEsoMRBLexwSWUjT/eEFXXuk5xFPEKDAFu/uwKfwo+Ila2CydzdCppYRLE8nYUKnw9rq0KiwPWohJBkUH0asMCBrRueICl5ue3VeZA/L9MAhtX6cNbH20aNtlmqIT8E5ERIp+GxKVi60Bx4jI5DS4/znLvGOC1MYJy8n9eeK4Ddlm2qFaUuyrHFL5fcFFm1x4o1hDP3OvoUQ8aeFnTJuyQ8w0RjTjlrWA3MdSPeBQmxh2pYC4CmmyW7DtmgyrNMbPNs2Pn+YHQ2qYXMyFdxGqIenmXepFkmyqTobJ451krYRVprbUdMOi9J1spPhzpo9iApY1zgPtVOMmjGzYZkv2Vyfuo016ACNkc+TrWiyoOCjljLjMpvDRrBGG3balG7xhWV0hfaBSmrMSzn/OfFn2NG+8sCGMvHqmpuPlzq5Y0AEM+z21r7hEDTqRl8GZS1ksLsrz1D3qAN5Bl4q1fd/lKNUr4KnwCtgVuOYfhnNA/NcjboLLOPzSUPqHgkdavILA2RtXkr/Uqc7L2FEe4zfaFQfcZKsE5jB8xN86gQ4g2DRsptFR7Xmqzyqmb9Cfebj8zPfEziMdU5q+5g1E9Lv7p+pQCoHHVY5Yulb9A0/T6oj65k4JvSXNz74BzIIjVXwGXLzbS5HuEalgJNkYnbm7RdIm6zLgafSXvjripuQ6fG4ED96nYuPirn8RqQyDohLECXvEnM8ODT8D3yc/emJedvlQ88kvxZ22uS9UbSKhNqueUYOr0tyHkx0uVoCb8YcgbQMXNhUBsLvPO8jLPN0wHgxh8lCljlAeyc1wrnvARcfCaZFtmIRCz28U89ndmEdhmcJTQy2GQvwFKOHWNDKteRdPp4xn9lc5";

        WSSConfig wssConfig = (WSSConfig)
message.getContextualProperty(WSSConfig.class.getName());
        if (wssConfig == null) {
            wssConfig = WSSConfig.getNewInstance();
        }

        WSSecSmSessionToken builder = new WSSecSmSessionToken(wssConfig);

        builder.setTokenValue(smSession);

        logger.info(methodName + ": exiting...");

        return builder;
    }


    protected SmSessionToken assertTokens(SoapMessage soapMessage) {
        // method's name
        String methodName = "assertTokens()";
        // return object
        SmSessionToken smSessionToken = null;

        logger.info(methodName + ": entered.");

        try {
            smSessionToken = (SmSessionToken) assertTokens(soapMessage,
Constants.QN_SMSESSION_TOKEN, true);
        }
        catch (Exception e) {
            logger.error(methodName + ": exception caught: " +
e.getMessage());
        }
        finally {
            logger.debug(methodName + ": exiting...");
        }

        return smSessionToken;
    }

    protected SmSessionTokenPrincipal getPrincipal(Element tokenElement,
final SoapMessage message) throws WSSecurityException {
        // method's name
        String methodName = "getPrincipal()";
        // return object
        SmSessionTokenPrincipal principal;

        logger.info(methodName + ": entered.");

        String smSession = null;

        logger.debug(methodName + ": tokenElement: [" +
XMLUtils.toString(tokenElement) + "]");

        String valueType =
tokenElement.getAttribute(Constants.ATTR_NAME_VALUE_TYPE);
        logger.debug(methodName + ": valueType: [" + valueType + "]");

        if (valueType != null &&
valueType.equals(Constants.VALUE_TYPE_SMSESSION))
            smSession = tokenElement.getTextContent();

        logger.debug(methodName + ": smSession: [" + smSession + "]");

        try {
            boolean isValidEcho = true;

            if (!isValidEcho)
                throw new WSSecurityException("SMSESSION validation
failed...");

            principal = new SmSessionTokenPrincipal("eaa0001");
        }
        catch (Exception e) {
            logger.error(methodName + ": exception caught: " +
e.getMessage());
            throw new WSSecurityException(e.getMessage(), e);
        }
        finally {
            logger.debug(methodName + ": exiting...");
        }

        return principal;
    }

    private SmSessionToken assertTokens(SoapMessage message,
SmSessionTokenPrincipal princ, boolean signed) {
        // method's name
        String methodName = "assertTokens()";

        logger.info(methodName + ": entered.");

        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        Collection<AssertionInfo> ais =
aim.getAssertionInfo(Constants.QN_SMSESSION_TOKEN);

        SmSessionToken token = null;
        for (AssertionInfo ai : ais) {
            token = (SmSessionToken) ai.getAssertion();
            ai.setAsserted(true);
        }

        ais = aim.getAssertionInfo(SP12Constants.SUPPORTING_TOKENS);
        for (AssertionInfo ai : ais) {
            ai.setAsserted(true); // this flag determines the assertion
result
        }

        if (signed || isTLSInUse(message)) {
            ais =
aim.getAssertionInfo(SP12Constants.SIGNED_SUPPORTING_TOKENS);
            for (AssertionInfo ai : ais) {
                ai.setAsserted(true);
            }
        }

        logger.info(methodName + ": exiting...");

        return token;
    }

    protected Subject createSubject(String name) throws SecurityException {
        return null;
    }

    protected SecurityContext createSecurityContext(final Principal p,
Subject subject) {
        return new DefaultSecurityContext(p, subject);
    }
}




--
View this message in context: http://cxf.547215.n5.nabble.com/PolicyException-when-using-BST-with-custom-ValueType-tp5743444p5743552.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: PolicyException when using BST with custom ValueType

Posted by jeffc <je...@bcbsil.com>.
We are using CXF 2.7.7
The STS we are using is external vendor STS that is NOT based on Apache CXF. 
It supports ws-trust requests and we have the WSDL defined with the
SupportingTokens for the BST SmSession on the STS that the STClient parses
to create effectivePolicy.

It does not seem to be an issue with the ws-trust response.  It seems to
stem from the STSClient processing the supporting token in the ws-trust
request.
What is odd is that it does not throw this exception until after STS
provides a response.  The response itself is a perfectly formatted SAML2
token that will work correctly should the service be called with it, but CXF
throws this unsupported exception and never calls the service.

After finding this CXF doc:
https://cxf.apache.org/docs/developing-assertions.html

And paying attention to that warning of:
No assertion builder for type
{http://schemas.hcsc.com/ws/securitypolicy}SmSessionToken registered

I actually found code a consultant wrote to customize Apache CXF STS when we
had planned on using it as our STS and it actually had these classes the
developing assertions article touched on.  So I ripped these out and
implemented them on my client.  And this certainly seems to have resolved
the issue, but I am unsure what extraneous code is in these classes that
likely is not needed.

Once I added these, here were the logs that illustrate the
SmSessionInterceptor and its associated assertions being triggered by this
SupportingPolicy on the STS.

I added them to client as beans and looks like CXF is just able to pickt
them up:

<bean name="SmSessionTokenBuilder"
class="com.hcsc.security.sts.SmSessionBuilder"/>
<bean name="SmSessionAssertionInterceptor"
class="com.hcsc.security.sts.SmSessionAssertionInterceptor"/>
<bean name="SmSessionAssertionInterceptorProvider"
class="com.hcsc.security.sts.SmSessionAssertionInterceptorProvider"/>

Log (eliminated some stuff for brevity):

2014-04-30 01:17:51,001 [WebContainer : 4]
com.hcsc.security.sts.SmSessionAssertionInterceptorProvider.<clinit>(SmSessionAssertionInterceptorProvider.java:28)
 DEBUG : initialized SmSessionAssertionInterceptorProvider...

2014-04-30 01:22:45,207 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:495)
 DEBUG : Invoke, operation info: [BindingOperationInfo:
{http://example.myapp.hcsc.com/}doubleIt], params: [44]
2014-04-30 01:22:45,207 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setContext(ClientImpl.java:706)
 DEBUG : set requestContext to message
be{org.apache.cxf.jaxws.context.WrappedMessageContext.SCOPES={ws-security.sts.client=APPLICATION,
org.apache.cxf.message.Message.ENDPOINT_ADDRESS=APPLICATION},
ws-security.sts.client=org.apache.cxf.ws.security.trust.STSClient@5a30b0d2,
java.lang.reflect.Method=public abstract int
com.hcsc.myapp.contract.example.AccountMaintenance.doubleIt(int),
org.apache.cxf.message.Message.ENDPOINT_ADDRESS=http://localhost:9084/myapp/services/AccountMaintenance}
2014-04-30 01:22:45,217 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.bus.managers.PhaseManagerImpl.
2014-04-30 01:22:45,217 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:975)
 DEBUG : Interceptors contributed by bus:
[org.apache.cxf.ws.policy.PolicyOutInterceptor@b572ee07,
org.apache.cxf.interceptor.LoggingOutInterceptor@cabd6932]
2014-04-30 01:22:45,217 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:979)
 DEBUG : Interceptors contributed by client: []
2014-04-30 01:22:45,217 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:983)
 DEBUG : Interceptors contributed by endpoint:
[org.apache.cxf.interceptor.MessageSenderInterceptor@bccf64c6,
org.apache.cxf.jaxws.interceptors.SwAOutInterceptor@a00a5998,
org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor@47d9e7d6,
org.apache.cxf.jaxws.interceptors.HolderOutInterceptor@54a0ee59]
2014-04-30 01:22:45,217 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:987)
 DEBUG : Interceptors contributed by binding:
[org.apache.cxf.interceptor.AttachmentOutInterceptor@6a0e3db1,
org.apache.cxf.interceptor.StaxOutInterceptor@8587e669,
org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFilterInterceptor@99a88ba9,
org.apache.cxf.interceptor.WrappedOutInterceptor@605b9cf3,
org.apache.cxf.interceptor.BareOutInterceptor@60931d21,
org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@4245cdb4,
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@6ebb0f5f]
2014-04-30 01:22:45,217 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:993)
 DEBUG : Interceptors contributed by databinding: []
2014-04-30 01:22:45,217 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.policy.PolicyOutInterceptor@b572ee07 to phase setup
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.LoggingOutInterceptor@cabd6932 to phase
pre-stream
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor@bccf64c6 to phase
prepare-send
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.jaxws.interceptors.SwAOutInterceptor@a00a5998 to phase
pre-logical
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor@47d9e7d6 to
phase pre-logical
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.jaxws.interceptors.HolderOutInterceptor@54a0ee59 to phase
pre-logical
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.AttachmentOutInterceptor@6a0e3db1 to phase
pre-stream
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.StaxOutInterceptor@8587e669 to phase pre-stream
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFilterInterceptor@99a88ba9
to phase pre-logical
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.WrappedOutInterceptor@605b9cf3 to phase marshal
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.BareOutInterceptor@60931d21 to phase marshal
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@4245cdb4
to phase post-logical
2014-04-30 01:22:45,227 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@6ebb0f5f to phase
write
2014-04-30 01:22:45,247 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl.
2014-04-30 01:22:45,247 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.policy.PolicyBuilderImpl.
2014-04-30 01:22:45,247 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider.
2014-04-30 01:22:45,247 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider.
2014-04-30 01:22:45,277 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistryImpl.
2014-04-30 01:22:45,297 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader.
2014-04-30 01:22:45,297 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider.
2014-04-30 01:22:45,317 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider.
2014-04-30 01:22:45,317 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider.
2014-04-30 01:22:45,317 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader.
2014-04-30 01:22:45,327 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder.
2014-04-30 01:22:45,327 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder.
2014-04-30 01:22:45,327 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder.
2014-04-30 01:22:45,327 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder.
2014-04-30 01:22:45,327 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder.
2014-04-30 01:22:45,427 [WebContainer : 2]
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:179)
 DEBUG : Could not find a definition for bean with id
{http://example.myapp.hcsc.com/}AccountMaintenancePort.http-conduit - no
injection will be performed.
2014-04-30 01:22:45,427 [WebContainer : 2]
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:179)
 DEBUG : Could not find a definition for bean with id
http://localhost:9084/myapp/services/AccountMaintenance - no injection will
be performed.
2014-04-30 01:22:45,427 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.setTlsClientParameters(HTTPConduit.java:900)
 DEBUG : Conduit
'{http://example.myapp.hcsc.com/}AccountMaintenancePort.http-conduit' has
been (re)configured for plain http.
2014-04-30 01:22:45,427 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.logConfig(HTTPConduit.java:366)
 DEBUG : No Trust Decider configured for Conduit
'{http://example.myapp.hcsc.com/}AccountMaintenancePort.http-conduit'
2014-04-30 01:22:45,427 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.logConfig(HTTPConduit.java:379)
 DEBUG : No Auth Supplier configured for Conduit
'{http://example.myapp.hcsc.com/}AccountMaintenancePort.http-conduit'
2014-04-30 01:22:45,427 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.logConfig(HTTPConduit.java:398)
 DEBUG : Conduit
'{http://example.myapp.hcsc.com/}AccountMaintenancePort.http-conduit' has
been configured for plain http.
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:46)
 DEBUG : registering incoming observer:
org.apache.cxf.endpoint.ClientImpl@f0908022
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:684)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
created. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]

2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.policy.PolicyOutInterceptor@b572ee07
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyUtils.logPolicy(PolicyUtils.java:156)
 TRACE : Using effective policy: 
type: Policy
  type: ExactlyOne
    type: All
      type: Assertion
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
(org.apache.cxf.ws.security.policy.model.SupportingToken@f4fda3e7)
        type: Policy
          type: ExactlyOne
            type: All
              type: Assertion
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken
(org.apache.cxf.ws.security.policy.model.IssuedToken@aa65feb1)

2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.security.policy.interceptors.SecurityVerificationOutInterceptor@f4a95bf2
to phase pre-logical
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]

2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyOutInterceptor.addInterceptors(PolicyOutInterceptor.java:144)
 DEBUG : Added interceptor of type SecurityVerificationOutInterceptor
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor@35cd6fff to
phase pre-protocol
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]

2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyOutInterceptor.addInterceptors(PolicyOutInterceptor.java:144)
 DEBUG : Added interceptor of type PolicyBasedWSS4JOutInterceptor
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor@53710ef2
to phase prepare-send
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]

2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyOutInterceptor.addInterceptors(PolicyOutInterceptor.java:144)
 DEBUG : Added interceptor of type IssuedTokenOutInterceptor
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor@a8617b5d
to phase prepare-send
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyOutInterceptor.addInterceptors(PolicyOutInterceptor.java:144)
 DEBUG : Added interceptor of type IssuedTokenOutInterceptor
2014-04-30 01:22:45,437 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyOutInterceptor.handle(PolicyOutInterceptor.java:134)
 TRACE : Chosen alternative: 
  type: Assertion
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
(org.apache.cxf.ws.security.policy.model.SupportingToken@f4fda3e7)
    type: Policy
      type: ExactlyOne
        type: All
          type: Assertion
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IssuedToken
(org.apache.cxf.ws.security.policy.model.IssuedToken@aa65feb1)

2014-04-30 01:22:45,447 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor@766a8dc6 to phase
post-stream
2014-04-30 01:22:45,447 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]

2014-04-30 01:22:45,447 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.jaxws.interceptors.HolderOutInterceptor@54a0ee59
2014-04-30 01:22:45,447 [WebContainer : 2]
org.apache.cxf.jaxws.interceptors.HolderOutInterceptor.handleMessage(HolderOutInterceptor.java:57)
 DEBUG : op: [OperationInfo: {http://example.myapp.hcsc.com/}doubleIt]
2014-04-30 01:22:45,447 [WebContainer : 2]
org.apache.cxf.jaxws.interceptors.HolderOutInterceptor.handleMessage(HolderOutInterceptor.java:59)
 DEBUG : op.hasOutput(): true
2014-04-30 01:22:45,447 [WebContainer : 2]
org.apache.cxf.jaxws.interceptors.HolderOutInterceptor.handleMessage(HolderOutInterceptor.java:61)
 DEBUG : op.getOutput().size(): 1
2014-04-30 01:22:45,447 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.jaxws.interceptors.SwAOutInterceptor@a00a5998
2014-04-30 01:22:45,457 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor@47d9e7d6
2014-04-30 01:22:45,477 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFilterInterceptor@99a88ba9
2014-04-30 01:22:45,477 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.security.policy.interceptors.SecurityVerificationOutInterceptor@f4a95bf2
2014-04-30 01:22:45,477 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@4245cdb4
2014-04-30 01:22:45,477 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor@bccf64c6
2014-04-30 01:22:45,477 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@6d69fc2
to phase prepare-send-ending
2014-04-30 01:22:45,477 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]

2014-04-30 01:22:45,477 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor@53710ef2
2014-04-30 01:22:45,477 [WebContainer : 2]
org.apache.cxf.resource.DefaultResourceManager.findResource(DefaultResourceManager.java:103)
 DEBUG : resolving resource <cxf-ehcache.xml> type <class java.net.URL>
2014-04-30 01:22:45,517 [WebContainer : 2]
net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:98)
 DEBUG : Configuring ehcache from URL:
wsjar:file:/C:/Program%20Files/IBM/WebSphere/AppServer85/profiles/AppSrv01/installedApps/L6QHBBT7Node01Cell/com.hcsc.myappui.ear.ear/com.hcsc.myappui.web.war/WEB-INF/lib/cxf-rt-ws-security-2.7.7.jar!/cxf-ehcache.xml
2014-04-30 01:22:45,517 [WebContainer : 2]
net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:150)
 DEBUG : Configuring ehcache from InputStream
2014-04-30 01:22:45,517 [WebContainer : 2]
net.sf.ehcache.config.BeanHandler.setAttribute(BeanHandler.java:271)
 DEBUG : Ignoring ehcache attribute xsi:noNamespaceSchemaLocation
2014-04-30 01:22:45,517 [WebContainer : 2]
net.sf.ehcache.config.DiskStoreConfiguration.translatePath(DiskStoreConfiguration.java:141)
 DEBUG : Disk Store Path: C:\Users\i272813\AppData\Local\Temp\
2014-04-30 01:22:45,517 [WebContainer : 2]
net.sf.ehcache.config.DiskStoreConfiguration.translatePath(DiskStoreConfiguration.java:141)
 DEBUG : Disk Store Path: C:\Users\i272813\AppData\Local\Temp\cxf1603275238
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1036)
 DEBUG : Creating new CacheManager with Configuration Object
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.util.PropertyUtil.parseProperties(PropertyUtil.java:88)
 DEBUG : propertiesString is null.
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.config.ConfigurationHelper.createCacheManagerEventListener(ConfigurationHelper.java:185)
 DEBUG : No CacheManagerEventListenerFactory class specified. Skipping...
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.Cache.createBootstrapCacheLoader(Cache.java:955)
 DEBUG : No BootstrapCacheLoaderFactory class specified. Skipping...
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.Cache.createCacheWriter(Cache.java:929)
 DEBUG : CacheWriter factory not configured. Skipping...
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.config.ConfigurationHelper.createCacheExceptionHandler(ConfigurationHelper.java:96)
 DEBUG : No CacheExceptionHandlerFactory class specified. Skipping...
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.Cache.createBootstrapCacheLoader(Cache.java:955)
 DEBUG : No BootstrapCacheLoaderFactory class specified. Skipping...
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.Cache.createCacheWriter(Cache.java:929)
 DEBUG : CacheWriter factory not configured. Skipping...
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.config.ConfigurationHelper.createCacheExceptionHandler(ConfigurationHelper.java:96)
 DEBUG : No CacheExceptionHandlerFactory class specified. Skipping...
2014-04-30 01:22:45,527 [WebContainer : 2]
net.sf.ehcache.store.MemoryStore.<init>(MemoryStore.java:149)
 DEBUG : Initialized net.sf.ehcache.store.NotifyingMemoryStore for
org.apache.cxf.ws.security.tokenstore.TokenStore
2014-04-30 01:22:45,537 [WebContainer : 2]
net.sf.ehcache.Cache.initialise(Cache.java:1169)
 DEBUG : Initialised cache: org.apache.cxf.ws.security.tokenstore.TokenStore
2014-04-30 01:22:45,537 [WebContainer : 2]
net.sf.ehcache.config.ConfigurationHelper.createCacheDecorators(ConfigurationHelper.java:325)
 DEBUG : CacheDecoratorFactory not configured. Skipping for
'org.apache.cxf.ws.security.tokenstore.TokenStore'.
2014-04-30 01:22:45,537 [WebContainer : 2]
net.sf.ehcache.config.ConfigurationHelper.createDefaultCacheDecorators(ConfigurationHelper.java:354)
 DEBUG : CacheDecoratorFactory not configured for defaultCache. Skipping for
'org.apache.cxf.ws.security.tokenstore.TokenStore'.
2014-04-30 01:22:45,537 [WebContainer : 2]
net.sf.ehcache.Cache.createBootstrapCacheLoader(Cache.java:955)
 DEBUG : No BootstrapCacheLoaderFactory class specified. Skipping...
2014-04-30 01:22:45,537 [WebContainer : 2]
net.sf.ehcache.Cache.createCacheWriter(Cache.java:929)
 DEBUG : CacheWriter factory not configured. Skipping...
2014-04-30 01:22:45,537 [WebContainer : 2]
net.sf.ehcache.store.MemoryStore.<init>(MemoryStore.java:149)
 DEBUG : Initialized net.sf.ehcache.store.NotifyingMemoryStore for
org.apache.cxf.ws.security.tokenstore.TokenStore--1624423485
2014-04-30 01:22:45,537 [WebContainer : 2]
net.sf.ehcache.Cache.initialise(Cache.java:1169)
 DEBUG : Initialised cache:
org.apache.cxf.ws.security.tokenstore.TokenStore--1624423485
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:179)
 DEBUG : Could not find a definition for bean with id default.sts-client -
no injection will be performed.
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:179)
 DEBUG : Could not find a definition for bean with id
{http://cxf.apache.org}TransportURIResolver.http-conduit - no injection will
be performed.
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:179)
 DEBUG : Could not find a definition for bean with id
http://localhost:8090/mysts/sts - no injection will be performed.
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.setTlsClientParameters(HTTPConduit.java:900)
 DEBUG : Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit'
has been (re)configured for plain http.
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.logConfig(HTTPConduit.java:366)
 DEBUG : No Trust Decider configured for Conduit
'{http://cxf.apache.org}TransportURIResolver.http-conduit'
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.logConfig(HTTPConduit.java:379)
 DEBUG : No Auth Supplier configured for Conduit
'{http://cxf.apache.org}TransportURIResolver.http-conduit'
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.logConfig(HTTPConduit.java:398)
 DEBUG : Conduit '{http://cxf.apache.org}TransportURIResolver.http-conduit'
has been configured for plain http.
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:46)
 DEBUG : registering incoming observer:
org.apache.cxf.transport.TransportURIResolver$1@37acaf91
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.transport.http.Headers.logProtocolHeaders(Headers.java:257)
 DEBUG : Accept: */*
2014-04-30 01:22:45,537 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.makeTrustDecision(HTTPConduit.java:1721)
 DEBUG : No Trust Decider for Conduit
'{http://cxf.apache.org}TransportURIResolver.http-conduit'. An afirmative
Trust Decision is assumed.
2014-04-30 01:22:45,587 [WebContainer : 2]
org.apache.cxf.wsdl11.WSDLServiceBuilder.checkForWrapped(WSDLServiceBuilder.java:676)
 DEBUG : Operation {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Issue
cannot be unwrapped, input message must reference global element declaration
with same localname as operation
2014-04-30 01:22:45,587 [WebContainer : 2]
org.apache.cxf.wsdl11.WSDLServiceBuilder.checkForWrapped(WSDLServiceBuilder.java:676)
 DEBUG : Operation
{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Validate cannot be
unwrapped, input message must reference global element declaration with same
localname as operation
2014-04-30 01:22:45,587 [WebContainer : 2]
org.apache.cxf.wsdl11.WSDLServiceBuilder.checkForWrapped(WSDLServiceBuilder.java:676)
 DEBUG : Operation {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Cancel
cannot be unwrapped, input message must reference global element declaration
with same localname as operation
2014-04-30 01:22:45,587 [WebContainer : 2]
org.apache.cxf.wsdl11.WSDLServiceBuilder.checkForWrapped(WSDLServiceBuilder.java:676)
 DEBUG : Operation {http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Renew
cannot be unwrapped, input message must reference global element declaration
with same localname as operation
2014-04-30 01:22:45,587 [WebContainer : 2]
org.apache.cxf.wsdl11.WSDLServiceBuilder.checkForWrapped(WSDLServiceBuilder.java:676)
 DEBUG : Operation
{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}KeyExchangeToken cannot
be unwrapped, input message must reference global element declaration with
same localname as operation
2014-04-30 01:22:45,587 [WebContainer : 2]
org.apache.cxf.wsdl11.WSDLServiceBuilder.checkForWrapped(WSDLServiceBuilder.java:676)
 DEBUG : Operation
{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}RequestCollection cannot
be unwrapped, input message must reference global element declaration with
same localname as operation
2014-04-30 01:22:45,597 [WebContainer : 2]
com.hcsc.security.sts.SmSessionBuilder.build(SmSessionBuilder.java:38)
 INFO  : build(): entered.
2014-04-30 01:22:45,597 [WebContainer : 2]
com.hcsc.security.sts.SmSessionBuilder.build(SmSessionBuilder.java:40)
 DEBUG : build(): element: [[hcsc:SmSessionToken: null]]
2014-04-30 01:22:45,597 [WebContainer : 2]
com.hcsc.security.sts.SmSessionBuilder.build(SmSessionBuilder.java:44)
 DEBUG : build(): nsUri: [http://schemas.hcsc.com/ws/securitypolicy]
2014-04-30 01:22:45,597 [WebContainer : 2]
com.hcsc.security.sts.SmSessionBuilder.build(SmSessionBuilder.java:48)
 INFO  : build(): exiting...
2014-04-30 01:22:45,597 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:45,597 [WebContainer : 2]
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:179)
 DEBUG : Could not find a definition for bean with id
{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}STS_Port.http-conduit -
no injection will be performed.
2014-04-30 01:22:45,597 [WebContainer : 2]
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:179)
 DEBUG : Could not find a definition for bean with id
http://localhost:8090/mysts/sts - no injection will be performed.
2014-04-30 01:22:45,597 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.setTlsClientParameters(HTTPConduit.java:900)
 DEBUG : Conduit
'{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}STS_Port.http-conduit'
has been (re)configured for plain http.
2014-04-30 01:22:45,597 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.logConfig(HTTPConduit.java:366)
 DEBUG : No Trust Decider configured for Conduit
'{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}STS_Port.http-conduit'
2014-04-30 01:22:45,597 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.logConfig(HTTPConduit.java:379)
 DEBUG : No Auth Supplier configured for Conduit
'{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}STS_Port.http-conduit'
2014-04-30 01:22:45,597 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit.logConfig(HTTPConduit.java:398)
 DEBUG : Conduit
'{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}STS_Port.http-conduit'
has been configured for plain http.
2014-04-30 01:22:45,597 [WebContainer : 2]
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:46)
 DEBUG : registering incoming observer:
org.apache.cxf.endpoint.ClientImpl@20df4596
2014-04-30 01:22:45,597 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:45,597 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:45,607 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:495)
 DEBUG : Invoke, operation info: [BindingOperationInfo:
{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Issue], params:
[javax.xml.transform.dom.DOMSource@afe1989b]
2014-04-30 01:22:45,607 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setContext(ClientImpl.java:706)
 DEBUG : set requestContext to message
be{SOAPAction=http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue,
ws-security.encryption.properties=clientKeystore.properties,
ws-security.encryption.username=mystskey,
ws-security.sts.client=org.apache.cxf.ws.security.trust.STSClient@5a30b0d2,
ws-security.callback-handler=com.hcsc.myappui.common.config.ClientCallbackHandler}
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:975)
 DEBUG : Interceptors contributed by bus:
[org.apache.cxf.ws.policy.PolicyOutInterceptor@b572ee07,
org.apache.cxf.interceptor.LoggingOutInterceptor@cabd6932]
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:979)
 DEBUG : Interceptors contributed by client: []
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:983)
 DEBUG : Interceptors contributed by endpoint:
[org.apache.cxf.interceptor.MessageSenderInterceptor@fbc0fcb8]
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:987)
 DEBUG : Interceptors contributed by binding:
[org.apache.cxf.interceptor.AttachmentOutInterceptor@21245aca,
org.apache.cxf.interceptor.StaxOutInterceptor@f50d3767,
org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFilterInterceptor@99a88ba9,
org.apache.cxf.interceptor.BareOutInterceptor@fd263b28,
org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@c728480b,
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@534ba398]
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.policy.PolicyOutInterceptor@b572ee07 to phase setup
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.LoggingOutInterceptor@cabd6932 to phase
pre-stream
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor@fbc0fcb8 to phase
prepare-send
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.AttachmentOutInterceptor@21245aca to phase
pre-stream
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.StaxOutInterceptor@f50d3767 to phase pre-stream
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFilterInterceptor@99a88ba9
to phase pre-logical
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.BareOutInterceptor@fd263b28 to phase marshal
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@c728480b
to phase post-logical
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@534ba398 to phase
write
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:684)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@8d4c1b47 was
created. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]

2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.policy.PolicyOutInterceptor@b572ee07
2014-04-30 01:22:45,617 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyUtils.logPolicy(PolicyUtils.java:156)
 TRACE : Using effective policy: 
type: Policy
  type: ExactlyOne
    type: All
      type: Assertion
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
(org.apache.cxf.ws.security.policy.model.SupportingToken@72534795)
        type: Policy
          type: ExactlyOne
            type: All
              type: Assertion
{http://schemas.hcsc.com/ws/securitypolicy}SmSessionToken
(com.hcsc.security.sts.SmSessionToken@35bb9a7f)

2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.security.policy.interceptors.SecurityVerificationOutInterceptor@f4a95bf2
to phase pre-logical
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@8d4c1b47 was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]

2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyOutInterceptor.addInterceptors(PolicyOutInterceptor.java:144)
 DEBUG : Added interceptor of type SecurityVerificationOutInterceptor
2014-04-30 01:22:45,617 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
com.hcsc.security.sts.SmSessionAssertionInterceptor@1b07816d to phase
pre-protocol
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@8d4c1b47 was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [SmSessionAssertionInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]

2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyOutInterceptor.addInterceptors(PolicyOutInterceptor.java:144)
 DEBUG : Added interceptor of type SmSessionAssertionInterceptor
2014-04-30 01:22:45,627 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyOutInterceptor.handle(PolicyOutInterceptor.java:134)
 TRACE : Chosen alternative: 
  type: Assertion
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
(org.apache.cxf.ws.security.policy.model.SupportingToken@72534795)
    type: Policy
      type: ExactlyOne
        type: All
          type: Assertion
{http://schemas.hcsc.com/ws/securitypolicy}SmSessionToken
(com.hcsc.security.sts.SmSessionToken@35bb9a7f)

2014-04-30 01:22:45,627 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:45,627 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor@766a8dc6 to phase
post-stream
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@8d4c1b47 was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [SmSessionAssertionInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]

2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFilterInterceptor@99a88ba9
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.security.policy.interceptors.SecurityVerificationOutInterceptor@f4a95bf2
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@c728480b
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor@fbc0fcb8
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@ab2e463c
to phase prepare-send-ending
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@8d4c1b47 was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [SmSessionAssertionInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]

2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.LoggingOutInterceptor@cabd6932
2014-04-30 01:22:45,627 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.AttachmentOutInterceptor@21245aca
2014-04-30 01:22:45,637 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.StaxOutInterceptor@f50d3767
2014-04-30 01:22:45,647 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.StaxOutEndingInterceptor@bfe62d20 to phase
pre-stream-ending
2014-04-30 01:22:45,647 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@8d4c1b47 was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [SmSessionAssertionInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]
  pre-stream-ending [StaxOutEndingInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]

2014-04-30 01:22:45,647 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
com.hcsc.security.sts.SmSessionAssertionInterceptor@1b07816d
2014-04-30 01:22:45,647 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.addToken(SmSessionAssertionInterceptor.java:117)
 INFO  : addToken(): entered.
2014-04-30 01:22:45,647 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.assertTokens(SmSessionAssertionInterceptor.java:177)
 INFO  : assertTokens(): entered.
2014-04-30 01:22:45,647 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.assertTokens(SmSessionAssertionInterceptor.java:186)
 DEBUG : assertTokens(): exiting...
2014-04-30 01:22:45,647 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.addToken(SmSessionAssertionInterceptor.java:120)
 DEBUG : addToken(): token: [com.hcsc.security.sts.SmSessionToken@35bb9a7f]
2014-04-30 01:22:45,647 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.addToken(SmSessionAssertionInterceptor.java:123)
 DEBUG : addToken(): h: [org.apache.cxf.binding.soap.SoapHeader@e6c01037]
2014-04-30 01:22:45,647 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.addSmSessionToken(SmSessionAssertionInterceptor.java:152)
 INFO  : addSmSessionToken(): entered.
2014-04-30 01:22:45,657 [WebContainer : 2]
org.apache.xml.security.Init.dynamicInit(Init.java:114)
 DEBUG : Registering default algorithms
2014-04-30 01:22:45,687 [WebContainer : 2]
org.apache.ws.security.WSSConfig.appendJceProvider(WSSConfig.java:962)
 DEBUG : The provider STRTransform was added at position: 14
2014-04-30 01:22:45,687 [WebContainer : 2]
com.hcsc.security.sts.WSSecSmSessionToken.setTokenValue(WSSecSmSessionToken.java:45)
 DEBUG : setTokenValue(): tokenValue:
[qau2xn3J4MRjG4kKVokU7In/410XJu5hS8aGPihhsAfKCVzhi/NTmG8lKMsXLBSVEsoMRBLexwSWUjT/eEFXXuk5xFPEKDAFu/uwKfwo+Ila2CydzdCppYRLE8nYUKnw9rq0KiwPWohJBkUH0asMCBrRueICl5ue3VeZA/L9MAhtX6cNbH20aNtlmqIT8E5ERIp+GxKVi60Bx4jI5DS4/znLvGOC1MYJy8n9eeK4Ddlm2qFaUuyrHFL5fcFFm1x4o1hDP3OvoUQ8aeFnTJuyQ8w0RjTjlrWA3MdSPeBQmxh2pYC4CmmyW7DtmgyrNMbPNs2Pn+YHQ2qYXMyFdxGqIenmXepFkmyqTobJ451krYRVprbUdMOi9J1spPhzpo9iApY1zgPtVOMmjGzYZkv2Vyfuo016ACNkc+TrWiyoOCjljLjMpvDRrBGG3balG7xhWV0hfaBSmrMSzn/OfFn2NG+8sCGMvHqmpuPlzq5Y0AEM+z21r7hEDTqRl8GZS1ksLsrz1D3qAN5Bl4q1fd/lKNUr4KnwCtgVuOYfhnNA/NcjboLLOPzSUPqHgkdavILA2RtXkr/Uqc7L2FEe4zfaFQfcZKsE5jB8xN86gQ4g2DRsptFR7Xmqzyqmb9Cfebj8zPfEziMdU5q+5g1E9Lv7p+pQCoHHVY5Yulb9A0/T6oj65k4JvSXNz74BzIIjVXwGXLzbS5HuEalgJNkYnbm7RdIm6zLgafSXvjripuQ6fG4ED96nYuPirn8RqQyDohLECXvEnM8ODT8D3yc/emJedvlQ88kvxZ22uS9UbSKhNqueUYOr0tyHkx0uVoCb8YcgbQMXNhUBsLvPO8jLPN0wHgxh8lCljlAeyc1wrnvARcfCaZFtmIRCz28U89ndmEdhmcJTQy2GQvwFKOHWNDKteRdPp4xn9lc5]
2014-04-30 01:22:45,687 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.addSmSessionToken(SmSessionAssertionInterceptor.java:165)
 INFO  : addSmSessionToken(): exiting...
2014-04-30 01:22:45,687 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.addToken(SmSessionAssertionInterceptor.java:126)
 DEBUG : addToken(): builder:
[com.hcsc.security.sts.WSSecSmSessionToken@a61db819]
2014-04-30 01:22:45,687 [WebContainer : 2]
com.hcsc.security.sts.WSSecSmSessionToken.prepare(WSSecSmSessionToken.java:52)
 INFO  : prepare(): entered.
2014-04-30 01:22:45,697 [WebContainer : 2]
com.hcsc.security.sts.WSSecSmSessionToken.prepare(WSSecSmSessionToken.java:61)
 INFO  : prepare(): exiting...
2014-04-30 01:22:45,697 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.addToken(SmSessionAssertionInterceptor.java:145)
 INFO  : addToken(): exiting...
2014-04-30 01:22:45,697 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@534ba398
2014-04-30 01:22:45,697 [WebContainer : 2]
org.apache.cxf.common.logging.LogUtils.doLog(LogUtils.java:452)
 DEBUG : Could not determine bean name for instance of class
org.apache.cxf.bus.managers.HeaderManagerImpl.
2014-04-30 01:22:45,697 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor@89da4d05
to phase write-ending
2014-04-30 01:22:45,697 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@8d4c1b47 was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [SmSessionAssertionInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]
  write-ending [SoapOutEndingInterceptor]
  pre-stream-ending [StaxOutEndingInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]

2014-04-30 01:22:45,697 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.BareOutInterceptor@fd263b28
2014-04-30 01:22:45,707 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor@766a8dc6
2014-04-30 01:22:45,707 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:45,707 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor.handle(PolicyVerificationOutInterceptor.java:78)
 DEBUG : Verified policies for outbound message.
2014-04-30 01:22:45,707 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor@89da4d05
2014-04-30 01:22:45,707 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.StaxOutEndingInterceptor@bfe62d20
2014-04-30 01:22:45,707 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@ab2e463c
2014-04-30 01:22:45,707 [WebContainer : 2]
org.apache.cxf.interceptor.AbstractLoggingInterceptor.log(AbstractLoggingInterceptor.java:234)
 INFO  : Outbound Message

---------------------------
ID: 1
Address: http://localhost:8090/mysts/sts
Encoding: UTF-8
Http-Method: POST
Content-Type: application/soap+xml;
action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue"
Headers: {Accept=[*/*]}
Payload: 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<wsse:Security soap:mustUnderstand="true"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:BinarySecurityToken
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" 
ValueType="http://schemas.hcsc.com/ws/securitypolicy/token-profile#SMSESSION" 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
wsu:Id="BST-4295AEE5D29DE3784A13988389656971">cWF19DamxqExOWxjNQ...</wsse:BinarySecurityToken>
</wsse:Security>
</soap:Header>
<soap:Body>
<wst:RequestSecurityToken
xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
<wst:SecondaryParameters>
<t:TokenType
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">urn:oasis:names:tc:SAML:2.0:assertion</t:TokenType>
<t:KeyType
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
</wst:SecondaryParameters>
<wst:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</wst:RequestType>
<wsp:AppliesTo xmlns:wsp="http://www.w3.org/ns/ws-policy">
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost:9084/myapp/services/AccountMaintenance</wsa:Address>
</wsa:EndpointReference>
</wsp:AppliesTo>
<wst:Renewing Allow="false"/>
</wst:RequestSecurityToken>
</soap:Body>
</soap:Envelope>

--------------------------------------
2014-04-30 01:22:45,707 [WebContainer : 2]
org.apache.cxf.transport.http.Headers.logProtocolHeaders(Headers.java:257)
 DEBUG : Accept: */*
2014-04-30 01:22:45,707 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.makeTrustDecision(HTTPConduit.java:1721)
 DEBUG : No Trust Decider for Conduit
'{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}STS_Port.http-conduit'.
An afirmative Trust Decision is assumed.
2014-04-30 01:22:45,717 [WebContainer : 2]
org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:197)
 DEBUG : Sending POST Message with Headers to
http://localhost:8090/mysts/sts Conduit
:{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}STS_Port.http-conduit

2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:758)
 DEBUG : Interceptors contributed by bus:
[org.apache.cxf.ws.policy.PolicyInInterceptor@839e24ac,
org.apache.cxf.interceptor.LoggingInInterceptor@a8810f1b]
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
 DEBUG : Interceptors contributed by client: []
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:766)
 DEBUG : Interceptors contributed by endpoint: []
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:770)
 DEBUG : Interceptors contributed by binding:
[org.apache.cxf.interceptor.AttachmentInInterceptor@d1cc24f9,
org.apache.cxf.interceptor.StaxInInterceptor@f0db5c17,
org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor@5e863265,
org.apache.cxf.interceptor.DocLiteralInInterceptor@167e7a79,
org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor@43fd436c,
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor@1ca8c040,
org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor@b33c1d55,
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor@67baab2f,
org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor@e9071dfa]
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.policy.PolicyInInterceptor@839e24ac to phase receive
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.LoggingInInterceptor@a8810f1b to phase receive
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.AttachmentInInterceptor@d1cc24f9 to phase receive
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.StaxInInterceptor@f0db5c17 to phase post-stream
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor@5e863265 to
phase read
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.DocLiteralInInterceptor@167e7a79 to phase
unmarshal
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor@43fd436c to
phase unmarshal
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor@1ca8c040 to
phase read
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor@b33c1d55 to
phase read
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor@67baab2f to
phase post-protocol
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor@e9071dfa
to phase pre-protocol
2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:684)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@fcc7d72e was
created. Current flow:
  receive [PolicyInInterceptor, LoggingInInterceptor,
AttachmentInInterceptor]
  post-stream [StaxInInterceptor]
  read [ReadHeadersInterceptor, SoapActionInInterceptor,
StartBodyInterceptor]
  pre-protocol [MustUnderstandInterceptor]
  post-protocol [CheckFaultInterceptor]
  unmarshal [DocLiteralInInterceptor, SoapHeaderInterceptor]

2014-04-30 01:22:46,737 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.policy.PolicyInInterceptor@839e24ac
2014-04-30 01:22:46,737 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:46,737 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:46,737 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:46,737 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:46,747 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.policy.PolicyVerificationInInterceptor@d4fa9a54 to phase
pre-invoke
2014-04-30 01:22:46,747 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@fcc7d72e was
modified. Current flow:
  receive [PolicyInInterceptor, LoggingInInterceptor,
AttachmentInInterceptor]
  post-stream [StaxInInterceptor]
  read [ReadHeadersInterceptor, SoapActionInInterceptor,
StartBodyInterceptor]
  pre-protocol [MustUnderstandInterceptor]
  post-protocol [CheckFaultInterceptor]
  unmarshal [DocLiteralInInterceptor, SoapHeaderInterceptor]
  pre-invoke [PolicyVerificationInInterceptor]

2014-04-30 01:22:46,747 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
com.hcsc.security.sts.SmSessionAssertionInterceptor@66741131 to phase
pre-protocol
2014-04-30 01:22:46,747 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@fcc7d72e was
modified. Current flow:
  receive [PolicyInInterceptor, LoggingInInterceptor,
AttachmentInInterceptor]
  post-stream [StaxInInterceptor]
  read [ReadHeadersInterceptor, SoapActionInInterceptor,
StartBodyInterceptor]
  pre-protocol [MustUnderstandInterceptor, SmSessionAssertionInterceptor]
  post-protocol [CheckFaultInterceptor]
  unmarshal [DocLiteralInInterceptor, SoapHeaderInterceptor]
  pre-invoke [PolicyVerificationInInterceptor]

2014-04-30 01:22:46,747 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.LoggingInInterceptor@a8810f1b
2014-04-30 01:22:46,747 [WebContainer : 2]
org.apache.cxf.interceptor.AbstractLoggingInterceptor.log(AbstractLoggingInterceptor.java:234)
 INFO  : Inbound Message

----------------------------
ID: 1
Response-Code: 200
Encoding: UTF-8
Content-Type: application/soap+xml;charset=UTF-8
Headers: {content-type=[application/soap+xml;charset=UTF-8], Date=[Wed, 30
Apr 2014 06:22:46 GMT], Server=[Apache-Coyote/1.1],
transfer-encoding=[chunked]}
Payload: 
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<RequestSecurityTokenResponseCollection
xmlns="http://docs.oasis-open.org/ws-sx/ws-trust/200512"
xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:ns4="http://www.w3.org/2005/08/addressing"
xmlns:ns5="http://docs.oasis-open.org/ws-sx/ws-trust/200802">
<RequestSecurityTokenResponse>
<TokenType>urn:oasis:names:tc:SAML:2.0:assertion</TokenType>
<RequestedSecurityToken>
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ID="_6648FC4E64CE96F5EB13988389660072"
IssueInstant="2014-04-30T06:22:46.007Z" Version="2.0"
xsi:type="saml2:AssertionType">
<saml2:Issuer>EAA_STS</saml2:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#_6648FC4E64CE96F5EB13988389660072">
<ds:Transforms>
<ds:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"
PrefixList="xs"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>1sN8HpTb/Io8...</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>DbXUJLQLyUM...</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIIDyDCMA8GA1UECBM2A...</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<saml2:Subject>
<saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
NameQualifier="http://mysts.org/sts">user0001</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"/>
</saml2:Subject>
<saml2:Conditions NotBefore="2014-04-30T06:22:46.007Z"
NotOnOrAfter="2014-04-30T06:52:46.007Z">
<saml2:AudienceRestriction>
<saml2:Audience>http://localhost:9084/myapp/services/AccountMaintenance</saml2:Audience>
</saml2:AudienceRestriction>
</saml2:Conditions>
<saml2:AttributeStatement>
<saml2:Attribute Name="cn"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
<saml2:AttributeValue
xsi:type="xs:string">cn=RCP,ou=mycompany,ou=Authorities,ou=mycompany,ou=SERV,o=INTERNAL</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
</RequestedSecurityToken>
<RequestedAttachedReference>
<ns3:SecurityTokenReference
xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"
wsse11:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0">
<ns3:KeyIdentifier
ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID">_6648FC4E64CE96F5EB13988389660072</ns3:KeyIdentifier>
</ns3:SecurityTokenReference>
</RequestedAttachedReference>
<RequestedUnattachedReference>
<ns3:SecurityTokenReference
xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"
wsse11:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0">
<ns3:KeyIdentifier
ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID">_6648FC4E64CE96F5EB13988389660072</ns3:KeyIdentifier>
</ns3:SecurityTokenReference>
</RequestedUnattachedReference>
<wsp:AppliesTo xmlns:wsp="http://www.w3.org/ns/ws-policy"
xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://localhost:9084/myapp/services/AccountMaintenance</wsa:Address>
</wsa:EndpointReference>
</wsp:AppliesTo>
<Lifetime>
<ns2:Created>2014-04-30T06:22:46.727Z</ns2:Created>
<ns2:Expires>2014-04-30T06:52:46.727Z</ns2:Expires>
</Lifetime>
</RequestSecurityTokenResponse>
</RequestSecurityTokenResponseCollection>
</soap:Body>
</soap:Envelope>
--------------------------------------
2014-04-30 01:22:46,747 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.AttachmentInInterceptor@d1cc24f9
2014-04-30 01:22:46,747 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.StaxInInterceptor@f0db5c17
2014-04-30 01:22:46,747 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.StaxInEndingInterceptor@f6d10dcf to phase
post-invoke
2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@fcc7d72e was
modified. Current flow:
  receive [PolicyInInterceptor, LoggingInInterceptor,
AttachmentInInterceptor]
  post-stream [StaxInInterceptor]
  read [ReadHeadersInterceptor, SoapActionInInterceptor,
StartBodyInterceptor]
  pre-protocol [MustUnderstandInterceptor, SmSessionAssertionInterceptor]
  post-protocol [CheckFaultInterceptor]
  unmarshal [DocLiteralInInterceptor, SoapHeaderInterceptor]
  pre-invoke [PolicyVerificationInInterceptor]
  post-invoke [StaxInEndingInterceptor]

2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor@1ca8c040
2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor@5e863265
2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor@b33c1d55
2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor@e9071dfa
2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
com.hcsc.security.sts.SmSessionAssertionInterceptor@66741131
2014-04-30 01:22:46,757 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.assertTokens(SmSessionAssertionInterceptor.java:177)
 INFO  : assertTokens(): entered.
2014-04-30 01:22:46,757 [WebContainer : 2]
com.hcsc.security.sts.SmSessionAssertionInterceptor.assertTokens(SmSessionAssertionInterceptor.java:186)
 DEBUG : assertTokens(): exiting...
2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor@67baab2f
2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.DocLiteralInInterceptor@167e7a79
2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor@43fd436c
2014-04-30 01:22:46,757 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.policy.PolicyVerificationInInterceptor@d4fa9a54
2014-04-30 01:22:46,757 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:46,757 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:46,767 [WebContainer : 2]
com.hcsc.security.sts.SmSessionToken.getName(SmSessionToken.java:31)
 INFO  : getName(): entered.
2014-04-30 01:22:46,767 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(PolicyVerificationInInterceptor.java:116)
 DEBUG : Verified policies for inbound message.
2014-04-30 01:22:46,767 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.StaxInEndingInterceptor@f6d10dcf
2014-04-30 01:22:46,767 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.LoggingOutInterceptor@cabd6932
2014-04-30 01:22:46,767 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.AttachmentOutInterceptor@6a0e3db1
2014-04-30 01:22:46,767 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.StaxOutInterceptor@8587e669
2014-04-30 01:22:46,767 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.interceptor.StaxOutEndingInterceptor@bfe62d20 to phase
pre-stream-ending
2014-04-30 01:22:46,767 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]
  pre-stream-ending [StaxOutEndingInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]

2014-04-30 01:22:46,767 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor@35cd6fff
2014-04-30 01:22:46,797 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor@c57cd848
to phase pre-protocol-ending
2014-04-30 01:22:46,797 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]
  pre-protocol-ending [SAAJOutEndingInterceptor]
  pre-stream-ending [StaxOutEndingInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]

2014-04-30 01:22:46,797 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal@c378a48d
to phase post-protocol
2014-04-30 01:22:46,807 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]
  post-protocol [PolicyBasedWSS4JOutInterceptorInternal]
  post-stream [PolicyVerificationOutInterceptor]
  pre-protocol-ending [SAAJOutEndingInterceptor]
  pre-stream-ending [StaxOutEndingInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]

2014-04-30 01:22:46,807 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@6ebb0f5f
2014-04-30 01:22:46,817 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:206)
 DEBUG : Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor@b1b5c265
to phase write-ending
2014-04-30 01:22:46,817 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.outputChainToLog(PhaseInterceptorChain.java:682)
 DEBUG : Chain org.apache.cxf.phase.PhaseInterceptorChain@3a99eced was
modified. Current flow:
  setup [PolicyOutInterceptor]
  pre-logical [HolderOutInterceptor, SwAOutInterceptor,
WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [WrappedOutInterceptor, BareOutInterceptor]
  post-protocol [PolicyBasedWSS4JOutInterceptorInternal]
  post-stream [PolicyVerificationOutInterceptor]
  write-ending [SoapOutEndingInterceptor]
  pre-protocol-ending [SAAJOutEndingInterceptor]
  pre-stream-ending [StaxOutEndingInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]

2014-04-30 01:22:46,817 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.WrappedOutInterceptor@605b9cf3
2014-04-30 01:22:46,817 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.interceptor.BareOutInterceptor@60931d21
2014-04-30 01:22:46,887 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal@c378a48d
2014-04-30 01:22:46,907 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor@766a8dc6
2014-04-30 01:22:46,907 [WebContainer : 2]
org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor.handle(PolicyVerificationOutInterceptor.java:78)
 DEBUG : Verified policies for outbound message.
2014-04-30 01:22:46,907 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor@b1b5c265
2014-04-30 01:22:46,907 [WebContainer : 2]
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
 DEBUG : Invoking handleMessage on interceptor
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor@c57cd848
2014-04-30 01:22:46,907 [WebContainer : 2]
org.apache.cxf.transport.http.Headers.logProtocolHeaders(Headers.java:257)
 DEBUG : Accept: */*
2014-04-30 01:22:46,907 [WebContainer : 2]
org.apache.cxf.transport.http.Headers.logProtocolHeaders(Headers.java:257)
 DEBUG : SOAPAction: ""
2014-04-30 01:22:46,907 [WebContainer : 2]
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.makeTrustDecision(HTTPConduit.java:1721)
 DEBUG : No Trust Decider for Conduit
'{http://example.myapp.hcsc.com/}AccountMaintenancePort.http-conduit'. An
afirmative Trust Decision is assumed.
2014-04-30 01:22:46,917 [WebContainer : 2]
org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:197)
 DEBUG : Sending POST Message with Headers to
http://localhost:9084/myapp/services/AccountMaintenance Conduit
:{http://example.myapp.hcsc.com/}AccountMaintenancePort.http-conduit




--
View this message in context: http://cxf.547215.n5.nabble.com/PolicyException-when-using-BST-with-custom-ValueType-tp5743444p5743548.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: PolicyException when using BST with custom ValueType

Posted by Colm O hEigeartaigh <co...@apache.org>.
The warning you are seeing can be ignored. So the outbound request to the
STS is working correctly right? The problem is in the client parsing the
STS response. Could you paste the STS response? What version of CXF are you
using?

Colm.


On Wed, Apr 30, 2014 at 4:30 AM, jeffc <je...@bcbsil.com> wrote:

> I have my client and and service working without issue for Username tokens
> use case and return SAML token from STS.  But when I change my
> configuration
> so that the STS accepts Binary Security Token of a custom value type, I am
> getting the error: policy alternatives can not be satisfied
> SupportingTokens
>
> The BST is of a custom value type since it holds an SMSESSION token
> (Siteminder token) and the STS we are using (Layer 7) will validate the
> SMSESSION and then return a SAML 2 token.  Now the STSClient does call the
> STS and it processes the request and returns the SAML 2 token in the
> response as expected.   But it throws this exception before calling
> service.
>
> I believe this has something to do with this warning I see in logs:
>
>
> org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl.handleNoRegisteredBuilder(AssertionBuilderRegistryImpl.java:109)
>  WARN  : No assertion builder for type
> {http://schemas.hcsc.com/ws/securitypolicy}SmSessionToken registered.
>
> ERROR:
>
> WARN  : Interceptor for
> {
> http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService#{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Issue
> has thrown exception, unwinding now
> org.apache.cxf.ws.policy.PolicyException: These policy alternatives can not
> be satisfied:
> {
> http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
>         at
>
> org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(AssertionInfoMap.java:179)
>         at
>
> org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(PolicyVerificationInInterceptor.java:101)
>         at
>
> org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:44)
>         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
>         at
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:835)
>         at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1606)
>         at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1502)
>         at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
>         at
>
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
>         at
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
>         at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
>         at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
>         at
>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
>         at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
>         at
>
> org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:759)
>
> The supporting token in STS WSDL is defined as:
>
>     <wsp:Policy wsu:Id="BST_Policy">
>         <sp:SupportingTokens
> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
>             <wsp:Policy>
>                 <hcsc:SmSessionToken
> sp:IncludeToken="
> http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient
> "
> xmlns:hcsc="http://schemas.hcsc.com/ws/securitypolicy"/>
>             </wsp:Policy>
>         </sp:SupportingTokens>
>     </wsp:Policy>
>
> This is what the incoming ws-trust message to STS looks like:
>
> 2014-04-29 22:18:25,603 [WebContainer : 1]
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
>  DEBUG : Invoking handleMessage on interceptor
> org.apache.cxf.interceptor.BareOutInterceptor@1acf0376
> 2014-04-29 22:18:25,603 [WebContainer : 1]
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
>  DEBUG : Invoking handleMessage on interceptor
> org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor@58abd51a
> 2014-04-29 22:18:25,603 [WebContainer : 1]
>
> org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor.handle(PolicyVerificationOutInterceptor.java:72)
>  DEBUG : An exception was thrown when verifying that the effective policy
> for this request was satisfied.  However, this exception will not result in
> a fault.  The exception raised is:
> org.apache.cxf.ws.policy.PolicyException:
> These policy alternatives can not be satisfied:
> {
> http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
> 2014-04-29 22:18:25,613 [WebContainer : 1]
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
>  DEBUG : Invoking handleMessage on interceptor
>
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndingInterceptor@c88f07ad
> 2014-04-29 22:18:25,613 [WebContainer : 1]
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
>  DEBUG : Invoking handleMessage on interceptor
> org.apache.cxf.interceptor.StaxOutEndingInterceptor@9e81798
> 2014-04-29 22:18:25,613 [WebContainer : 1]
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:269)
>  DEBUG : Invoking handleMessage on interceptor
>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@a1c14891
> 2014-04-29 22:18:25,613 [WebContainer : 1]
>
> org.apache.cxf.interceptor.AbstractLoggingInterceptor.log(AbstractLoggingInterceptor.java:234)
>  INFO  : Outbound Message
>
> ---------------------------
> ID: 1
> Address: http://mysts.dev.mycompany.com:8080/eaa_sts
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: application/soap+xml;
> action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue"
> Headers: {Accept=[*/*]}
> Payload:
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
> <soap:Header>
> <wsse:Security soap:mustUnderstand="true"
> xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
> <wsse:BinarySecurityToken
> xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext"
> xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "
> EncodingType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary
> "
> ValueType="
> http://schemas.hcsc.com/ws/securitypolicy/token-profile#SMSESSION"
> wsu:Id="SecurityToken">YwjtLDRg...</wsse:BinarySecurityToken>
> </wsse:Security>
> </soap:Header>
> <soap:Body>
> <wst:RequestSecurityToken
> xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
> <wst:SecondaryParameters>
> <t:TokenType
> xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512
> ">urn:oasis:names:tc:SAML:2.0:assertion</t:TokenType>
> <t:KeyType
> xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
> http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
> </wst:SecondaryParameters>
> <wst:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue
> </wst:RequestType>
> <wsp:AppliesTo xmlns:wsp="http://www.w3.org/ns/ws-policy">
> <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
> <wsa:Address>http://localhost:9084/myapp/services/AccountMaintenance
> </wsa:Address>
> </wsa:EndpointReference>
> </wsp:AppliesTo>
> <wst:Renewing Allow="false"/>
> </wst:RequestSecurityToken>
> </soap:Body>
> </soap:Envelope>
> --------------------------------------
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/PolicyException-when-using-BST-with-custom-ValueType-tp5743444.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: PolicyException when using BST with custom ValueType

Posted by jeffc <je...@bcbsil.com>.
Here is the provider class:

public class SmSessionAssertionInterceptorProvider extends
AbstractPolicyInterceptorProvider {
    // class level logger
    private static final Logger logger =
LoggerFactory.getLogger(SmSessionAssertionInterceptorProvider.class);

    private static final Collection<QName> ASSERTION_TYPES;

    static {
        ASSERTION_TYPES = new ArrayList<QName>();
        ASSERTION_TYPES.add(Constants.QN_SMSESSION_TOKEN);
        logger.debug("initialized
SmSessionAssertionInterceptorProvider...");
    }

    public SmSessionAssertionInterceptorProvider() {
        this(new SmSessionAssertionInterceptor());
    }

    public SmSessionAssertionInterceptorProvider(Bus bus) {
        this((SmSessionAssertionInterceptor)
               
bus.getProperty("org.apache.cxf.ws.security.smsession.interceptor"));
    }

    public
SmSessionAssertionInterceptorProvider(SmSessionAssertionInterceptor
inInterceptor) {
        super(ASSERTION_TYPES);
        this.getOutInterceptors().add(new SmSessionAssertionInterceptor());
        this.getInInterceptors().add(inInterceptor == null ? new
SmSessionAssertionInterceptor() : inInterceptor);
    }
}

With these constants:

    public static final String NS_HCSC =
"http://schemas.hcsc.com/ws/securitypolicy";
    public static final String SMSESSION_TOKEN = "SmSessionToken";
    public static final String PREFIX_HCSC = "hcsc";
    public static final QName QN_SMSESSION_TOKEN = new QName(NS_HCSC,
SMSESSION_TOKEN, PREFIX_HCSC);
    public static final String ATTR_NAME_VALUE_TYPE = "ValueType";
    public static final String VALUE_TYPE_SMSESSION =
"http://schemas.hcsc.com/ws/securitypolicy/token-profile#SMSESSION";




--
View this message in context: http://cxf.547215.n5.nabble.com/PolicyException-when-using-BST-with-custom-ValueType-tp5743444p5743549.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: PolicyException when using BST with custom ValueType

Posted by jeffc <je...@bcbsil.com>.
The Primitive Assertion:

package com.hcsc.security.sts;

import org.apache.cxf.ws.security.policy.SP12Constants;
import org.apache.neethi.builders.PrimitiveAssertion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

public class SmSessionAssertion extends PrimitiveAssertion {
    // class level logger
    private static final Logger logger =
LoggerFactory.getLogger(SmSessionAssertion.class);

    public SmSessionAssertion() {
        super();
    }

    @Override
    public QName getName() {
        return Constants.QN_SMSESSION_TOKEN;
    }

    @Override
    public void serialize(XMLStreamWriter writer) throws XMLStreamException
{
        // method's name
        String methodName = "serialize()";

        logger.info(methodName + ": entered.");

        QName name = Constants.QN_SMSESSION_TOKEN;

        String localname = name.getLocalPart();
        String namespaceURI = name.getNamespaceURI();

        String prefix = writer.getPrefix(namespaceURI);
        if (prefix == null) {
            prefix = name.getPrefix();
            writer.setPrefix(prefix, namespaceURI);
        }

        // <hcsc:SmSessionToken>
        writer.writeStartElement(prefix, localname, namespaceURI);

        writer.writeNamespace(prefix, namespaceURI);

        writer.writeAttribute(prefix, namespaceURI,
SP12Constants.ATTR_INCLUDE_TOKEN, SP12Constants.INCLUDE_ALWAYS);

        String pPrefix =
writer.getPrefix(SP12Constants.POLICY.getNamespaceURI());
        if (pPrefix == null) {
            pPrefix = SP12Constants.POLICY.getPrefix();
            writer.setPrefix(SP12Constants.POLICY.getPrefix(),
SP12Constants.POLICY.getNamespaceURI());
        }

        // <wsp:Policy>
        writer.writeStartElement(pPrefix,
SP12Constants.POLICY.getLocalPart(),
SP12Constants.POLICY.getNamespaceURI());

        // </wsp:Policy>
        writer.writeEndElement();

        writer.writeEndElement();
        // </hcsc:SmSessionToken>

        logger.info(methodName + ": exiting...");
    }
}




--
View this message in context: http://cxf.547215.n5.nabble.com/PolicyException-when-using-BST-with-custom-ValueType-tp5743444p5743551.html
Sent from the cxf-user mailing list archive at Nabble.com.