Skip to Content.
Sympa Menu

mace-opensaml-users - Validation problems

Subject: OpenSAML user discussion

List archive

Validation problems


Chronological Thread 
  • From: Thomas <>
  • To: "OpensSAML Mailing List" <>
  • Subject: Validation problems
  • Date: Fri, 11 Aug 2006 18:59:44 +0100

Hello,

I'm trying to validate an SAML document I made with opensaml library (2.0 trunk java version) but I'm getting a NullPointerException during the process.
Here is the code I'm using:


...
unmarshaller = factory.getUnmarshaller( assertionRoot );
assertion = unmarshaller.unmarshall( assertionRoot );
validatorSuite = Configuration.getValidatorSuite( "saml2-core-schema-validator" );
validatorSuite.validate( assertion );
...


The exception I get is:


Exception in thread "main" java.lang.NullPointerException
at org.opensaml.xml.validation.ValidatorSuite.validate(ValidatorSuite.java:83)
at org.opensaml.xml.validation.ValidatorSuite.validate(ValidatorSuite.java:84)
at Test.validate(Test.java:362)
at Test.main(Test.java:75)


I'm trying to validate the attached SAML document, but also with a simpler document (with only the elements assertion, issuer and subject) I get the same error. Do I need to configure a different validator suite? And do I need to make a validator for the attributeValue and ds:keyInfo elements? Thanks for your help.

Thomas
<?xml version="1.0" encoding="UTF-8"?><saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="OPENSAML-ID-_14aff40effc3eb052694ede43215679b" IssueInstant="2006-08-11T17:43:19.406Z" Version="2.0"><saml:Issuer>DoG's Key</saml:Issuer><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:Reference URI="#OPENSAML-ID-_14aff40effc3eb052694ede43215679b" xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#";><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"; PrefixList="ds saml xs"/></ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"; xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
<ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>Ro05Ph3q69CY42ZjNLC5gclgUP9aAfCQuKA6PTTtHn4=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
mmBfAKxtDDFq50rawIanfVJWRQo5s3aw7cbV2GX/pyXHvraacSi6ER7EmBVk2WGzvFDlYSUk8RVo
ekjmPI5nKXddD2NYoUhNWxATBwbI+6nrElK6Ko4RzqyhWuiMmF3jE1YxBJfXTJW5FkKdZGexaf7+
CRkCQjRy8q5NlqeFkeo=
</ds:SignatureValue>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:KeyValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:RSAKeyValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:Modulus xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
oDdDO3mlxYMOc/D6wqSOvrtTcmZIEtkaHNc41n2M0KOiwCUQu3whJpcQhbU99EjPd0Ghp+liYzA+
WRHZ1mncONRcxcbzpM/1KorjxplstXNwkDnYg/rKllSU1zQIEuo6qh/C1HN57pMP8IRbGvl/DTho
2BhSN4Hxy1Xy8PkHKxE=
</ds:Modulus>
<ds:Exponent xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>AQAB</ds:Exponent>
</ds:RSAKeyValue>
</ds:KeyValue>
</ds:KeyInfo>
</ds:Signature><saml:Subject><saml:NameID NameQualifier="mackdk">r3vind</saml:NameID></saml:Subject><saml:Conditions NotOnOrAfter="2006-09-30T18:30:00.000Z"/><saml:AttributeStatement><saml:Attribute Name="NameID"><saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:type="xs:string">Massimo</saml:AttributeValue></saml:Attribute></saml:AttributeStatement></saml:Assertion>


  • Validation problems, Thomas, 08/11/2006

Archive powered by MHonArc 2.6.16.

Top of Page