Fraunhofer-AISEC / ids-clearing-house-service

This is an implementation of the IDS Clearing House
Apache License 2.0
0 stars 11 forks source link

How to obtain the list of documents/transactions made that are stored at the Clearing house? #13

Closed jfernandezsqs closed 2 years ago

jfernandezsqs commented 2 years ago

In relation to issue Consumer is not authorized to write to pid (ids:rejectionmessage) #12

I have been looking in the documentation of the clearing house and the dataspace connector and have not found anywhere how to make a call from DSCA and/or DSCB to the clearing house to obtain the record of the transaction that has been made previously.

Is there a path or call to make to get those records from the connectors that have been part of the transaction?

Also, is there a place in the clearing house where it is specified how long the records/documents of the transactions are stored in the clearing house?

Thanks in advance

kragall commented 2 years ago

The most up-to-date documentation of Interactions with the Clearing House is in the IDS-G-Pre. If you do not have access to the repository you will have to contact the IDSA. In the IDS-G-Pre you can find the sequence diagrams defining the interactions between Connectors and CH and a more detailed description of the expected multipart messages for these interactions.

When you log information in the CH, the CH answers with a JWT containing process_id and document_id that you can use for querying the logged information later on. I don't know if the DSC will store this information for you or if you need to store it separately. You can either query for a single document using both process_id and document_id or you can query for all documents in the process process_id.

Finally, there is currently no configurable data retention policy in the Clearing House.

jmartinezsqs commented 2 years ago

Hello. Thanks for the help on the previous comment. I've been testing and I have been able to get the process_id and document_id in the log of the Clearing house. Even though, I cannot find any way to receive it through the DSC or through an API request. So would be really helpful if you could share the way this information should be accessed. Apart from that, I cannot find a way to access the logs stored in the Clearing house, both the logs related to a specific connector or IDS component nor the complete logs stored in the Clearing house. That way, it would be really helpful to have an API call that allows to access the saved logs.

kragall commented 2 years ago

From Clearing House perspective, it is currently the responsibility of the user -- i.e. your DSC -- to store the process_ids used to log information to. There is currently no API call available to get a list of all the process_ids that contain information and are accessible to your user.

That being said, the process_id is part of the URL the user uses to make the API call to log information. So this should be information available to your DSC. Using the Query API to make calls will give you access to all logs stored under the used process_id.

If you wish to retrieve a single document using its document_id, your DSC needs to store the response it gets when logging the document. As noted in the Log API the response contains a JWT that includes process_id and document_id.