File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1048,18 +1048,27 @@ def discojson_sp_attr(e):
1048
1048
return None
1049
1049
1050
1050
entityID = e .get ('entityID' , None )
1051
- if entityID is None :
1052
- return None
1053
-
1054
1051
sp = {}
1055
1052
sp ['entityID' ] = entityID
1056
1053
sp ['profiles' ] = {}
1054
+ sp ['extra_md' ] = {}
1057
1055
1058
1056
for b64_trustinfo in b64_trustinfos :
1059
1057
try :
1060
1058
str_trustinfo = b64decode (b64_trustinfo .encode ('ascii' ))
1061
1059
trustinfo = json .loads (str_trustinfo .decode ('utf8' ))
1062
- sp ['profiles' ].update (trustinfo ['profiles' ])
1060
+ for profile in trustinfo ['profiles' ]:
1061
+ if profile in sp ['profiles' ]:
1062
+ log .warning (f"SP Entity { entityID } has a duplicate trust profile { profile } " )
1063
+ else :
1064
+ sp ['profiles' ][profile ] = trustinfo ['profiles' ][profile ]
1065
+
1066
+ if 'extra_md' in trustinfo :
1067
+ for extra_id in trustinfo ['extra_md' ]:
1068
+ if extra_id in sp ['extra_md' ]:
1069
+ log .warning (f"SP Entity { entityID } has a duplicate extra IdP metadata { extra_id } " )
1070
+ else :
1071
+ sp ['extra_md' ][extra_id ] = trustinfo ['extra_md' ][extra_id ]
1063
1072
1064
1073
except Exception as e :
1065
1074
log .warning (f"Invalid entity-selection-profile attribute for { entityID } : { e } " )
You can’t perform that action at this time.
0 commit comments