eclipse-tractusx / portal-backend

Portal Backend
Apache License 2.0
10 stars 22 forks source link

EDC discovery is returning wrong connector endpoints #1089

Open dhiren-singh-007 opened 1 month ago

dhiren-singh-007 commented 1 month ago

API: GET : /api/administration/connectors/discovery Request : ["BPN"]

Current Behavior

EDC discovery api is returning the provider connector under provider BPN

Expected Behavior

EDC discovery api should return the Company connector and Managed connector under Host BPN For eg : Provider company "ABC" created the Managed connector for "XYZ" company with connector url https://connectorurl Now when we call the EDC discovery api it returns the response like below

{
 [
   "bpn":"ABC"
   "connectorEndpoint":
   [
   "https://connectorurl"
   ]
 ]
}

while response should be like

{
 [
   "bpn":"XYZ"
   "connectorEndpoint":
   [
   "https://connectorurl"
   ]
 ]
}

Assuming "ABC" and "XYZ" are the BPN of company

Steps To Reproduce

  1. Create a managed connector for host company XYZ
  2. Now call this api /api/administration/connectors/discovery with request ["XYZ"] , it will not return the newly connected connector
  3. Now call this api again /api/administration/connectors/discovery with request ["ABC"] , it will return the newly connected connector under this BPN.
dhiren-singh-007 commented 1 month ago

@MaximilianHauer @ntruchsess @Phil91 : As we discussed i created this issue for edc discovery api. Please review and share your thoughts and then i will raise the PR accordingly.