<div dir="auto">Hmmm yeah I pretty much came to the same conclusion. I think I know why as well. As I'm using spring ws it uses jaxb for marshaling and unmarshaling, as a result I'm converting between opensaml objects and jaxb objects.<div dir="auto"><br></div><div dir="auto">I may look into spring ws doing the signing instead of opensaml. </div><div dir="auto"><br></div><div dir="auto">Thanks </div><div dir="auto">Paul </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 24 Apr 2020, 22:44 Brent Putman, <<a href="mailto:putmanb@georgetown.edu">putmanb@georgetown.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p><br>
</p>
<div>On 4/24/20 6:35 AM, Paul Statham wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I have created a simple SOAP service which will accept an
AttributeQuery SAML element in the body of a SOAP envelope.
This works fine, I am now moving on to validating a signed
AttributeQuery. To do this I have created a simple integration
test to build an attribute query, sign it and use a soap
client to send the request.</div>
<div><br>
</div>
<div>The signing is done like so</div>
</div>
</blockquote>
<p><br>
</p>
<p>I don't see any issues with signing and validation code itself.<br>
</p>
<p><br>
</p>
<blockquote type="cite">
<div dir="ltr"><br>
<div><br>
</div>
<div>The validation is failing, it seems that the decoded digest
value is different from the computed digest value, and I can't
for the life of me see why. Any ideas? Here's a sample soap
envelope sent as a request.</div>
</div>
<br>
</blockquote>
<p><br>
</p>
<p>That error pretty much means what it says. The bytes that you
are validating are not the same bytes that were signed. Something
is changing the document between signing and validation, for
example how you are serializing and then deserializing/parsing
it. For example, pretty printing or adding/removing a single
whitespace character will invalidate the signature.<br>
</p>
<p>We have some signature troubleshooting docs here (it's the v2
wiki space, but the info is the same for 3 and 4):</p>
<p><a href="https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUserManSigErrors" target="_blank" rel="noreferrer">https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUserManSigErrors</a></p>
<p>Pay attention to #3, but especially #5. That gives you the
details on how to get logging on what you have signed vs what you
are validating. Figure out the delta(s) between them and then go
from there.<br>
</p>
<p><br>
</p>
</div>
-- <br>
To unsubscribe from this list send an email to <a href="mailto:dev-unsubscribe@shibboleth.net" target="_blank" rel="noreferrer">dev-unsubscribe@shibboleth.net</a></blockquote></div>