mace-opensaml-users - Re: [OpenSAML] SAMLResponse signature verification
Subject: OpenSAML user discussion
List archive
- From: JC Estienney <>
- To:
- Subject: Re: [OpenSAML] SAMLResponse signature verification
- Date: Wed, 10 Mar 2010 09:26:37 +0100
Hi,
Please excuse this late answer, my responses was rejected because of
their size.
So i tunk it this time dropping the assertions samples..
I found the problème : as you suggested it the SAMLResponse was altered
: by a "printed function :-("
A mashalling operation on the assersion between the Response object
contsruction and the verification had broken this object.
I got the assertion and marshall it to print it but a lot of elements of
the assertion was droped from the response object.
A sample (without signature verification) :
String fic_response = "response.txt";
//Logger logger =
LoggerFactory.getLogger(PbVerifSAML.class.getName());
//logger.info(PbVerifSAML.class.getName());
// Init Config OpenSAML
DefaultBootstrap.bootstrap();
// Configuration du processeur de serialisation
unmarshallerFactory = Configuration.getUnmarshallerFactory();
// Lecture le la reponse SAML et parsing
// Get parser pool manager
BasicParserPool ppMgr = new BasicParserPool();
ppMgr.setNamespaceAware(true);
InputStream is = new ByteArrayInputStream(
Base64.decodeFromFile(fic_response) );
Document inCommonMDDoc = ppMgr.parse(is);
Element racine = inCommonMDDoc.getDocumentElement();
// Preparation de la deserialisation de la racine du doc
Unmarshaller unmarshaller =
unmarshallerFactory.getUnmarshaller(racine);
Response reponseSAML = (Response)
unmarshaller.unmarshall(racine);
System.out.println("Destination : " +
reponseSAML.getDestination());
System.out.println(XMLHelper.prettyPrintXML(reponseSAML.getDOM()));
System.out.println(XMLHelper.prettyPrintXML(reponseSAML.getSignature().getDOM()));
Assertion assertion =
(Assertion)reponseSAML.getAssertions().get(0);
//Validation structurelle de l'assertion SAML
assertion.validate(true);
AssertionMarshaller marshaller = new AssertionMarshaller();
// HERE IS THE PB
Element element = marshaller.marshall(assertion);
// THE object reponseSAML is altered
System.out.println(XMLHelper.prettyPrintXML(element));
System.out.println(XMLHelper.prettyPrintXML(reponseSAML.getSignature().getDOM()));
// THE output is different 2
If i get the assertion after signature verification. it is OK
Excuse me for the inconvenience (and for my english)
JC Estienney
*****************************************************
"Le contenu de ce courriel et ses eventuelles pièces jointes sont
confidentiels. Ils s'adressent exclusivement à la personne destinataire. Si
cet envoi ne vous est pas destiné, ou si vous l'avez reçu par erreur, et afin
de ne pas violer le secret des correspondances, vous ne devez pas le
transmettre à d'autres personnes ni le reproduire. Merci de le renvoyer à
l'émetteur et de le détruire.
Attention : L'Organisme de l'émetteur du message ne pourra être tenu
responsable de l'altération du présent courriel. Il appartient au
destinataire de vérifier que les messages et pièces jointes reçus ne
contiennent pas de virus. Les opinions contenues dans ce courriel et ses
éventuelles pièces jointes sont celles de l'émetteur. Elles ne reflètent pas
la position de l'Organisme sauf s'il en est disposé autrement dans le présent
courriel."
******************************************************
begin:vcard fn;quoted-printable:ESTIENNEY Jean-C=C3=B4me n;quoted-printable:Jean-C=C3=B4me;ESTIENNEY email;internet: tel;work:02 41 79 66 99 x-mozilla-html:FALSE version:2.1 end:vcard
- SAMLResponse signature verification, jc . estienney, 03/02/2010
- Re: [OpenSAML] SAMLResponse signature verification, Brent Putman, 03/02/2010
- Re: [OpenSAML] SAMLResponse signature verification, JC Estienney, 03/04/2010
- Re: [OpenSAML] SAMLResponse signature verification, Brent Putman, 03/04/2010
- Re: [OpenSAML] SAMLResponse signature verification, JC Estienney, 03/10/2010
- Re: [OpenSAML] SAMLResponse signature verification, Brent Putman, 03/10/2010
- RE: [OpenSAML] SAMLResponse signature verification, Scott Cantor, 03/10/2010
- Message not available
- Re: [OpenSAML] SAMLResponse signature verification, JC Estienney, 03/11/2010
- Yet another signature verification problem, Tom Delorenzi, 03/16/2010
- Re: [OpenSAML] Yet another signature verification problem, Chad La Joie, 03/16/2010
- RE: [OpenSAML] Yet another signature verification problem, Tom Delorenzi, 03/16/2010
- Re: [OpenSAML] Yet another signature verification problem, Brent Putman, 03/16/2010
- RE: [OpenSAML] Yet another signature verification problem, Tom Delorenzi, 03/16/2010
- Re: [OpenSAML] SAMLResponse signature verification, Brent Putman, 03/10/2010
- Re: [OpenSAML] SAMLResponse signature verification, JC Estienney, 03/10/2010
- Re: [OpenSAML] SAMLResponse signature verification, Brent Putman, 03/04/2010
- Re: [OpenSAML] SAMLResponse signature verification, JC Estienney, 03/04/2010
- Re: [OpenSAML] SAMLResponse signature verification, Brent Putman, 03/02/2010
Archive powered by MHonArc 2.6.16.