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

Is subpath definition is supported in PDC's endpoint? #41

Open
czeni opened this issue Mar 19, 2025 · 0 comments
Open

Is subpath definition is supported in PDC's endpoint? #41

czeni opened this issue Mar 19, 2025 · 0 comments

Comments

@czeni
Copy link

czeni commented Mar 19, 2025

When endpoint config entry defines a subpath for the PDC's REST-API along with IP and port, its self-description contains the subpath correctly, but it seems the defined endpoints do not consider it.

Example config:

$ cat config.production.json
{
   "endpoint": "http://172.19.0.4:30003/example/path/",
    ...

$ curl http://172.19.0.4:30003/example/path
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /example/path</pre>
</body>
</html>

$ curl http://172.19.0.4:30003/
{
  "timestamp": 1742396140715,
  "code": 200,
  "content": {
    "@context": {
      "ptx": "https://w3id.org/ptxa/core/",
      "ptxc": "https://w3id.org/ptxa/code/"
    },
    "@id": "https://w3id.org/ptx/",
    "@type": "ptx:BaseConnector",
    "_links": {
      "self": {
        "href": "http://172.19.0.4:30003/example/path/"
      },
      "consentConfiguration": {
        "href": "http://172.19.0.4:30003/example/path/private/configuration/consent"
      },
      "login": {
        "href": "http://172.19.0.4:30003/example/path/login"
      },
      "dataImport": {
        "href": "http://172.19.0.4:30003/example/path/data/import"
      },
      "dataExport": {
        "href": "http://172.19.0.4:30003/example/path/data/export"
      },
      "consentImport": {
        "href": "http://172.19.0.4:30003/example/path/consent/import"
      },
      "consentExport": {
        "href": "http://172.19.0.4:30003/example/path/consent/export"
      },
      "providerExport": {
        "href": "http://172.19.0.4:30003/example/path/provider/export"
      },
      "consumerExchange": {
        "href": "http://172.19.0.4:30003/example/path/consumer/exchange"
      },
      "consumerImport": {
        "href": "http://172.19.0.4:30003/example/path/consumer/import"
      },
      "infrastructure": {
        "href": "http://172.19.0.4:30003/example/path/infrastructure"
      }
    },
    "ptx:ModelVersion": "2.6.0",
    "ptx:appKey": {
      "@type": "ptx:AppKey",
      "@id": "https://w3id.org/ptx/",
      "ptx:keyType": {
        "@id": "https://w3id.org/ptxa/code/RSA"
      },
      "ptx:keyValue": "e5dc9d6bfb8ff3516ad33a4b04e7f7a99d0013fd5b0ec59ca807b284c573143f16a60e24ced1d8fc3866189a7db10837cc51ea4613c5eb2aa2b6304bb99aa542"
    },
    "ptx:catalog": [
      {}
    ],
    "ptx:curator": {
      "@id": "https://visionspol.eu"
    },
    "ptx:description": [
      {
        "@value": "Prometheus Connector reference implementation",
        "@type": "http://www.w3.org/2001/XMLSchema#string"
      }
    ],
    "ptx:hasDefaultEndpoint": {
      "@type": "ptx:ConnectorEndpoint",
      "@id": "https://w3id.org/ptx/",
      "ptx:accessURL": {
        "@id": "http://172.19.0.4:30003/example/path/"
      }
    },
    "ptx:maintainer": {
      "@id": "https://visionspol.eu"
    },
    "ptx:securityProfile": {
      "@id": "https://w3id.org/ptx/"
    },
    "ptx:serviceKey": {
      "@type": "ptx:ServiceKey",
      "@id": "https://w3id.org/ptx/",
      "ptx:keyType": {
        "@id": "https://w3id.org/ptxa/code/RSA"
      },
      "ptx:keyValue": "dWJUUKH9rYF9wr_UAPb6PQXW9h17G7dzuGCbiDhcyjCGgHzLwBp6QHOQhDg0FFxS24GD8nvw37oe_LOjl7ztNATYiVOd_ZEVHQpV"
    },
    "ptx:title": [
      {
        "@value": "Dataspace Connector",
        "@type": "http://www.w3.org/"
      }
    ],
    "ptx:version": "1.8.2"
  }

This is the case for other endpoints:

$ curl -d '{}' http://172.19.0.4:30003/example/path/login
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /example/path/login</pre>
</body>
</html>

$ curl -d '{}' http://172.19.0.4:30003/login
{
  "path": "/login",
  "statusCode": 404,
  "error": "resource not found",
  "success": false,
  "statusText": "Not found",
  "message": "Wrong credentials"
}
  • Is this the intended behavior?

  • If it is intended, is it possible to support subpath for entrypoint definitions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant