Skip to Content.
Sympa Menu

mace-opensaml-users - [OpenSAML] Validate Signature sent via HTTPRedirect

Subject: OpenSAML user discussion

List archive

[OpenSAML] Validate Signature sent via HTTPRedirect


Chronological Thread 
  • From: John Gonzales <>
  • To:
  • Subject: [OpenSAML] Validate Signature sent via HTTPRedirect
  • Date: Mon, 14 Feb 2011 21:13:59 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=lxjOS/yRs3YQ4Pe1f66BBiSDZoC1WR+DaOz1UAV/xPGVQJXipWXNRxt/GbkZ+9yXl2 bTOF5CqEuygWdVPN15raDTtFBUWwQ+sn+sWRoJKazMOs5hRWp3M6DfHaLPJcFwp6KZmL GGuN5jqKzfObdqcmES5K0aFPmGe0H51+UgHTw=

Hi all,

I'm trying to validate a signature that is being sent along with a SAMLResponse to my service provider via the HTTPRedirect protocol binding.

I have successfully decoded the SAMLResponse and now I want to validate the signature. I used this Wiki document as my guide: https://spaces.internet2.edu/display/OpenSAML/OSTwoUserManJavaDSIG

My code is pretty much the same as the low-level validation example, but here it is anyway:

SignatureValidator signatureValidator = new SignatureValidator(SAMLCredentialManager.getInstance().getIdentityProviderSigningCredential(null));

try {
signatureValidator.validate(samlResponse.getSignature());
return true;
} catch (ValidationException e) {
log.error("Signature is invalid", e);
}

return false;

I used HTTPRedirectDeflateDecoder to create the samlResponse object.

However, when signatureValidator.validate() executes, I get a NullPointerException being thrown because the value of samlResponse.getSignature() is null.

Any suggestions?



Archive powered by MHonArc 2.6.16.

Top of Page