Exception when creating the signature using OpenSAML lib
Brent Putman
putmanb at georgetown.edu
Wed Oct 31 19:04:27 EDT 2012
On 10/31/12 6:55 PM, Yaowen Tu wrote:
>
> Attached is the metadata file I created. When I try to validate it, I
> got the exception.
>
I see that what you've actually signed is the SPSSODescriptor (as
opposed to say the EntityDescriptor). That's fine as far as the SAML
goes, but double-check that you are validating the signature on the
former and not the latter. If you pass in the EntityDescriptor to the
SignatureValidator than naturally you're going to get the error you are
reporting, since the EntityDescriptor is in fact not signed.
> I have been using createSAMLObject in a lot of places, here is the code:
>
> defaultElementName = (QName)classVar.getDeclaredField(
> "DEFAULT_ELEMENT_NAME" ).get( null );
>
Ok. I don't know why you're using reflection that way, it seems awfully
complicated as opposed to just passing in the QName to the method.
Also, be aware that: although I think we're pretty consistent in our use
of the field name "DEFAULT_ELEMENT_NAME" in most interfaces, I can not
guarantee that that is the exact field name we used everywhere, and
especially in some contributed code from 3rd parties.
More information about the dev
mailing list