Skip to content

Commit df9b35d

Browse files
committed
Don't add AllowCreate for default transient name ids
http://docs.oasis-open.org/security/saml/v2.0/errata05/os/saml-v2.0-errata05-os.html#__RefHeading__8058_1983180497: "The use of the AllowCreate attribute MUST NOT be used and SHOULD be ignored in conjunction with requests for or assertions issued with name identifiers with a Format of urn:oasis:names:tc:SAML:2.0:nameid-format:transient (they preclude any such state in and of themselves)."
1 parent d3aa78e commit df9b35d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/saml2/client_base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ def create_authn_request(self, destination, vorg="", scoping=None,
339339
# If no nameid_format has been set in the configuration
340340
# or passed in then transient is the default.
341341
if nameid_format is None:
342+
# SAML 2.0 errata says AllowCreate MUST NOT be used for
343+
# transient ids - to make a conservative change this is
344+
# only applied for the default cause
345+
allow_create = None
342346
nameid_format = NAMEID_FORMAT_TRANSIENT
343347

344348
# If a list has been configured or passed in choose the

0 commit comments

Comments
 (0)