SPID-PHP-LIB non genera un metadata corretto

Salve. Sto cercando di implementare la spid-php-lib (https://github.com/italia/spid-php-lib) all’interno del mio CMS.

Ho seguito la procedura, scaricando i metadata con il download_idp_metadata.php e generando l’array $settings seguendo le indicazioni presenti nel README.MD.
Ho quindi provato a validare il metadata su demo.spid.gov.it/validator#/metadata-sp-download. Il file viene correttamente caricato ma se provo ad eseguire il “Check strict” ottengo il seguente messaggio:

TypeError: Cannot read property 'entityType' of undefined
    at MetadataParser.isMetadataForOperator (/home/agidroot/spid-saml-check/spid-validator/server/lib/saml-utils.js:422:48)
    at MetadataParser.isMetadataForOpPublicFull (/home/agidroot/spid-saml-check/spid-validator/server/lib/saml-utils.js:455:21)
    at /home/agidroot/spid-saml-check/spid-validator/server/api/metadata-sp.js:258:27
    at Layer.handle [as handle_request] (/home/agidroot/spid-saml-check/spid-validator/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/agidroot/spid-saml-check/spid-validator/server/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/agidroot/spid-saml-check/spid-validator/server/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/agidroot/spid-saml-check/spid-validator/server/node_modules/express/lib/router/layer.js:95:5)
    at /home/agidroot/spid-saml-check/spid-validator/server/node_modules/express/lib/router/index.js:281:22
    at param (/home/agidroot/spid-saml-check/spid-validator/server/node_modules/express/lib/router/index.js:354:14)
    at param (/home/agidroot/spid-saml-check/spid-validator/server/node_modules/express/lib/router/index.js:365:14)

Ho poi trovato il validator spid-sp-test il quale sembra fornirmi maggiori dettagli:

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
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SPSSODescriptor: Only one SPSSODescriptor element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_NameIDFormat_Transient: The NameIDFormat MUST be urn:oasis:names:tc:SAML:2.0:nameid-format:transient
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_xmldsig: the metadata signature MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The Signature element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The SignatureMethod element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The Algorithm attribute MUST be present in SignatureMethod element
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The signature algorithm MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The DigestMethod element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The Algorithm attribute MUST be present in DigestMethod element
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Signature: The digest algorithm MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_KeyDescriptor: At least one signing KeyDescriptor MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_KeyDescriptor: At least one signing x509 MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: One or more SingleLogoutService elements MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Binding attribute in SingleLogoutService element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Binding attribute in SingleLogoutService element MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Binding attribute in SingleLogoutService element MUST be one of [urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST, urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect]
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Location attribute in SingleLogoutService element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Location attribute in SingleLogoutService element MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Location attribute in SingleLogoutService element MUST be a valid HTTP URL
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Binding attribute in SingleLogoutService element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Binding attribute in SingleLogoutService element MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Binding attribute in SingleLogoutService element MUST be one of [urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST, urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect]
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Location attribute in SingleLogoutService element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Location attribute in SingleLogoutService element MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SingleLogoutService: The Location attribute in SingleLogoutService element MUST be a valid HTTP URL
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AssertionConsumerService: At least one AssertionConsumerService MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AssertionConsumerService: The index attribute MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AssertionConsumerService: The index attribute MUST be >= 0
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AssertionConsumerService: The Binding attribute MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AssertionConsumerService: The Binding attribute MUST be one of [urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST, urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect]
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AssertionConsumerService: The Location attribute MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService: One or more AttributeConsumingService elements MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: Only one Organization element can be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: One or more OrganizationName elements MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: The lang attribute in OrganizationName element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: The OrganizationName element MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: One or more OrganizationDisplayName elements MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: The lang attribute in OrganizationDisplayName element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: The OrganizationDisplayName element MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: One or more OrganizationURL elements MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: The lang attribute in OrganizationURL element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: The OrganizationURL element MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: The elements OrganizationName, OrganizationDisplayName and OrganizationURL MUST have the same number of lang attributes
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Organization: The elements OrganizationName, OrganizationDisplayName and OrganizationURL MUST have at least an it language enabled
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.xsd_check: SpidSpMetadataCheck.xsd_check
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SPSSODescriptor_SPID: The protocolSupportEnumeration attribute MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SPSSODescriptor_SPID: The protocolSupportEnumeration attribute MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SPSSODescriptor_SPID: The AuthnRequestsSigned attribute MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SPSSODescriptor_SPID: The AuthnRequestsSigned attribute MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_SPSSODescriptor_SPID: The AuthnRequestsSigned attribute MUST be true
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AssertionConsumerService_SPID: Only one default AssertionConsumerService MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AssertionConsumerService_SPID: Must be present the default AssertionConsumerService with index = 0
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The index attribute in AttributeConsumigService element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The index attribute in AttributeConsumigService element MUST be >= 0
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The ServiceName element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The ServiceName element MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: One or more RequestedAttribute elements MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The Name attribute in RequestedAttribute element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The "name" attribute in RequestedAttribute element MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The Name attribute in RequestedAttribute element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The "familyName" attribute in RequestedAttribute element MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The Name attribute in RequestedAttribute element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The "fiscalNumber" attribute in RequestedAttribute element MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The Name attribute in RequestedAttribute element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The "email" attribute in RequestedAttribute element MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: AttributeConsumigService MUST not contain duplicated RequestedAttribute
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The index attribute in AttributeConsumigService element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The index attribute in AttributeConsumigService element MUST be >= 0
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The ServiceName element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The ServiceName element MUST have a value
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: One or more RequestedAttribute elements MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The Name attribute in RequestedAttribute element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The "name" attribute in RequestedAttribute element MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The Name attribute in RequestedAttribute element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The "familyName" attribute in RequestedAttribute element MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The Name attribute in RequestedAttribute element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The "fiscalNumber" attribute in RequestedAttribute element MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The Name attribute in RequestedAttribute element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The "email" attribute in RequestedAttribute element MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The Name attribute in RequestedAttribute element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: The "spidCode" attribute in RequestedAttribute element MUST be valid
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_AttributeConsumingService_SPID: AttributeConsumigService MUST not contain duplicated RequestedAttribute
ERROR:spid_sp_test.metadata:The //ContactPerson[@contactType='other']/EmailAddress element MUST be present
ERROR:spid_sp_test.metadata:ContactPerson MUST be present
ERROR:spid_sp_test.metadata:Only one ContactPerson element of contactType "other" MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_Extensions_PubPriv: The Company element MUST be present None
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_extensions_type: The //ContactPerson[@contactType='other']/Extensions/PublicServicesFullAggregator element MUST not be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_extensions_type: The //ContactPerson[@contactType='other']/Extensions/PublicServicesLightAggregator element MUST not be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_extensions_type: The //ContactPerson[@contactType='other']/Extensions/PrivateServicesFullAggregator element MUST not be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_extensions_type: The //ContactPerson[@contactType='other']/Extensions/PrivateServicesLightAggregator element MUST not be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_extensions_type: The //ContactPerson[@contactType='other']/Extensions/PublicServicesFullOperator element MUST not be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_extensions_type: The //ContactPerson[@contactType='other']/Extensions/PublicServicesLightOperator element MUST not be present
ERROR:spid_sp_test.metadata:The //ContactPerson[@contactType='other']/Extensions/Public element MUST be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_extensions_type: The //ContactPerson[@contactType='other']/Extensions/Private element MUST not be present
INFO:spid_sp_test.metadata:SpidSpMetadataCheck.test_extensions_type: The //ContactPerson[@contactType='other']/Extensions/PublicOperator element MUST not be present
Spid QA: executed 99 tests, 4 failed. 0 warnings.

Suggerimenti?

1 Mi Piace

Anche io riscontro lo stesso problema. La documentazione non aiuta. Qualcuno sa qualcosa di più?