ministero-salute / it-fse-support

https://ministero-salute.github.io/it-fse-support/
34 stars 20 forks source link

Crash program - Eliminazione documento in errore - RDA (Sardegna) <> RDE (Veneto) #1282

Open ppalmerini opened 1 week ago

ppalmerini commented 1 week ago

Buongiorno, tentando di eliminare un documento precedentemente validato e usato con successo per una sostituzione riceviamo un errore generico: { "traceID": "9de9b6e90a96bcfb", "spanID": "fff62a9b3d4ac67a", "type": "/errors", "title": "Generic", "detail": "", "instance": "error/generic" }

Recuperando lo status per traceID otteniamo: { "traceID": "9de9b6e90a96bcfb", "spanID": "fff62a9b3d4ac67a", "type": "/errors", "title": "Generic", "detail": "", "instance": "error/generic" }

Questo il servizio di eliminazione chiamato: https://modipa-val.fse.salute.gov.it/govway/rest/in/FSE/gateway/v1/documents/2.16.840.1.113883.2.9.2.50.4.4%5E20241115104034

Il documento che si sta tentando di eliminare ha workflowInstanceId associato: 2.16.840.1.113883.2.9.2.50.2.12345.4.4.2.b8b8f4efe0628dd92d7fae6cff3ec288f66b8b89c59c7074b8b10cb965f6768a.e957b05d2e^^^^urn:ihe:iti:xdw:2013:workflowInstanceId e stato { "eventType": "SEND_TO_INI", "eventDate": "2024-11-15T10:40:27.471+01:00", "eventStatus": "SUCCESS", "workflowInstanceId": "2.16.840.1.113883.2.9.2.50.2.12345.4.4.2.b8b8f4efe0628dd92d7fae6cff3ec288f66b8b89c59c7074b8b10cb965f6768a.e957b05d2e^^^^urn:ihe:iti:xdw:2013:workflowInstanceId", "expiringDate": "2025-11-15T10:40:27.482+01:00" }

Chiediamo un vostro riscontro a supporto, grazie

LucaRogledi commented 1 week ago

@FSESardegna

Buongiorno, Chiediamo gentilmente alla regione Sardegna, RDA di riferimento, di fornire supporto. Grazie.

FSESardegna commented 1 week ago

Buongiorno, Non ci è pervenuta alcuna ITI62 relativa al documento 2.16.840.1.113883.2.9.2.50.4.4^20241115104034 in quanto la ITI18 che precede la delete va in errore poichè non risulta valorizzato l'attributo hl7:type dell'assertion:

    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"/>
                    </saml2:Attribute>

l'attributo di asserzione se è presente deve essere valorizzato, in caso contrario non deve essere proprio inserito.

Rimaniamo a disposizione.

abovo-13 commented 1 week ago

Buongiorno la transazione ITI-18 con relativa asserzione viene prodotta da processi Nazionali non dalla Regione Veneto, giro la questione a @pFonziSogei o @LucaRogledi per competenza.

IsabellaSgro commented 3 days ago

Buongiorno @vigliottim @pFonziSogei @LucaRogledi ci sono novità in merito?

LucaRogledi commented 3 days ago

Buonasera @ppalmerini @IsabellaSgro , dalle verifiche effettuate sul token di signature utilizzato per la chiamata di cancellazione con traceId 9de9b6e90a96bcfb è emerso che, il campo resource_hl7_type non è stato valorizzato correttamente.

image

La invitiamo gentilmente a riprovare utilizzando la valorizzazione corretta o rimuovendo il parametro "resource_hl7_type". Grazie

ppalmerini commented 3 days ago

Buongiorno, abbiamo riprovato una cancellazione togliendo dal jwt il campo resource_hl7_type, ma ottteniamo ancora un errore generico. Di seguito riportiamo i riferimenti:

Il documento che si sta tentando di eliminare ha workflowInstanceId associato 2.16.840.1.113883.2.9.2.50.2.12345.4.4.2.b8b8f4efe0628dd92d7fae6cff3ec288f66b8b89c59c7074b8b10cb965f6768a.89ab4fa6fb^^^^urn:ihe:iti:xdw:2013:workflowInstanceId

invio della DELETE

https://modipa-val.fse.salute.gov.it/govway/rest/in/FSE/gateway/v1/documents/2.16.840.1.113883.2.9.2.50.4.4%5E20241120112023

response

{
    "traceID": "ef7edaee0b5ee97d",
    "spanID": "f04295d0165ee2a3",
    "type": "/errors",
    "title": "Generic",
    "detail": "",
    "instance": "error/generic"
}

status per traceID

{
    "traceID": "3e8594d2152db050",
    "spanID": "3e8594d2152db050",
    "type": "/err/resource",
    "title": "Resource error",
    "detail": "Record non trovato",
    "status": 404,
    "instance": "/not-found"
}

Chiediamo un vostro supporto, grazie

vigliottim commented 2 days ago

@FSESardegna

Buonasera, Chiediamo alla regione Sardegna di effettuare una verifica. Di seguito riportiamo la response registrata sui nostri sistemi. Grazie.

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header/>
<soapenv:Body>
<ns5:AdhocQueryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure" xmlns:ns6="urn:hl7-org:v3" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
<ns3:RegistryErrorList>
<ns3:RegistryError codeContext="RDA generated an internal error." errorCode="CRF2" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/>
</ns3:RegistryErrorList>
<ns2:RegistryObjectList/>
</ns5:AdhocQueryResponse>
</soapenv:Body>
</soapenv:Envelope>
<S:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:S="http://www.w3.org/2003/05/soap-envelope">
    <S:Header>
        <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">urn:ihe:iti:2007:RegistryStoredQuery</wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">610e01d3-729e-493f-8659-3afb3073615a</wsa:MessageID>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <saml2:Assertion ID="_aaa2c803-ceba-464c-8810-7683d1f53d32" IssueInstant="2024-11-20T10:14:46.893Z" Version="2.0" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xs="http://www.w3.org/2001/XMLSchema">
                <saml2:Issuer>integrity:S1#050#REGIONEVENETOTEST</saml2:Issuer>
                <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                    <ds:SignedInfo>
                        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                        <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
                        <ds:Reference URI="#_aaa2c803-ceba-464c-8810-7683d1f53d32">
                            <ds:Transforms>
                                <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
                                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                                    <ec:InclusiveNamespaces PrefixList="xs" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                                </ds:Transform>
                            </ds:Transforms>
                            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                            <ds:DigestValue>doG/ufCMsk+97Q6nT7xPI43kePg=</ds:DigestValue>
                        </ds:Reference>
                    </ds:SignedInfo>
                    <ds:SignatureValue>m4P7HALp9OyK1ns4aT+k5zjthlA3IfkliVYHWh/J+9wBIhxF6eeFG8iSV/4Z3Zbm5riMiVr3U2GKba3jYdlCBdN2urr02i9oRqIpttHsuRw3GcYVdM2z2PnP2BpTN+EXKUyWlCwjy2WKj3LOtDh/NAUSesQIHHuPl/9xyt65simOSr+V89gFl7TddczVFPf8cyYcC4uvDA6kPggf2tQY6+b2eQ4o9saOwNqKWNe/KW/gjML0Mt4xGCMMayrGG9csRaD+xc+AWxv0owdymgOuEb0cdVQulu/d9YrGG8rvotdXLEf4X1knQwBxbNCipcmWGaHK5vfkcErq42JQ42lcbg==</ds:SignatureValue>
                    <ds:KeyInfo>
                        <ds:X509Data>
                            <ds:X509Certificate>MIIE+TCCAuGgAwIBAgIIRHtGTdUftugwDQYJKoZIhvcNAQELBQAwSjELMAkGA1UEBhMCSVQxDjAMBgNVBAoMBVNvZ2VpMSswKQYDVQQDDCJTb2dlaSBDZXJ0aWZpY2F0aW9uIEF1dG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8+meODPHWeXzcLBYouZ0BqafNpUa4J9BkzVQ5Bam7rR+x10txDz5+RjjfpvzpKC1eP4qECmv2zjeTkpyS5kXmcUUCrZhgZSFWV+gzZlYtj5ZBcJgcvjbRSdQLpSr1s1SySSG+QW2A4VoipdXId9lPp8LU0ltIWVji2MY8KW5PqmNBULSHCjax+LvDXrUSpJ3geC3LZCMdY+nylPjJKtCWvscSW7p5caz+dY6pXA07TNwfME5SS7UmyJTVI7GKSbuTIW8KQzCSDj6rKUsl1A6UdvF6bJ2eBgJTKKAk4W9cecLNM9FybzGby0jOd9dccl9ZD4zk1o8PDTpt+xB/+M4Gn1qMpHE79s1ZhLMvTR7FzqgnChFH160BXuGm8pvTfoQkJ53RM2+zfMRrUiOtfRHG8PfsWBNvIWipQ1n2bUiVlgT32wX+unZduZHy8NyV0mouBXCNjaQsH9rexY0C7Tq8ce26cykXiTbUGuMLuK1io0U=</ds:X509Certificate>
                        </ds:X509Data>
                    </ds:KeyInfo>
                </ds:Signature>
                <saml2:Subject>
                    <saml2:NameID>GRLMSM60R31F770Y^^^&2.16.840.1.113883.2.9.4.3.2&ISO</saml2:NameID>
                </saml2:Subject>
                <saml2:Conditions NotBefore="2024-11-20T10:14:46.893Z" NotOnOrAfter="2025-11-20T10:14:46.893Z"/>
                <saml2:AuthnStatement AuthnInstant="2024-11-20T10:14:46.894Z">
                    <saml2:AuthnContext>
                        <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</saml2:AuthnContextClassRef>
                    </saml2:AuthnContext>
                </saml2:AuthnStatement>
                <saml2:AttributeStatement>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:resource:patient:consent" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">true</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xacml:2.0:subject:role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">APR</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:environment:locality" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2.16.840.1.113883.2.9.4.1.3.50502</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:purposeofuse" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">UPDATE</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:organization-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">050</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xacml:1.0:subject:subject-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">GRLMSM60R31F770Y^^^&2.16.840.1.113883.2.9.4.3.2&ISO</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:organization" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Regione Veneto</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xacml:1.0:resource:resource-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">CGNCTD93M22B354R^^^&2.16.840.1.113883.2.9.4.3.2&ISO</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xacml:1.0:action:action-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">READ</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="SubjectApplicationId" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">ADL</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="SubjectApplicationVendor" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">ARIA</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="SubjectApplicationVersion" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2.99.2</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="SubjectAuthenticator" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                        <saml2:AttributeValue xsi:type="xs:string" xmlns:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">GTW_950</saml2:AttributeValue>
                    </saml2:Attribute>
                </saml2:AttributeStatement>
            </saml2:Assertion>
        </wsse:Security>
    </S:Header>
    <S:Body>
        <ns4:AdhocQueryRequest federated="false" maxResults="-1" startIndex="0" xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns5="urn:hl7-org:v3" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0">
            <ns4:ResponseOption returnComposedObjects="true" returnType="ObjectRef"/>
            <AdhocQuery id="urn:uuid:5c4f972b-d56b-40ac-a5fc-c8ca9b40b9d4">
                <Slot name="$XDSDocumentEntryUniqueId">
                    <ValueList>
                        <Value>(&apos;2.16.840.1.113883.2.9.2.50.4.4^20241115104034&apos;)</Value>
                    </ValueList>
                </Slot>
            </AdhocQuery>
        </ns4:AdhocQueryRequest>
    </S:Body>
</S:Envelope>
FSESardegna commented 1 day ago

Buongiorno, anche in questo caso, non ci è pervenuta alcuna ITI62 relativa al documento in quanto la ITI18 che precede la delete va in errore poichè non risulta valorizzato l'attributo hl7:type dell'assertion come è visibile anche dai log caricati da @vigliottim.

Rimaniamo a disposizione

mikeben89 commented 1 day ago

Buongiorno, posso dedurre che ini valorizzi quel parametro in asserzione sulla base del parametro resource_hl7_type che noi come RDA valorizziamo nel jwt sign per il servizio di eliminazione.

Tale parametro, come indicato nelle specifiche, NON è obbligatorio per il servizio di eliminazione.

Chiediamo a @FSESardegna o @vigliottim se possibile verificare questa casistica sulla base di quanto indicato nelle specifiche del servizio di eliminazione.