When using the new /public/v2/ API endpoint of the provider data plane while proxyPath is active for the asset, the v2/ is forwarded to the backend service as well.
Expected Behavior
The request sent from EDC provider data plane to the backend service should not include the v2/ prefix.
i.e., The backend URL should be <asset_base_url><proxied_path_starting_after_public_v2> for example:
http://local-edc-wiremock:18080/pcf/api/carbon-footprint/00000000-aaaa-0000-0000-000000000001
Observed Behavior
The request sent from EDC provider data plane to the backend service includes the v2/ prefix.
i.e., The backend URL is <asset_base_url>v2/<proxied_path_starting_after_public_v2> for example:
http://local-edc-wiremock:18080/pcf/v2/api/carbon-footprint/00000000-aaaa-0000-0000-000000000001
Steps to Reproduce
Steps to reproduce the behavior:
Create an EDC asset using the "proxyPath": true property for the data address. e.g.,
Perform all necessary to get ready for the data plane backend call (create policy, contract, negotiate, initiate transfer, edc.)
Observe the endpoint and authorization attributes in the response which was sent by the GET http://local-edc-consumer-control-plane:9105/management/v2/edrs/{{edcTransferProcessId}}/dataaddress endpoint. For example:
5. Observe the URL of the request received by the backend service.
## Context Information
- Used version [e.g. EDC v1.0.0]: Tractus-X EDC using 0.6.0 EDC dependencies
- OS: [e.g. iOS, Windows]: Mac (but should not be OS specific)
## Detailed Description
Please see the request log from the Wiremock backend service I have used below:
![Screenshot 2024-04-02 at 15 13 49](https://github.com/eclipse-edc/Connector/assets/15124019/d9006056-e510-462c-a8b1-f1d77a6da9c9)
## Possible Implementation
I think the full `/public/v2/` path prefix could be removed from the request path before proxying it.
Bug Report
Describe the Bug
When using the new
/public/v2/
API endpoint of the provider data plane whileproxyPath
is active for the asset, thev2/
is forwarded to the backend service as well.Expected Behavior
v2/
prefix. i.e., The backend URL should be<asset_base_url><proxied_path_starting_after_public_v2>
for example:http://local-edc-wiremock:18080/pcf/api/carbon-footprint/00000000-aaaa-0000-0000-000000000001
Observed Behavior
v2/
prefix. i.e., The backend URL is<asset_base_url>v2/<proxied_path_starting_after_public_v2>
for example:http://local-edc-wiremock:18080/pcf/v2/api/carbon-footprint/00000000-aaaa-0000-0000-000000000001
Steps to Reproduce
Steps to reproduce the behavior:
"proxyPath": true
property for the data address. e.g.,endpoint
andauthorization
attributes in the response which was sent by theGET http://local-edc-consumer-control-plane:9105/management/v2/edrs/{{edcTransferProcessId}}/dataaddress
endpoint. For example:endpoint
andauthorization
attribute values from the previous step. For example:Authorization: eyJraWQiOiJlYy1wdWJsaWMiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJhbm9ueW1vdXMiLCJhdWQiOiJCUE5MMDAwMDAwMDAwMDBBIiwic3ViIjoiYW5vbnltb3VzIiwiZXhwIjoxNzEyMDYxNjc2LCJpYXQiOjE3MTIwNjEzNzYsImp0aSI6ImMwNmJlZmJmLThlZTgtNDIzMi1hYTQ2LTE0NGIxNWI5NWFiNyJ9.VZMYt9_GuWPT-vBapozTW7covIDpnXSnQmuuYtMlIMLCCKArk5bG-r4Lr8xzvqCeUJwjJ6k2UX2Wldwcjk6Mmg