Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-482

Attaching an OMElement to a DOM Document does not update its id attributes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.2.17
    • None
    • DOOM
    • None

    Description

      When using Opensaml to marshall a SAML assertion from a soap envelope built with Axiom DOOM, the resulting assertion element cannot be properly copied to a new fresh Document - the copy is successful, however searching the Document for the assertion by its id (Document.getElementById()) returns null.

      It seems that Axiom Document implementation caches the id attributes (under idAttrs field) and these are not updated when a new OMElement is appended to the document.

      Opensaml marshaller uses Document.adoptNode(assertion) API followed by Document.appendNode(assertion) but neither of these update the id attributes in Axiom DocumentImpl so afterwards Document.getElementById(assertionId) returns null.

      I'm not quite certain that this issue is in Axiom, it might as well be in Opensaml. I'm providing a unit test that demonstrates the issue. Similar code is used in Axis2's Rampart security module when storing a processed SAML assertion to its token store.

      Attachments

        1. OpensamlAssertionMarshallTest.zip
          3 kB
          Detelin Yordanov

        Activity

          People

            Unassigned Unassigned
            detyo Detelin Yordanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: