sovity / edc-ui

Connector UI for the sovity EDC Community Edition.
https://sovity.de/en/connect-to-data-space-en/
Apache License 2.0
32 stars 12 forks source link

HTTP Data Transfer: Headers not included in transfer request #702

Closed bearn01d closed 5 months ago

bearn01d commented 8 months ago

Bug Report

Description

Additional headers specified in the UI are not included in the HTTP request made for transfer. Apparently, EDC 0.2.1 requires the data sink property for the additional headers without the EDC namespace prefix added here: https://github.com/sovity/edc-ui/blob/23dfcb2efaf3fe68297ea1fa40a5304a74b461f2/src/app/core/services/models/data-address-properties.ts#L8. Indeed, the EDC code checks whether the property .startsWith("header:"). Without the prefix, the header is included.

This can also be considered an EDC bug, but for version 0.2.1, it breaks the UI so might be worth a workaround in this repository, i.e. removing the prefix. For further properties, I didn't test the behavior yet.

Expected Behavior

Headers specified in the UI should be added to the transfer HTTP request.

Observed Behavior

The header is missing.

Steps to reproduce:

  1. Create an asset.
  2. Create a contract definition.
  3. Go to another connector and negotiate contract.
  4. Try to make a transfer to a data sink that needs additional header.
  5. Set the header name and header value.
  6. Transfer data.
  7. Check if the data was transferred and the header was set correctly during the transfer.
tmberthold commented 6 months ago

Thank you for contributing! We will take a look at it.

AbdullahMuk commented 5 months ago

Will be resolved with https://github.com/sovity/PMO-Software/issues/694 (anticipate delivery in first half of 2024). Closing this issue.

SebastianOpriel commented 5 months ago

@AbdullahMuk this cannot be closed yet.

@bearn01d do I get following steps correct?

Steps to reproduce:

  1. Create an asset.
  2. Create a contract definition.
  3. Go to another connector and negotiate contract.
  4. Try to make a transfer to a data sink that needs additional header.
  5. Set the header name and header value.
  6. Transfer data.
  7. Check if the data was transferred and the header was set correctly during the transfer.
bearn01d commented 5 months ago

@SebastianOpriel, yes, exactly, these are the steps I took.

AbdullahMuk commented 5 months ago

@tmberthold following the PR that Richard reviewed, please reproduce the scenario and confirm that the bug is not there anymore.

Then we can close this issue.

tmberthold commented 5 months ago

I followed the steps to reproduce and the header now reaches the data-sink when set during initiating the transfer. Fixed for me.

Have added a header "issue:702" for testing while initiating the transfer via the UI, they reach the data-sink.

image