italia / spid-sp-test

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

ContactPerson validation issues when profile is spid-sp-ag-public-full #80

Closed mauromol closed 3 years ago

mauromol commented 3 years ago

When validating metadata in spid-sp-ag-public-full profile mode, validation of ContactPerson elements is wrong.

See: https://github.com/italia/spid-sp-test/blob/10917dd825856e838944b0395972b2ff37cac345/src/spid_sp_test/metadata.py#L746

Here you're searching for a ContactPerson having the contactType attribute equal to aggregator. The right query, however, is: search for a ContactPerson having the contactType attribute equal to other and the entityType attribute equal to spid:aggregator. The same stands for the following query (regarding the aggregated entity). After all, the comments on the previous lines say it correctly.

The same problem applies to the other aggregator profiles: https://github.com/italia/spid-sp-test/blob/10917dd825856e838944b0395972b2ff37cac345/src/spid_sp_test/metadata.py#L770 https://github.com/italia/spid-sp-test/blob/10917dd825856e838944b0395972b2ff37cac345/src/spid_sp_test/metadata.py#L792 https://github.com/italia/spid-sp-test/blob/10917dd825856e838944b0395972b2ff37cac345/src/spid_sp_test/metadata.py#L811