italia / spid-sp-test

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

Exception spid_sp_test.AbstractSpidCheck.handle_result() got multiple values for keyword argument 'description' #95

Closed bfabio closed 3 years ago

bfabio commented 3 years ago

spid-sp-test v0.9.12 raises the following exception when trying to validate this metadata

$ spid_sp_test --metadata-url file:///home/fabio/dev/spid-sp-test/metadata 
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.xsd_check: SpidSpMetadataCheck.xsd_check
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_EntityDescriptor: Only one EntityDescriptor element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_EntityDescriptor: The entityID attribute MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_EntityDescriptor: The entityID attribute MUST have a value
ERROR:spid_sp_test.metadata:SpidSpMetadataCheck.test_SPSSODescriptor: Only one SPSSODescriptor element MUST be present
ERROR:spid_sp_test.metadata:Only one SPSSODescriptor element MUST be present
ERROR:spid_sp_test.metadata:SpidSpMetadataCheck.test_xmldsig: the metadata signature MUST be valid
stderr: Error: failed to find default node with name="Signature"
Error: failed to load document "/tmp/tmpqxktg_0t.xml"
ERROR
SignedInfo References (ok/all): 0/0
Manifests References (ok/all): 0/0
Error: failed to verify file "/tmp/tmpqxktg_0t.xml"

ERROR:spid_sp_test.metadata:the metadata signature MUST be valid
stderr: Error: failed to find default node with name="Signature"
Error: failed to load document "/tmp/tmpqxktg_0t.xml"
ERROR
SignedInfo References (ok/all): 0/0
Manifests References (ok/all): 0/0
Error: failed to verify file "/tmp/tmpqxktg_0t.xml"

ERROR:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The Signature element MUST be present
ERROR:spid_sp_test.metadata:The Signature element MUST be present
ERROR:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The SignatureMethod element MUST be present
ERROR:spid_sp_test.metadata:The SignatureMethod element MUST be present
ERROR:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The Algorithm attribute MUST be present in SignatureMethod element
ERROR:spid_sp_test.metadata:The Algorithm attribute MUST be present in SignatureMethod element
Traceback (most recent call last):
  File "/home/fabio/dev/spid-sp-test/env/bin/spid_sp_test", line 294, in <module>
    selective_run(metadata_check, profile, args.list)
  File "/home/fabio/dev/spid-sp-test/env/bin/spid_sp_test", line 32, in selective_run
    method()
  File "/home/fabio/dev/spid-sp-test/env/lib/python3.9/site-packages/spid_sp_test/metadata.py", line 822, in test_profile_spid_sp_public
    self.test_profile_spid_sp()
  File "/home/fabio/dev/spid-sp-test/env/lib/python3.9/site-packages/spid_sp_test/metadata.py", line 807, in test_profile_spid_sp
    self.test_profile_saml2core()
  File "/home/fabio/dev/spid-sp-test/env/lib/python3.9/site-packages/spid_sp_test/metadata.py", line 799, in test_profile_saml2core
    self.test_Signature()
  File "/home/fabio/dev/spid-sp-test/env/lib/python3.9/site-packages/spid_sp_test/metadata.py", line 305, in test_Signature
    self.handle_result(
TypeError: spid_sp_test.AbstractSpidCheck.handle_result() got multiple values for keyword argument 'description'
peppelinux commented 3 years ago

I have to be honest, I never seen an SP metadata without the SPSSO descriptor :) thank you for this issue, another bug was found and patched

I must have a full coverage of all the checks for v1.0.0 release, hope to get a good time for doing this