Bug 1191862 - (6.2.0) WSS UsernameToken fails to propagate at SOAP reference binding with WSS Policy
Summary: (6.2.0) WSS UsernameToken fails to propagate at SOAP reference binding with W...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Aileen
QA Contact: Matej Melko
URL:
Whiteboard:
Depends On:
Blocks: 1191864
TreeView+ depends on / blocked
 
Reported: 2015-02-12 07:17 UTC by Tadayoshi Sato
Modified: 2025-02-10 03:44 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
: 1191864 (view as bug list)
Environment:
Last Closed: 2025-02-10 03:44:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducer (camel-soap-proxy.zip) (21.71 KB, application/zip)
2015-02-12 07:17 UTC, Tadayoshi Sato
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SWITCHYARD-2520 0 Major Resolved WSS UsernameToken fails to propagate at SOAP reference binding with WSS Policy 2019-01-31 20:08:38 UTC

Description Tadayoshi Sato 2015-02-12 07:17:35 UTC
Created attachment 990753 [details]
Reproducer (camel-soap-proxy.zip)

Description of problem:

Platform BZ for https://issues.jboss.org/browse/SWITCHYARD-2520

SOAPContextMapper's soapHeadersType attribute (SWITCHYARD-710) allows you to propagate WS-Security SOAP headers from a SOAP service binding to a SOAP reference binding:

  <contextMapper includes=".*" soapHeadersType="XML"/>

However, when the reference binding is defined with WSDL that has a WS-Security Policy portion like the following one:

  <binding name="ReverseServiceBinding" type="tns:ReverseService">
    <wsp:PolicyReference URI="#ReverseServicePolicy"/>
    ...
  </binding>
  <wsp:Policy wsu:Id="ReverseServicePolicy">
    <wsp:ExactlyOne>
      <wsp:All>
        <sp:SupportingTokens xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
          <wsp:Policy>
            <sp:UsernameToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
              <wsp:Policy>
                <sp:WssUsernameToken10/>
              </wsp:Policy>
            </sp:UsernameToken>
          </wsp:Policy>
        </sp:SupportingTokens>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>

the reference fails to send a SOAP request raising the following warning:

15:01:40,139 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-/127.0.0.1:8080-1) Interceptor for {urn:switchyard-quickstart:camel-soap-proxy:1.0}ReverseService#{http://cxf.apache.org/jaxws/dispatch}Invoke has thrown exception, unwinding now: org.apache.cxf.ws.policy.PolicyException: No username available
	at org.apache.cxf.ws.security.wss4j.AbstractTokenInterceptor.policyNotAsserted(AbstractTokenInterceptor.java:229) [cxf-rt-ws-security-2.7.11.redhat-3.jar:2.7.11.redhat-3]
	at org.apache.cxf.ws.security.wss4j.UsernameTokenInterceptor.addUsernameToken(UsernameTokenInterceptor.java:361) [cxf-rt-ws-security-2.7.11.redhat-3.jar:2.7.11.redhat-3]
	at org.apache.cxf.ws.security.wss4j.UsernameTokenInterceptor.addToken(UsernameTokenInterceptor.java:307) [cxf-rt-ws-security-2.7.11.redhat-3.jar:2.7.11.redhat-3]
	at org.apache.cxf.ws.security.wss4j.AbstractTokenInterceptor.handleMessage(AbstractTokenInterceptor.java:95) [cxf-rt-ws-security-2.7.11.redhat-3.jar:2.7.11.redhat-3]
	at org.apache.cxf.ws.security.wss4j.AbstractTokenInterceptor.handleMessage(AbstractTokenInterceptor.java:61) [cxf-rt-ws-security-2.7.11.redhat-3.jar:2.7.11.redhat-3]


Version-Release number of selected component (if applicable):
N/A


How reproducible:
Always


Steps to Reproduce:
1. Deploy the attached quickstart (reproducer)
2. Run `mvn exec:java`


Actual results:
Get the above warning and the process fails.


Expected results:
The process should complete successfully.


Additional info:
N/A

Comment 1 JBoss JIRA Server 2015-04-10 04:32:01 UTC
Tadayoshi Sato <tadayosi> updated the status of jira SWITCHYARD-2520 to Resolved

Comment 2 Tadayoshi Sato 2015-04-10 04:38:17 UTC
Moved it to 'MODIFIED' as there is a solution for the issue. See:
https://issues.jboss.org/browse/SWITCHYARD-2520?focusedCommentId=13055739&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13055739

Please QA it to make sure it can really be resolved in FSW 6.2. Thanks.

Comment 6 Red Hat Bugzilla 2025-02-10 03:44:03 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.