Skip to content

Commit 22a1ccb

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

File tree

6 files changed

+94
-110
lines changed

6 files changed

+94
-110
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

+23-104
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
{
@@ -217,7 +216,7 @@
217216
"header": [],
218217
"body": {
219218
"mode": "raw",
220-
"raw": "{\n \"@context\": {},\n \"@id\": \"{{CONTRACT_DEFINITION_ID}}\",\n \"@type\": \"ContractDefinition\",\n \"accessPolicyId\": \"{{ACCESS_POLICY_ID}}\",\n \"contractPolicyId\": \"{{CONTRACT_POLICY_ID}}\"\n}",
219+
"raw": "{\n \"@context\": {},\n \"@id\": \"{{CONTRACT_DEFINITION_ID}}\",\n \"@type\": \"ContractDefinition\",\n \"accessPolicyId\": \"{{ACCESS_POLICY_ID}}\",\n \"contractPolicyId\": \"{{CONTRACT_POLICY_ID}}\",\n \"assetsSelector\" : {\n \"@type\" : \"CriterionDto\",\n \"operandLeft\": \"{{EDC_NAMESPACE}}id\",\n \"operator\": \"=\",\n \"operandRight\": \"{{ASSET_ID}}\"\n }\n}",
221220
"options": {
222221
"raw": {
223222
"language": "json"
@@ -308,13 +307,13 @@
308307
}
309308
},
310309
"url": {
311-
"raw": "{{PROVIDER_DATAMGMT_URL}}/contractdefinitions/{{POLICY_ID}}",
310+
"raw": "{{PROVIDER_DATAMGMT_URL}}/contractdefinitions/{{CONTRACT_DEFINITION_ID}}",
312311
"host": [
313312
"{{PROVIDER_DATAMGMT_URL}}"
314313
],
315314
"path": [
316315
"contractdefinitions",
317-
"{{POLICY_ID}}"
316+
"{{CONTRACT_DEFINITION_ID}}"
318317
]
319318
}
320319
},
@@ -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:9f9375e3-ed28-449a-8a98-a340f4c20c26\",\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 \"contractId\": \"1:1:7b9cc812-45db-4772-b427-3d0f30eb6a96\",\n \"dataDestination\": {\n \"properties\": {\n \"type\": \"HttpProxy\"\n }\n },\n \"managedResources\": false,\n \"privateProperties\": {\n \"receiverHttpEndpoint\": \"{{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"
@@ -540,13 +539,13 @@
540539
"method": "GET",
541540
"header": [],
542541
"url": {
543-
"raw": "{{CONSUMER_DATAMGMT_URL}}/transferprocess/{{TRANSFER_PROCESS_ID}}",
542+
"raw": "{{CONSUMER_DATAMGMT_URL}}/transferprocesses/764db319-0952-4d20-8feb-d8bee8e77a54",
544543
"host": [
545544
"{{CONSUMER_DATAMGMT_URL}}"
546545
],
547546
"path": [
548-
"transferprocess",
549-
"{{TRANSFER_PROCESS_ID}}"
547+
"transferprocesses",
548+
"764db319-0952-4d20-8feb-d8bee8e77a54"
550549
]
551550
}
552551
},
@@ -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,16 @@
796705
{
797706
"key": "authCode",
798707
"value": ""
708+
},
709+
{
710+
"key": "PROVIDER_ID",
711+
"value": "BPNPLATO",
712+
"type": "string"
713+
},
714+
{
715+
"key": "EDC_NAMESPACE",
716+
"value": "https://w3id.org/edc/v0.0.1/ns/",
717+
"type": "string"
799718
}
800719
]
801720
}

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

+66-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,61 @@ 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+
## Other changes
39+
40+
- 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
41+
the properties for configuring the receiver on single transfer process has been changed to:
42+
43+
```json
44+
"privateProperties": {
45+
"receiverHttpEndpoint": "{{BACKEND_SERVICE}}"
46+
}
47+
```
48+
49+
instead of:
50+
51+
```json
52+
"properties": {
53+
"receiver.http.endpoint": "{{BACKEND_SERVICE}}"
54+
}
55+
```
56+
57+
## New Catalog
58+
59+
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:
60+
61+
```json
62+
{
63+
"@id": "5a3207ae-bd0d-4a3b-bc8a-05adfbe75d95",
64+
"@type": "dcat:Catalog",
65+
"dcat:dataset": {
66+
"@id": "e6279569-17a9-4ba3-9401-a8ae4100e4eb",
67+
"@type": "dcat:Dataset",
68+
"odrl:hasPolicy": {
69+
"@id": "2:1:535def6e-8321-4c0e-a595-aabdd9c18eed",
70+
"@type": "odrl:Set",
71+
"odrl:permission": [],
72+
"odrl:prohibition": [],
73+
"odrl:obligation": [],
74+
"odrl:target": "1"
75+
},
76+
"dcat:distribution": [
77+
...
78+
],
79+
"edc:description": "Product EDC Demo Asset",
80+
"edc:id": "1"
81+
},
82+
"dcat:service": {
83+
...
84+
},
85+
"edc:participantId": "participantId",
86+
"@context": {
87+
}
88+
}
89+
```
90+
91+
When starting a new contract negotiation for an asset:
92+
93+
- the `@id` of `odrl:hasPolicy` object should be passed in the `offerId` field
94+
- 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)