<div dir="ltr"><div>Some updates on this problem.</div><div><br></div><div>By not setting the ID on the assertion, which let the signing code do it, it fixed the marshaling breaking the signature problem.</div><div><br></div><div>However, signing the enclosing Response breaks the assertion's signature again with "Signature did not validate against the credential's key" error.</div><div><br></div><div>All the above problem occur on the sender side, which creates and signs the assertion. Even if I remove the response signing, the receiver side still fails to validate the assertion signature with the same error as that caused by signing the response.</div><div><br></div><div>It seemed the signature is vary fragile. Even the seemed "read-only" operations can break it.</div><div><br></div><div>Gang</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 17, 2015 at 3:55 PM, Gang Yang <span dir="ltr"><<a href="mailto:gang.yang@shonborn-becker.com" target="_blank">gang.yang@shonborn-becker.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="color:rgb(0,0,0);font-family:Tahoma;font-size:10pt;direction:ltr">
<p>Hi,</p>
<p> </p>
<p>I'm using OpenSAML 2.5.1-1. When I construct an assertion, sign it and
validate the signature, it all works. However, if I print the assertion by
marshaling it to Element and then String before I validate the signature, it
causes the signature validation to fail with the following exception:</p>
<p> </p><u><font color="#000080" size="2"><font color="#000080" size="2"></font></font></u><font color="#000080" size="2"><font color="#000080" size="2"></font></font>
<p align="left"><font color="#000080" size="2"><font color="#000080" size="2"><u>org.opensaml.xml.validation.ValidationException</u></font></font></p><font size="2">: Apache xmlsec IdResolver could not resolve the Element for id
reference: abcd</font>
<p align="left"><font size="2"></font> </p>
<p align="left"><font size="2">I check the source code history of the code dated
back two years ago, it's the same. I do believe it worked then otherwise I would
not have checked in. Has anyone seen similar problem? Can someone provide some
pointers and suggestions on this issue?</font></p>
<p align="left"><font size="2"></font> </p>
<p align="left"><font size="2">Thanks in advance.</font></p><span class="HOEnZb"><font color="#888888">
<p align="left"> </p>
<p align="left">Gang<font size="2"></font></p></font></span></div><br></div>
</blockquote></div><br></div>