Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5381

SAAJStreamWriter transforms DigestValue of custom signature

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.7
    • 2.7.8, 2.6.11
    • Core
    • None
    • Unknown

    Description

      I observe strange effect by processing custom signature in service inbound chain. End exception is: "Caused by: org.apache.xml.security.exceptions.Base64DecodingException: Error while decoding".

      After a bit analyze I found that DigestValue of Signature is concatinated with DigestValue of another signature and therefore cannot be proceed by xml security (santuario).

      Additional debugging shows that signature is broken by StaxUtils.copy(node, new SAAJStreamWriter(part)); in SAAJInInterceptor.
      Value in node is still correct, but value in SOAPMessage is broken.

      I attach a small project to illustrate the issue. Run mvn clean test for the project and compare DigestValue of Signature SIG-7D02FBC5A7AED81312138383830534822 in original request.xml and in output.

      Attachments

        1. saaj_test.zip
          11 kB
          Andrei Shakirin
        2. request.xml
          19 kB
          Andrei Shakirin
        3. request-transformed.xml
          17 kB
          Andrei Shakirin

        Activity

          People

            dkulp Daniel Kulp
            ashakirin Andrei Shakirin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: