From 20743a57a8bfa7cccdfd8850938f0d3874ea1eba Mon Sep 17 00:00:00 2001 From: Johan Wassberg Date: Thu, 17 Oct 2024 12:08:54 +0200 Subject: [PATCH 1/2] We operate on the internal attributes Which is in most common case stored in lower case --- src/eduid/satosa/scimapi/static_attributes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eduid/satosa/scimapi/static_attributes.py b/src/eduid/satosa/scimapi/static_attributes.py index 742c4e243..b0204fdc9 100644 --- a/src/eduid/satosa/scimapi/static_attributes.py +++ b/src/eduid/satosa/scimapi/static_attributes.py @@ -38,7 +38,7 @@ class AddStaticAttributesForVirtualIdp(ResponseMicroService): static_appended_attributes_for_virtual_idp: default: virtual_idp_1: - eduPersonAssurance: + edupersonassurance: - https://refeds.org/assurance/ATP/ePA-1m - https://refeds.org/assurance/IAP/local-enterprise ``` From ae4cc76ecf2a6705690ecb794d2f9e1f7229a0e8 Mon Sep 17 00:00:00 2001 From: Johan Wassberg Date: Thu, 17 Oct 2024 12:10:31 +0200 Subject: [PATCH 2/2] Make sure to always "append" configured values --- src/eduid/satosa/scimapi/static_attributes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/eduid/satosa/scimapi/static_attributes.py b/src/eduid/satosa/scimapi/static_attributes.py index b0204fdc9..d5e37032d 100644 --- a/src/eduid/satosa/scimapi/static_attributes.py +++ b/src/eduid/satosa/scimapi/static_attributes.py @@ -75,6 +75,9 @@ def _build_static(self, requester: str, vidp: str, existing_attributes: dict) -> if value not in fmt: static_attributes[attr_name].append(value) static_attributes[attr_name].sort() + else: + static_attributes[attr_name] = fmt + logger.debug(f"Appending static attribute {attr_name}: {fmt} for requester {requester} or {vidp}")