From 4375361939e942c4dd666d3ca4e1159858404bc4 Mon Sep 17 00:00:00 2001 From: Ashima Athri Date: Wed, 5 Oct 2016 17:06:02 -0400 Subject: [PATCH] The ID of each Signature element must be unique If the assertion and response both are signed, both Signatures have an ID of `Signature1`. This creates invalid xml as xs:ID must be unique. This fixes the issue when integrating with onelogin's python3-saml client: Element '{http://www.w3.org/2000/09/xmldsig#}Signature', attribute 'Id': 'Signature1' is not a valid value of the atomic type 'xs:ID'. --- src/saml2/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/saml2/server.py b/src/saml2/server.py index 2dad57f..08d09bf 100644 --- a/src/saml2/server.py +++ b/src/saml2/server.py @@ -476,7 +476,7 @@ class Server(Entity): if not encrypt_assertion: if sign_assertion: assertion.signature = pre_signature_part(assertion.id, - self.sec.my_cert, 1, + self.sec.my_cert, 2, sign_alg=sign_alg, digest_alg=digest_alg) to_sign.append((class_name(assertion), assertion.id))