Marshalling a SAML assertion into a new Document loses its ID
detelinyordanov at gmail.com
detelinyordanov at gmail.com
Thu Feb 4 04:04:08 EST 2016
Hi,
I have encountered an issue in Opensaml when marshalling an existing
SAML assertion into a newly created empty Document. Apparently
AbstractXMLObjectMarshaller.marshall(assertion, Document) uses
Document.adoptNode() followed by Document.appendNode(..) but neither of
these preserve the IDness of the assertion and if
Document.getElementById(assertionId) is used on the resulting document, it
returns null.
I have initially reported this issue in Axiom (AXIOM-482
<https://issues.apache.org/jira/browse/AXIOM-482>), thinking that it might
be caused by Axiom DOM implementation, but then I noticed it is
reproducible with Xerces as well and I saw that Xerces folks do not
consider this a bug in Xerces DOM implementation - they argue that
according to spec, the adoptNode() is not required to preserve the ID
attributes, see XERCESJ-1022
<https://issues.apache.org/jira/browse/XERCESJ-1022> and respective
discussion:
importNode()/adoptNode() and getElementById()
<https://mail-archives.apache.org/mod_mbox/xerces-j-users/200701.mbox/%3C20070125062002.01E3310FB003@herse.apache.org%3E>
Does this mean that this is a bug in Opensaml/Xmltooling and Xmltooling
node adoption code is required to ensure the ID attributes are preserved
when marshalling into a new Document?
Regards,
Detelin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20160204/11307ce7/attachment.html>
More information about the dev
mailing list