italia / spid-saml-check

Tool di verifica implementazione SPID SAML
European Union Public License 1.2
71 stars 59 forks source link

Invalid response generated if no attribute is requested #139

Closed mauromol closed 3 years ago

mauromol commented 3 years ago

If you try to generate a "correct" Response but you don't check any SPID attribute to be returned to the SP (for instance because the original SP request did not specify any AttributeConsumingServiceIndex), the generated Response is invalid, violating the SAML 2.0 schema, because an empty <saml:AttributeStatement> element is included.

If no attribute are to be returned, no <saml:AttributeStatement> element should be included in the Response.

damikael commented 3 years ago

The fix is here: https://github.com/italia/spid-saml-check/commit/9b29f2bc4c4d7959b6c0cbb8d492d5ca3d609796