You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ji...@apache.org on 2004/05/14 17:48:56 UTC

[jira] Closed: (WSFX-4) Order of elements in parameter "encryptionParts" leads to wrong DataReferences in ReferenceList

Message:

   The following issue has been closed.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/WSFX-4

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: WSFX-4
    Summary: Order of elements in parameter "encryptionParts" leads to wrong DataReferences in ReferenceList
       Type: Bug

     Status: Closed
   Priority: Minor
 Resolution: FIXED

    Project: WSFX
 Components: 
             WSS4J

   Assignee: 
   Reporter: Christof Soehngen

    Created: Tue, 11 May 2004 5:42 AM
    Updated: Fri, 14 May 2004 8:47 AM
Environment: WSDoAllSender/WSDoAllReceiver with action = "UsernameToken Encrypt"

Description:
I try to create a UsernameToken and encrypt it and the body using:

<parameter name="action" value="UsernameToken Signature Encrypt"/>
<parameter name="encryptionParts" value="{Content}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken;{Content}{}Body" />

This leads to the following exception:

org.apache.ws.security.WSSecurityException: An error was discovered processing the <wsse:Security> header. (WSSecurityEngine: DataReference - referenced data not found)

In TCPMonitor, I can see that the ReferenceList of the EncryptedKey contains the same DataReference (the one for the UsernameToken) twice:

    <xenc:EncryptedKey>
    ...
      <xenc:ReferenceList>
        <xenc:DataReference URI="#EncDataId-4101839"/>
        <xenc:DataReference URI="#EncDataId-4101839"/>
      </xenc:ReferenceList>
    </xenc:EncryptedKey>
    ...
    <wsse:UsernameToken>
      <xenc:EncryptedData Id="EncDataId-4101839" Type="http://www.w3.org/2001/04/xmlenc#Content">
    ...
    <soapenv:Body>
      <xenc:EncryptedData type="http://www.w3.org/2001/04/xmlenc#Content">

Note: When trying to reproduce the behaviour, the id never changed from 4101839 in several runs.

When I reverse the order of the elements in "encryptionParts" (<parameter name="encryptionParts" value="{Content}{}Body;{Content}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken" />), everything works fine:

    <xenc:EncryptedKey>
    ...
      <xenc:ReferenceList>
        <xenc:DataReference URI="#EncDataId-23011228"/>
        <xenc:DataReference URI="#EncDataId-17284365"/>
      </xenc:ReferenceList></xenc:EncryptedKey>
    ...
    <wsse:UsernameToken>
      <xenc:EncryptedData Id="EncDataId-17284365"         Type="http://www.w3.org/2001/04/xmlenc#Content">
    ...
    <soapenv:Body>
      <xenc:EncryptedData Id="EncDataId-23011228" Type="http://www.w3.org/2001/04/xmlenc#Content">



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira