Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: EDC Data Plane Ignores Proxy HTTP Method #4070

Closed
nicoprow opened this issue Apr 2, 2024 · 2 comments
Closed

Bug: EDC Data Plane Ignores Proxy HTTP Method #4070

nicoprow opened this issue Apr 2, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@nicoprow
Copy link

nicoprow commented Apr 2, 2024

Bug Report

Describe the Bug

The EDC data plane accesses an asset only with GET even though proxyMethod has been set to "true" in the asset definition.

Expected Behavior

Given proxyMethod is set to "true" in the asset: the EDC data plane should access an HTTP data resource with the same HTTP method with which the public API endpoint has been invoked.

Observed Behavior

The EDC data plane only uses GET for access.

Detailed Description

Error Path with POST request

  1. Created Asset:
    { "@id": "f1cc608f-439b-4fce-aa95-0da0de566f9b", "@type": "Asset", "properties": { "https://purl.org/dc/terms/subject": "cx-taxo:ReadAccessPoolForCatenaXMember", "https://purl.org/dc/terms/description": "Grants the Catena-X Member read access to the Pool API. This can be used to read legal entity, site, address, legal form, identifier type and administrative area level 1 data. To that end, it also grants read access to the respective changelog entries and identifier mappings, as well as relational data.", "https://w3id.org/catenax/ontology/common#version": "6.0", "id": "f1cc608f-439b-4fce-aa95-0da0de566f9b", "https://purl.org/dc/terms/type": "cx-taxo:BPDMPool" }, "dataAddress": { "@type": "DataAddress", "proxyPath": "true", "oauth2:tokenUrl": "https://centralidp.dev.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token", "oauth2:clientId": "xxx", "type": "HttpData", "proxyMethod": "true", "oauth2:clientSecretKey": "dev/edc/gate/asset-dev-client-secret", "proxyQueryParams": "true", "proxyBody": "true", "baseUrl": "https://business-partners.dev.demo.catena-x.net/pool/v6" }, "@context": { "@vocab": "https://w3id.org/edc/v0.0.1/ns/", "edc": "https://w3id.org/edc/v0.0.1/ns/", "tx": "https://w3id.org/tractusx/v0.0.1/ns/", "odrl": "http://www.w3.org/ns/odrl/2/" } }

  2. Perform EDR Negotiation to obtain transfer token

  3. Access Data:

curl --location 'https://edc-url.net/api/public/business-partners/changelog/search?page=0&size=10' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: xxx' \ --data '{ "businessPartnerTypes": [ "SITE", "LEGAL_ENTITY" ] }'

  1. See error in logs:
grafik

Further information

Accessing a GET endpoint on the same asset is working without issues. For example the following request after negotiation gives an expected response:

curl --location 'https://edc-url/api/public/legal-entities?size=10&page=0' \ --header 'Accept: application/json' \ --header 'Authorization: xxx'

Context

Image: tractusx/edc-dataplane-hashicorp-vault:0.6.0

@github-actions github-actions bot added the triage all new issues awaiting classification label Apr 2, 2024
Copy link

github-actions bot commented Apr 2, 2024

Thanks for your contribution 🔥 We will take a look asap 🚀

@wolf4ood
Copy link
Contributor

wolf4ood commented Apr 2, 2024

Hi @nicoprow

thanks for raising this, but it has already been notified and fixed see #3954.

It will be available in the next tractusx version thanks

@wolf4ood wolf4ood closed this as completed Apr 2, 2024
@wolf4ood wolf4ood added duplicate This issue or pull request already exists and removed triage all new issues awaiting classification labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants