Skip to content

Commit 94a4f0f

Browse files
author
Roland Hedberg
committed
Should generate 'true'/'false' in xml not 'True'/'False'.
1 parent 817733a commit 94a4f0f

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

src/saml2/md.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,10 +1039,8 @@ class IDPSSODescriptorType_(SSODescriptorType_):
10391039
c_children['{urn:oasis:names:tc:SAML:2.0:assertion}Attribute'] = (
10401040
'attribute', [saml.Attribute])
10411041
c_cardinality['attribute'] = {"min": 0}
1042-
c_attributes['WantAuthnRequestsSigned'] = ('want_authn_requests_signed',
1043-
'boolean', False)
1044-
c_attributes['WantAuthnRequestsOnlyWithValidCert'] = ('want_authn_requests_only_with_valid_cert',
1045-
'boolean', False)
1042+
c_attributes['WantAuthnRequestsSigned'] = (
1043+
'want_authn_requests_signed', 'boolean', False)
10461044
c_child_order.extend(['single_sign_on_service', 'name_id_mapping_service',
10471045
'assertion_id_request_service', 'attribute_profile',
10481046
'attribute'])

src/saml2/metadata.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def do_endpoints(conf, endpoints):
431431
"want_assertions_signed": "true",
432432
"authn_requests_signed": "false",
433433
"want_authn_requests_signed": "false",
434-
"want_authn_requests_only_with_valid_cert": "false",
434+
#"want_authn_requests_only_with_valid_cert": "false",
435435
}
436436

437437

@@ -554,22 +554,13 @@ def do_idpsso_descriptor(conf, cert=None):
554554
idpsso.key_descriptor = do_key_descriptor(cert)
555555

556556
for key in ["want_authn_requests_signed"]:
557+
#"want_authn_requests_only_with_valid_cert"]:
557558
try:
558559
val = conf.getattr(key, "idp")
559560
if val is None:
560-
setattr(idpsso, key, DEFAULT["want_authn_requests_signed"])
561-
else:
562-
setattr(idpsso, key, "%s" % val)
563-
except KeyError:
564-
setattr(idpsso, key, DEFAULTS[key])
565-
566-
for key in ["want_authn_requests_only_with_valid_cert"]:
567-
try:
568-
val = conf.getattr(key, "idp")
569-
if val is None:
570-
setattr(idpsso, key, DEFAULT["want_authn_requests_only_with_valid_cert"])
561+
setattr(idpsso, key, DEFAULT[key])
571562
else:
572-
setattr(idpsso, key, "%s" % val)
563+
setattr(idpsso, key, ("%s" % val).lower())
573564
except KeyError:
574565
setattr(idpsso, key, DEFAULTS[key])
575566

tests/test_20_assertion.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def test_ava_filter_dont_fail():
190190
"default": {
191191
"lifetime": {"minutes": 15},
192192
"attribute_restrictions": None, # means all I have
193+
"fail_on_missing_requested": False
193194
},
194195
"urn:mace:umu.se:saml:roland:sp": {
195196
"lifetime": {"minutes": 5},

0 commit comments

Comments
 (0)