Uploaded image for project: 'Rampart'
  1. Rampart
  2. RAMPART-336

EncryptedParts header encrpyion with namespace and EncryptedElements with xpath policy, missing some elements in MessageReceiver on server side.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6.2, 1.7.0
    • Component/s: rampart-core
    • Labels:
      None
    • Environment:
      Windows, jdk1/5 jdk1.6

      Description

      In my WS policy i have the following EncryptedElements

      <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
      <sp:Header Namespace="http://www.testsoftware.com" />
      </sp:EncryptedParts>

      here is the header that gets embedded into the soapheader.
      <test:Credentials xmlns:curam="http://www.testsoftware.com"><TestUsername>beantester</TestUsername><Username>beantester</Username><Password>password</Password></test:Credentials>

      on the server side, i have TestMessageReceiver extends RPCMessageReceiver
      in my receive(final MessageContext arg0) method
      when i print the soap-header arg0.getEnvelope().getHeader()

      i get only the password element and 2 other elements are missing.

      <test:Credentials xmlns:test="http://www.testsoftware.com"><Password>password</Password></test:Credentials>

      attaching sample03.zip and soaprequest.txt . this samples can be copied to rampart-1.5\samples\policy\ and can be run to recreate

      This is a issue in see in rampart1.5

      with the same example,
      The same missing elements issue happens when the WS policy uses
      EncryptedElements with xpath, enrypting a xml-fragment inside the SOAPHeader.

      <sp:EncryptedElements xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
      <sp:XPath xmlns:test="http://www.testsoftware.com">/soapenv:Envelope/soapenv:Header/test:Credentials</sp:XPath>
      </sp:EncryptedElements>

      is there any patch that i can look from rampart sources , as i need to use rampart1.5 as its bound to a axis2 2.1.5.1 version.

      Thanks in advance,

        Attachments

        1. RAMPART-336.diff
          2 kB
          Amila Jayasekara
        2. SOAPRequest.txt
          6 kB
          vijay
        3. sample03.zip
          8 kB
          vijay

          Activity

            People

            • Assignee:
              thilinamb Thilina Mahesh Buddhika
              Reporter:
              vrama77 vijay
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: