mace-opensaml-users - Re: [OpenSAML] SAML signature validation
Subject: OpenSAML user discussion
List archive
- From: murali mca <>
- To:
- Subject: Re: [OpenSAML] SAML signature validation
- Date: Fri, 20 Nov 2009 04:19:48 +0530 (IST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=N9pexcG0Lviii1kVzYmQ0VZp4hvXmTbcLQarQo8uxtpipUkzVkqZfuPZlFbnjzBIQjxSHxkA01tS1OXur7A5ime3aCEaunOdSAxqM1qbCmzDUwyv7VyPKdSTZLJ/VoMqVkPoVNce8pwzN4lIEoY5LZMLAj9VIpxg3W5SPpVKM8g=;
Hi
Thanks for the response.
Got this fixed after adding the Enveloped signature transform(<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>) to SAML asertion and now I am able to verify the signature for DoS attacks using SAMLSignatureProfileValidator.
However, I am getting "null pointer exception" while retrieving the Credential (signatureToValidate.getSigningCredential();) from signature.
// Validating the signature cryptographically
Signature signatureToValidate = assertion.getSignature();
Credential verificationCredential = signatureToValidate.getSigningCredential(); SignatureValidator sigValidator = new SignatureValidator(verificationCredential); try { sigValidator.validate(signatureToValidate); } catch (ValidationException e) { e.printStackTrace(); } I can see <X509Data><X509Certificate> in my signature. Please help me how to retrieve the credential/public key from X509 cert and validate the signature. Correct me if the above code is wrong.
Below is the SAML:
<Signature>
<SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI="#1bc6d017-f9bd-4333-a618-a73cd4ea51ac"> <Transforms> <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </Transforms> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue>0qnKCEgW2h7yX/1UfkngJXGXxPk=</DigestValue> </Reference> </SignedInfo> <SignatureValue>vgefKC1BZXTeNjUEqU1aGvBfn1HD2WfanLwQPbBd0ywekp7c82plARfaB+fIxrqb6m9wj9bR8MfWkj4vKBxvRA==</SignatureValue> <KeyInfo> <X509Data> <X509Certificate>MIIDPTCCAuegAwIBAgIJAK3Eu7cvpbf4MA0GCSqGSIb3DQEBBQUAMIGdMQswCQYD VQQGEwJHQjEQMA4GA1UECBMHTm9yZm9sazEQMA4GA1UEBxMHTm9yd2ljaDESMBAG A1UEChMJQXZpZA6zIc=.......</X509Certificate> </X509Data> </KeyInfo> </Signature> Thanks for your help
Murali
--- On Thu, 19/11/09, Brent Putman <> wrote:
|
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
- SAML signature validation, murali mca, 11/18/2009
- Re: [OpenSAML] SAML signature validation, Brent Putman, 11/18/2009
- Re: [OpenSAML] SAML signature validation, murali mca, 11/19/2009
- Re: [OpenSAML] SAML signature validation, Brent Putman, 11/19/2009
- Re: [OpenSAML] SAML signature validation, murali mca, 11/22/2009
- Re: [OpenSAML] SAML signature validation, Brent Putman, 11/23/2009
- Re: [OpenSAML] SAML signature validation, murali mca, 11/26/2009
- Re: [OpenSAML] SAML signature validation, Brent Putman, 11/30/2009
- Re: [OpenSAML] SAML signature validation, murali mca, 11/26/2009
- Re: [OpenSAML] SAML signature validation, Brent Putman, 11/23/2009
- Re: [OpenSAML] SAML signature validation, murali mca, 11/22/2009
- Re: [OpenSAML] SAML signature validation, Brent Putman, 11/19/2009
- Re: [OpenSAML] SAML signature validation, murali mca, 11/19/2009
- Re: [OpenSAML] SAML signature validation, Brent Putman, 11/18/2009
Archive powered by MHonArc 2.6.16.