diff options
author | Johan Lundberg <lundberg@sunet.se> | 2020-12-10 16:22:47 +0100 |
---|---|---|
committer | Johan Lundberg <lundberg@sunet.se> | 2020-12-10 16:22:47 +0100 |
commit | 7aec47383e7eeb12912bacc99c3d1017bd2ee15e (patch) | |
tree | 9da7e5264e624fcec1b9c9dff82f5791c3fa8d1c | |
parent | ddc2b5253b60a0e665aaac65f2772a4481a7f1b1 (diff) | |
download | pysaml2-7aec47383e7eeb12912bacc99c3d1017bd2ee15e.tar.gz |
Update of SWAMID policy regarding eduPersonTargetedID
According to SWAMID policy no attributes should be released when
entitity category is missing
-rw-r--r-- | src/saml2/entity_category/swamid.py | 2 | ||||
-rw-r--r-- | tests/test_37_entity_categories.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/saml2/entity_category/swamid.py b/src/saml2/entity_category/swamid.py index a997d556..0842fc55 100644 --- a/src/saml2/entity_category/swamid.py +++ b/src/saml2/entity_category/swamid.py @@ -71,7 +71,7 @@ NREN = 'http://www.swamid.se/category/nren-service' # Deprecated from 2 HEI = 'http://www.swamid.se/category/hei-service' # Deprecated from 2021-03-31 RELEASE = { - '': ['eduPersonTargetedID'], + '': [''], SFS_1993_1153: ['norEduPersonNIN', 'eduPersonAssurance'], (RESEARCH_AND_EDUCATION, EU): NAME + STATIC_ORG_INFO + OTHER, (RESEARCH_AND_EDUCATION, NREN): NAME + STATIC_ORG_INFO + OTHER, diff --git a/tests/test_37_entity_categories.py b/tests/test_37_entity_categories.py index a24a4feb..4ede68d6 100644 --- a/tests/test_37_entity_categories.py +++ b/tests/test_37_entity_categories.py @@ -102,7 +102,7 @@ def test_filter_ava3(): } ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp") - assert _eq(list(ava.keys()), ['eduPersonTargetedID', "norEduPersonNIN"]) + assert _eq(list(ava.keys()), ["norEduPersonNIN"]) def test_filter_ava4(): @@ -131,7 +131,7 @@ def test_filter_ava4(): ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp") assert _eq( - list(ava.keys()), ['eduPersonTargetedID', "givenName", "c", "mail", "sn"] + list(ava.keys()), ["givenName", "c", "mail", "sn"] ) @@ -160,7 +160,7 @@ def test_filter_ava5(): ava = policy.filter(ava, "urn:mace:example.com:saml:roland:sp") - assert _eq(list(ava.keys()), ['eduPersonTargetedID']) + assert _eq(list(ava.keys()), []) def test_idp_policy_filter(): |