Skip to content

Commit 9e7f511

Browse files
committed
chore(protocol): switch default to /api/v1/dsp
1 parent cb80327 commit 9e7f511

File tree

6 files changed

+84
-104
lines changed

6 files changed

+84
-104
lines changed

charts/tractusx-connector-azure-vault/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ controlplane:
110110
# -- port for incoming api calls
111111
port: 8084
112112
# -- path for incoming api calls
113-
path: /api/v1/ids
113+
path: /api/v1/dsp
114114
# -- metrics api, used for application metrics, must not be internet facing
115115
metrics:
116116
# -- port for incoming api calls

charts/tractusx-connector-memory/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ runtime:
112112
# -- port for incoming api calls
113113
port: 8084
114114
# -- path for incoming api calls
115-
path: /api/v1/ids
115+
path: /api/v1/dsp
116116
# -- observability api with unsecured access, must not be internet facing
117117
observability:
118118
# -- port for incoming API calls

charts/tractusx-connector/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ controlplane:
110110
# -- port for incoming api calls
111111
port: 8084
112112
# -- path for incoming api calls
113-
path: /api/v1/ids
113+
path: /api/v1/dsp
114114
# -- metrics api, used for application metrics, must not be internet facing
115115
metrics:
116116
# -- port for incoming api calls

docs/development/postman/collection.json

+12-98
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"info": {
3-
"_postman_id": "a0ba0a29-d90c-41d9-a581-4348a1ab342d",
4-
"name": "product-edc_my_environment_new_DSP",
3+
"_postman_id": "64e409d9-3fd0-4b85-8de9-df1094a58400",
4+
"name": "tractusx-edc_dsp",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
6-
"_exporter_id": "6134257",
7-
"_collection_link": "https://interstellar-comet-6468.postman.co/workspace/My-Workspace~c263a823-c6ce-4746-8d47-2b5211c34d92/collection/6134257-a0ba0a29-d90c-41d9-a581-4348a1ab342d?action=share&creator=6134257&source=collection_link"
6+
"_exporter_id": "27652630"
87
},
98
"item": [
109
{
@@ -327,7 +326,7 @@
327326
"header": [],
328327
"body": {
329328
"mode": "raw",
330-
"raw": "{\r\n \"@context\": {},\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"providerUrl\": \"http://plato-controlplane:8084/protocol/api/v1/ids\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 100,\r\n \"filter\": \"\",\r\n \"range\": {\r\n \"from\": 0,\r\n \"to\": 100\r\n },\r\n \"sortField\": \"\",\r\n \"criterion\": \"\"\r\n }\r\n}",
329+
"raw": "{\r\n \"@context\": {},\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"providerUrl\": \"{{PROVIDER_IDS_URL}}\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 100,\r\n \"filter\": \"\",\r\n \"range\": {\r\n \"from\": 0,\r\n \"to\": 100\r\n },\r\n \"sortField\": \"\",\r\n \"criterion\": \"\"\r\n }\r\n}",
331330
"options": {
332331
"raw": {
333332
"language": "json"
@@ -369,7 +368,7 @@
369368
"header": [],
370369
"body": {
371370
"mode": "raw",
372-
"raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"NegotiationInitiateRequestDto\",\n \"connectorId\": \"99:83:A7:17:86:FF:98:93:CE:A0:DD:A1:F1:36:FA:F6:0F:75:0A:23:keyid:99:83:A7:17:86:FF:98:93:CE:A0:DD:A1:F1:36:FA:F6:0F:75:0A:23\",\n \"connectorAddress\": \"{{PROVIDER_IDS_URL}}/api/v1/ids\",\n \"protocol\": \"dataspace-protocol-http\",\n \"providerId\": \"urn:connector:provider\",\n \"offer\": {\n \"offerId\": \"4:4:b7e07c85-ea9c-4439-b952-e7dfaf075868\",\n \"assetId\": \"{{ASSET_ID}}\",\n \"policy\": {\n \"@id\": \"4:4:b7e07c85-ea9c-4439-b952-e7dfaf075868\",\n \"@type\": \"odrl:Set\",\n \"odrl:permission\": {\n \"odrl:target\": \"{{ASSET_ID}}\",\n \"odrl:action\": {\n \"odrl:type\": \"USE\" \n },\n \"odrl:constraint\": {\n \"odrl:or\": {\n \"odrl:leftOperand\": \"BusinessPartnerNumber\",\n \"odrl:operator\": \"EQ\",\n \"odrl:rightOperand\": \"{{POLICY_BPN}}\"\n }\n }\n },\n \"odrl:prohibition\": [],\n \"odrl:obligation\": [],\n \"odrl:target\": \"{{ASSET_ID}}\"\n }\n }\n}",
371+
"raw": "{\n\t\"@context\": {\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t},\n\t\"@type\": \"NegotiationInitiateRequestDto\",\n\t\"connectorAddress\": \"{{PROVIDER_IDS_URL}}\",\n\t\"protocol\": \"dataspace-protocol-http\",\n\t\"connectorId\": \"{{PROVIDER_ID}}\",\n\t\"providerId\": \"{{PROVIDER_ID}}\",\n\t\"offer\": {\n\t\t\"offerId\": \"1:1:54cb02d1-a12d-4e9e-bd7b-14e7ec30d72b\",\n\t\t\"assetId\": \"{{ASSET_ID}}\",\n\t\t\"policy\": {\n\t\t\t\"@type\": \"odrl:Set\",\n\t\t\t\"odrl:permission\": {\n\t\t\t\t\"odrl:target\": \"{{ASSET_ID}}\",\n\t\t\t\t\"odrl:action\": {\n\t\t\t\t\t\"odrl:type\": \"USE\"\n\t\t\t\t},\n\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\"odrl:or\": {\n\t\t\t\t\t\t\"odrl:leftOperand\": \"BusinessPartnerNumber\",\n\t\t\t\t\t\t\"odrl:operator\": \"EQ\",\n\t\t\t\t\t\t\"odrl:rightOperand\": \"{{POLICY_BPN}}\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"odrl:prohibition\": [],\n\t\t\t\"odrl:obligation\": [],\n\t\t\t\"odrl:target\": \"{{ASSET_ID}}\"\n\t\t}\n\t}\n}",
373372
"options": {
374373
"raw": {
375374
"language": "json"
@@ -495,7 +494,7 @@
495494
"header": [],
496495
"body": {
497496
"mode": "raw",
498-
"raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"assetId\": \"{{ASSET_ID}}\",\n \"connectorAddress\": \"{{PROVIDER_IDS_URL}}/api/v1/ids\",\n \"connectorId\": \"foo\",\n \"contractId\": \"4:4:b062d420-caa6-4a9b-9f6f-3dfd18d51e5a\",\n \"dataDestination\": {\n \"properties\": {\n \"type\": \"HttpProxy\"\n }\n },\n \"managedResources\": false,\n \"properties\": {\n \"receiver.http.endpoint\": \"{{BACKEND_SERVICE}}\"\n },\n \"protocol\": \"dataspace-protocol-http\",\n \"transferType\": {\n \"contentType\": \"application/octet-stream\",\n \"isFinite\": true\n }\n}",
497+
"raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"assetId\": \"{{ASSET_ID}}\",\n \"connectorAddress\": \"{{PROVIDER_IDS_URL}}\",\n \"connectorId\": \"foo\",\n \"contractId\": \"1:1:92ba144e-940f-4ac9-8ea1-03f04a44e043\",\n \"dataDestination\": {\n \"properties\": {\n \"type\": \"HttpProxy\"\n }\n },\n \"managedResources\": false,\n \"properties\": {\n \"receiver.http.endpoint\": \"{{BACKEND_SERVICE}}\"\n },\n \"protocol\": \"dataspace-protocol-http\",\n \"transferType\": {\n \"contentType\": \"application/octet-stream\",\n \"isFinite\": true\n }\n}",
499498
"options": {
500499
"raw": {
501500
"language": "json"
@@ -598,96 +597,6 @@
598597
}
599598
},
600599
"response": []
601-
},
602-
{
603-
"name": "CPA-getData",
604-
"event": [
605-
{
606-
"listen": "test",
607-
"script": {
608-
"exec": [
609-
"pm.test(\"Body matches string\", function () {\r",
610-
" var jsonData = pm.response.json();\r",
611-
" pm.collectionVariables.set(\"authCode\", jsonData.authCode);\r",
612-
"});"
613-
],
614-
"type": "text/javascript"
615-
}
616-
}
617-
],
618-
"request": {
619-
"method": "GET",
620-
"header": [],
621-
"url": {
622-
"raw": "{{CONSUMER_DATAMGMT_URL}}/adapter/asset/sync/{{ASSET_ID}}?providerUrl={{PROVIDER_IDS_URL}}/api/v1/ids/data&contractAgreementReuse=false",
623-
"host": [
624-
"{{CONSUMER_DATAMGMT_URL}}"
625-
],
626-
"path": [
627-
"adapter",
628-
"asset",
629-
"sync",
630-
"{{ASSET_ID}}"
631-
],
632-
"query": [
633-
{
634-
"key": "providerUrl",
635-
"value": "{{PROVIDER_IDS_URL}}/api/v1/ids/data"
636-
},
637-
{
638-
"key": "contractAgreementReuse",
639-
"value": "false"
640-
}
641-
]
642-
}
643-
},
644-
"response": []
645-
},
646-
{
647-
"name": "Get Data from consumer-dataplane pubic api (port-forward)",
648-
"event": [
649-
{
650-
"listen": "prerequest",
651-
"script": {
652-
"exec": [
653-
""
654-
],
655-
"type": "text/javascript"
656-
}
657-
},
658-
{
659-
"listen": "test",
660-
"script": {
661-
"exec": [
662-
""
663-
],
664-
"type": "text/javascript"
665-
}
666-
}
667-
],
668-
"request": {
669-
"method": "GET",
670-
"header": [
671-
{
672-
"key": "Authorization",
673-
"value": "{{authCode}}",
674-
"type": "text"
675-
}
676-
],
677-
"url": {
678-
"raw": "http://localhost:8081/api/public",
679-
"protocol": "http",
680-
"host": [
681-
"localhost"
682-
],
683-
"port": "8081",
684-
"path": [
685-
"api",
686-
"public"
687-
]
688-
}
689-
},
690-
"response": []
691600
}
692601
],
693602
"auth": {
@@ -732,7 +641,7 @@
732641
},
733642
{
734643
"key": "PROVIDER_IDS_URL",
735-
"value": "http://plato-controlplane:8084"
644+
"value": "http://plato-controlplane:8084/api/v1/dsp\n"
736645
},
737646
{
738647
"key": "PROVIDER_DATAMGMT_URL",
@@ -796,6 +705,11 @@
796705
{
797706
"key": "authCode",
798707
"value": ""
708+
},
709+
{
710+
"key": "PROVIDER_ID",
711+
"value": "BPNPLATO",
712+
"type": "string"
799713
}
800714
]
801715
}

docs/migration/Version_0.3.4_0.4.0.md

+67-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Migration from 0.3.3 to 0.3.4
1+
# Migration from 0.3.3 to 0.4.0
22

33
## Switching to DSP
44

@@ -10,9 +10,16 @@ From the Tractus-X EDC perspective this causes breaking changes in the following
1010
The old Management API is now deprecated and is **not** tested for compliance. Please upgrade using the `/v2/` path
1111
for every endpoint, e.g. `<PATH>/management/v2/assets`. Please also refer to
1212
the [EDC OpenAPI spec](https://app.swaggerhub.com/apis/eclipse-edc-bot/management-api/0.0.1-SNAPSHOT#/).
13+
An updated postman collection with the `v2` flow is available [here](../development/postman/collection.json)
14+
1315
- modules: all `*ids*` modules are deprecated and cannot be used anymore. Please migrate over
1416
to `org.eclipse.edc:dsp:0.0.1-milestone-9`.
1517

18+
- path: the default protocol path is now `/api/v1/dsp` instead of `/api/v1/ids`
19+
20+
- `edc.participant.id`: new mandatory configuration for the participant id in the dataspace. (BPN number).
21+
It's configured via mandatory property in the charts with object ```yaml participant: id: "id"```.
22+
1623
**Please note that this is not a complete documentation of the DSP Protocol, please refer to
1724
the [official documentation](https://docs.internationaldataspaces.org/dataspace-protocol/overview/readme)**
1825

@@ -27,3 +34,62 @@ The Business tests were brittle, consumed a lot of resources and were quite cumb
2734

2835
Since the old Control-Plane-Adapter is incompatible with DSP, a new iteration was created.
2936
**Due to time constraints with this release documentation for this feature will to be published subsequently**
37+
38+
39+
## Other changes
40+
41+
- When using the EDR [HttpDynamicReceiverExtension](https://github.com/eclipse-edc/Connector/tree/main/extensions/control-plane/transfer/transfer-pull-http-dynamic-receiver) in the transfer process initiation
42+
the properties for configuring the receiver on single transfer process has been changed to:
43+
44+
```json
45+
"privateProperties": {
46+
"receiverHttpEndpoint": "{{BACKEND_SERVICE}}"
47+
}
48+
```
49+
instead of:
50+
51+
```json
52+
"properties": {
53+
"receiver.http.endpoint": "{{BACKEND_SERVICE}}"
54+
}
55+
```
56+
57+
58+
## New Catalog
59+
60+
The DSP catalog is expressed as [DCat Catalog](https://www.w3.org/TR/vocab-dcat-3/), when querying the catalog a response like this will return:
61+
62+
```json
63+
{
64+
"@id": "5a3207ae-bd0d-4a3b-bc8a-05adfbe75d95",
65+
"@type": "dcat:Catalog",
66+
"dcat:dataset": {
67+
"@id": "e6279569-17a9-4ba3-9401-a8ae4100e4eb",
68+
"@type": "dcat:Dataset",
69+
"odrl:hasPolicy": {
70+
"@id": "2:1:535def6e-8321-4c0e-a595-aabdd9c18eed",
71+
"@type": "odrl:Set",
72+
"odrl:permission": [],
73+
"odrl:prohibition": [],
74+
"odrl:obligation": [],
75+
"odrl:target": "1"
76+
},
77+
"dcat:distribution": [
78+
...
79+
],
80+
"edc:description": "Product EDC Demo Asset",
81+
"edc:id": "1"
82+
},
83+
"dcat:service": {
84+
...
85+
},
86+
"edc:participantId": "participantId",
87+
"@context": {
88+
}
89+
}
90+
```
91+
92+
When starting a new contract negotiation for an asset:
93+
94+
- the `@id` of `odrl:hasPolicy` object should be passed in the `offerId` field
95+
- the `edc:participantId` should be passed in the `providerId` and `connectorId` fields. `connectorId` it's still needed for backward compatibility and it will probably be removed in the next versions.

edc-extensions/postgresql-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/contractdefinition/V0_0_6__Alter_ContractDefinition_Rename_selector_expression.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--
2-
-- Copyright (c) 2022 Mercedes-Benz Tech Innovation GmbH
2+
-- Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
33
--
44
-- This program and the accompanying materials are made available under the
55
-- terms of the Apache License, Version 2.0 which is available at
@@ -8,7 +8,7 @@
88
-- SPDX-License-Identifier: Apache-2.0
99
--
1010
-- Contributors:
11-
-- Mercedes-Benz Tech Innovation GmbH - EDC Snapshot 20221201 Update
11+
-- Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
1212
--
1313

1414
-- add columns

0 commit comments

Comments
 (0)