italia / spid-sp-test

SAML2 SPID/CIE Service Provider validation tool
European Union Public License 1.2
38 stars 17 forks source link

Updated CIE schema to avoid issue on tag order in ContactPerson #149

Open PiemP opened 2 years ago

PiemP commented 2 years ago

Fixes #115

PiemP commented 2 years ago

I have tested my code with some different situations and I have found that remains #121 to fix. The problem is about, when check a private service provider metadata, the code that ask about a ContactPerson as technical. But this is not mandatory. Could exist a private service provider with only one ContactPerson that have attribute contactType set as administrative.

ERROR:spid_sp_test.metadata:The //ContactPerson[@contactType='technical']/EmailAddress element MUST be present
ERROR:spid_sp_test.metadata:Missing ContactPerson/Extensions/Private, this element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_extensions_public_private: The Public element MUST not be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: ContactPerson MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: ("Missing contactType in {'contactType': 'administrative'}: The contactType attribute MUST be present",)
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: The contactType attribute MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: The contactType must be "administrative"
INFO:spid_sp_test.metadata:SpidSpMetadataCheckExtra.test_Contacts_PubPriv: Only one ContactPerson element of contactType "administrative" MUST be present
ERROR:spid_sp_test.metadata:ContactPerson MUST be present
ERROR:spid_sp_test.metadata:Only one ContactPerson element of contactType "technical" MUST be present

I suppose must be implement this test for ContactPerson:

peppelinux commented 2 years ago

Ciao @PiemP

thank you first of all for this precious PR. I have to tell you that the xsd file was shared by collegues in IPZS that work on CIE, so I'm going to ask to them a revision on your contribution