Exception when creating the signature using OpenSAML lib

Yaowen Tu yaowen.tu at gmail.com
Wed Oct 31 19:23:47 EDT 2012


1. I am not sure how to check if I am passing EntityDescriptor or
SPSSODescriptor. In the code sample of the wiki:

       Credential verificationCredential =
getVerificationCredential(response);
       SignatureValidator sigValidator = new
SignatureValidator(verificationCredential);
  The SignatureValidator only need a credential. I think as long as I get
the credential under SPSSODescriptor, that should be fine. Is that correct?

2. Thanks for you reminds, I understand your concern. I will change it
later.

Yaowen


On Wed, Oct 31, 2012 at 4:04 PM, Brent Putman <putmanb at georgetown.edu>wrote:

>
> 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.
> --
> To unsubscribe from this list send an email to
> dev-unsubscribe at shibboleth.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/dev/attachments/20121031/08cbbc21/attachment.html 


More information about the dev mailing list