mace-opensaml-users - Re: SAML response missing "samlp" namespace
Subject: OpenSAML user discussion
List archive
- From: "Shannon Kendrick" <>
- To: "Scott Cantor" <>, <>
- Subject: Re: SAML response missing "samlp" namespace
- Date: Tue, 25 Feb 2003 09:58:05 -0500
Scott,
Maybe I'm missing a step, but when I do the following:
SAMLResponse samlResponse = SAMLPOSTProfile.prepare("recipient", "issuer",
null, "name", null, null, null, "urn:oasis:names:tc:SAML:1.0:am:password",
authInstant, null);
System.out.println("SAMLResponse:\n" + samlResponse.toString());
I get the following output:
<Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol"
xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"
IssueInstant="2003-02-25T14:41:43Z" MajorVersion="1" MinorVersion="0"
Recipient="recipient" ResponseID="78ea0d7a-675e-48ed-a2b1-a84e1a32dd14">
<Status>
<StatusCode Value="samlp:Success"/>
</Status>
<Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion"
AssertionID="15e21abc-8bad-4c55-a5e8-9017daf541f5"
IssueInstant="2003-02-25T14:41:43Z" Issuer="issuer" MajorVersion="1"
MinorVersion="0">
<Conditions NotBefore="2003-02-25T14:41:43Z"
NotOnOrAfter="2003-02-25T14:46:43Z"/>
<AuthenticationStatement AuthenticationInstant="2003-02-25T14:41:43Z"
AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
<Subject>
<NameIdentifier>name</NameIdentifier>
<SubjectConfirmation>
<ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</ConfirmationMetho
d>
</SubjectConfirmation>
</Subject>
</AuthenticationStatement>
</Assertion>
</Response>
Notice a couple of things about the XML:
<?xml version="1.0" encoding="UTF-8"?> is missing at the start of the XML.
<Response> should be <samlp:Response>
Additionally I get the following message when I try to decode the message.
The following statement:
SAMLResponse samlResponse =
SAMLPOSTProfile.accept(samlRespBase64.getBytes(), "recipient", 10);
produces:
SAMLPOSTProfile.accept() detected an XML parsing error: cvc-elt.1: Cannot
find the declaration of element 'Response'.
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
element 'Response'.
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
org.opensaml.SAMLException(java.lang.String)
org.opensaml.SAMLException(org.opensaml.QName, java.lang.String)
org.opensaml.SAMLException(org.opensaml.QName, java.lang.String,
java.lang.Exception)
org.opensaml.SAMLResponse org.opensaml.SAMLPOSTProfile.accept(byte [],
java.lang.String, int)
Shannon Kendrick
----- Original Message -----
From: "Scott Cantor"
<>
To: "'Shannon Kendrick'"
<>;
<>
Sent: Monday, February 24, 2003 5:31 PM
Subject: RE: SAML response missing "samlp" namespace
> > I get well-formed XML when I call the "toString()" method of
> > SAMLResponse, but I do not see the "samlp" in the element
> > namespace (e.g. "<samlp:Response>"). Instead I see
> > "<Response>". I haven't yet attempted to digitally sign the
> > reponse, so I wonder if the "samlp" occurs during canonicalization.
>
> I generally declare a default namespace (for better or for worse) and
override it when necessary. As far as I know, what's in cvs
> generates valid XML in all the cases I know of, both Java and C++. The
Java serializes to exclusive c14n in every case, and there's
> an Init class method to get/set the inclusive prefix list.
>
> As long as the prefix list is correct, it shouldn't matter what the XML is
contained in when it serializes, the output should be
> consistent.
>
> -- Scott
>
---------------------------------------------------mace-opensaml-users-+
For list utilities, archives, subscribe, unsubscribe, etc. please visit the
ListProc web interface at
http://archives.internet2.edu/
---------------------------------------------------mace-opensaml-users--
- SAML response missing "samlp" namespace, Shannon Kendrick, 02/24/2003
- RE: SAML response missing "samlp" namespace, Scott Cantor, 02/24/2003
- Re: SAML response missing "samlp" namespace, Shannon Kendrick, 02/25/2003
- RE: SAML response missing "samlp" namespace, Scott Cantor, 02/25/2003
- Re: SAML response missing "samlp" namespace, Shannon Kendrick, 02/25/2003
- RE: SAML response missing "samlp" namespace, Scott Cantor, 02/24/2003
Archive powered by MHonArc 2.6.16.