Skip to Content.
Sympa Menu

mace-opensaml-users - Re: Bug report: SAML11b / Subject

Subject: OpenSAML user discussion

List archive

Re: Bug report: SAML11b / Subject


Chronological Thread 
  • From: "Tom Scavo" <>
  • To: "Cristian Opincaru" <>
  • Cc:
  • Subject: Re: Bug report: SAML11b / Subject
  • Date: Tue, 31 Oct 2006 09:08:50 -0500
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=krczZuexv8hricyMzcWfaeuJtsjWKSXO8nU0d0qF6UmmO6+ROkwm8b4NhAOIZMNPkJ7NVo30hC9mbKMXmxWIZ9sKzUSMBLeYO3w01u757yUN5OMKHSDimkc77cZJtgpeueD0zTWqN3dfFFnhanoq817uGgmu4jTwmwle48sbpyU=

Cristian, this is good. Are you going to report this bug in bugzilla?

Cheers,
Tom

On 10/31/06, Cristian Opincaru
<>
wrote:
Hi,

When reconstructing a SAML Subject from DOM, the subject is invalid if does
not have a Named Subject. However, the standards says that it must have at
least one of NamedIdentifier, ConfirmationMethod.

I fixed this (added the 2 lines in red in fromDOM), and attached the new
file. Hope this helps!

-----
public void fromDOM(Element e) throws SAMLException {
super.fromDOM(e);

if
(config.getBooleanProperty("org.opensaml.strict-dom-checking")
&& !XML.isElementNamed(e, XML.SAML_NS,"Subject"))
throw new MalformedException("SAMLSubject.fromDOM() requires
saml:Subject at root");

// Look for NameIdentifier.
Element n = XML.getFirstChildElement (e, XML.SAML_NS,
"NameIdentifier");
if (n != null) {
nameId =
(SAMLNameIdentifier)SAMLNameIdentifier.getInstance(n).setParent(this);
n = XML.getNextSiblingElement(n);
} else
n = XML.getFirstChildElement(e, XML.SAML_NS,
"SubjectConfirmation");

// Look for SubjectConfirmation.
if (n != null && XML.isElementNamed(n, XML.SAML_NS,
"SubjectConfirmation")) {
// Iterate over ConfirmationMethods.
Element n2 = XML.getFirstChildElement(n);
while (n2 != null && XML.isElementNamed(n2, XML.SAML_NS,
"ConfirmationMethod") && n2.hasChildNodes()) {
....
-----

Cheers,
Cristian

--
Cristian OPINCARU
University of the Federal Armed Forces Munich
http://www.unibw.de/cristian.opincaru




Archive powered by MHonArc 2.6.16.

Top of Page