Assertion AttributeStatements must be non-empty
authorJohn Dennis <jdennis@redhat.com>
Wed, 18 Mar 2015 21:14:07 +0000 (17:14 -0400)
committerRob Crittenden <rcritten@redhat.com>
Wed, 18 Mar 2015 21:49:43 +0000 (17:49 -0400)
commitb5730c293fc532fffd3f3300a14813027c4242ae
tree7fb66e300fafb0292b3637e4a401b080caa401f7
parent7f146bcbe3ae20db27e2daf294c19a40ccd419e6
Assertion AttributeStatements must be non-empty

The saml-core-2.0-os specification section 2.7.3 requires
the AttributeStatement element to be non-empty. Shibboleth verifies
this and rejects assertions that do not comply. We gather attributes
into a local dict first before adding them to the AttributeStatement
so the fix is easy. Test if the dict is empty, move the initialization
of the assertion AttributeStatement inside the test so it's
conditional on whether the dict has members.

https://fedorahosted.org/ipsilon/ticket/61

Signed-off-by: John Dennis <jdennis@redhat.com>
Reviewed-by: Nathan Kinder <nkinder@redhat.com>
ipsilon/providers/saml2/auth.py