Skip to content

Commit 80e8afe

Browse files
committed
pr remarks
1 parent 8b87269 commit 80e8afe

File tree

5 files changed

+199
-15
lines changed

5 files changed

+199
-15
lines changed

docs/development/postman/collection.json

+189-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"header": [],
2727
"body": {
2828
"mode": "raw",
29-
"raw": "{\n \"@context\": {},\n \"asset\": {\n \"@type\": \"Asset\",\n \"@id\": \"{{ASSET_ID}}\", \n \"properties\": {\n \"description\": \"Product EDC Demo Asset\"\n }\n },\n \"dataAddress\": {\n \"@type\": \"DataAddress\",\n \"type\": \"HttpData\",\n \"baseUrl\": \"https://jsonplaceholder.typicode.com/todos/1\"\n }\n}",
29+
"raw": "{\n \"@context\": {},\n \"asset\": {\n \"@type\": \"Asset\",\n \"@id\": \"{{ASSET_ID}}\", \n \"properties\": {\n \"description\": \"Product EDC Demo Asset\"\n }\n },\n \"dataAddress\": {\n \"@type\": \"DataAddress\",\n \"type\": \"HttpData\",\n \"baseUrl\": \"https://jsonplaceholder.typicode.com/todos\"\n }\n}",
3030
"options": {
3131
"raw": {
3232
"language": "json"
@@ -539,13 +539,13 @@
539539
"method": "GET",
540540
"header": [],
541541
"url": {
542-
"raw": "{{CONSUMER_DATAMGMT_URL}}/transferprocesses/764db319-0952-4d20-8feb-d8bee8e77a54",
542+
"raw": "{{CONSUMER_DATAMGMT_URL}}/transferprocesses/8e428b80-46a5-4325-87e5-592518f7666b",
543543
"host": [
544544
"{{CONSUMER_DATAMGMT_URL}}"
545545
],
546546
"path": [
547547
"transferprocesses",
548-
"764db319-0952-4d20-8feb-d8bee8e77a54"
548+
"8e428b80-46a5-4325-87e5-592518f7666b"
549549
]
550550
}
551551
},
@@ -597,6 +597,187 @@
597597
}
598598
},
599599
"response": []
600+
},
601+
{
602+
"name": "Initiate EDR Negotation",
603+
"event": [
604+
{
605+
"listen": "test",
606+
"script": {
607+
"exec": [
608+
"pm.test(\"Body matches string\", function () {",
609+
" var jsonData = pm.response.json();",
610+
" pm.collectionVariables.set(\"NEGOTIATION_ID\", jsonData.id);",
611+
"",
612+
"});"
613+
],
614+
"type": "text/javascript"
615+
}
616+
}
617+
],
618+
"request": {
619+
"method": "POST",
620+
"header": [],
621+
"body": {
622+
"mode": "raw",
623+
"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}",
624+
"options": {
625+
"raw": {
626+
"language": "json"
627+
}
628+
}
629+
},
630+
"url": {
631+
"raw": "{{CONSUMER_ADAPTER_URL}}/edrs",
632+
"host": [
633+
"{{CONSUMER_ADAPTER_URL}}"
634+
],
635+
"path": [
636+
"edrs"
637+
]
638+
}
639+
},
640+
"response": []
641+
},
642+
{
643+
"name": "Query EDRs Cached",
644+
"event": [
645+
{
646+
"listen": "test",
647+
"script": {
648+
"exec": [
649+
"pm.test(\"Body matches string\", function () {",
650+
" var jsonData = pm.response.json();",
651+
" pm.collectionVariables.set(\"NEGOTIATION_ID\", jsonData.id);",
652+
"",
653+
"});"
654+
],
655+
"type": "text/javascript"
656+
}
657+
}
658+
],
659+
"protocolProfileBehavior": {
660+
"disableBodyPruning": true
661+
},
662+
"request": {
663+
"method": "GET",
664+
"header": [],
665+
"body": {
666+
"mode": "raw",
667+
"raw": "",
668+
"options": {
669+
"raw": {
670+
"language": "json"
671+
}
672+
}
673+
},
674+
"url": {
675+
"raw": "{{CONSUMER_ADAPTER_URL}}/edrs?assetId={{ASSET_ID}}",
676+
"host": [
677+
"{{CONSUMER_ADAPTER_URL}}"
678+
],
679+
"path": [
680+
"edrs"
681+
],
682+
"query": [
683+
{
684+
"key": "assetId",
685+
"value": "{{ASSET_ID}}"
686+
}
687+
]
688+
}
689+
},
690+
"response": []
691+
},
692+
{
693+
"name": "Get EDR by tp ID",
694+
"event": [
695+
{
696+
"listen": "test",
697+
"script": {
698+
"exec": [
699+
"pm.test(\"Body matches string\", function () {",
700+
" var jsonData = pm.response.json();",
701+
" pm.collectionVariables.set(\"NEGOTIATION_ID\", jsonData.id);",
702+
"",
703+
"});"
704+
],
705+
"type": "text/javascript"
706+
}
707+
}
708+
],
709+
"protocolProfileBehavior": {
710+
"disableBodyPruning": true
711+
},
712+
"request": {
713+
"method": "GET",
714+
"header": [],
715+
"body": {
716+
"mode": "raw",
717+
"raw": "",
718+
"options": {
719+
"raw": {
720+
"language": "json"
721+
}
722+
}
723+
},
724+
"url": {
725+
"raw": "{{CONSUMER_ADAPTER_URL}}/edrs/4b383155-9147-4912-819e-6172b4a3eb02",
726+
"host": [
727+
"{{CONSUMER_ADAPTER_URL}}"
728+
],
729+
"path": [
730+
"edrs",
731+
"4b383155-9147-4912-819e-6172b4a3eb02"
732+
]
733+
}
734+
},
735+
"response": []
736+
},
737+
{
738+
"name": "Get Asset Data with proxy",
739+
"event": [
740+
{
741+
"listen": "test",
742+
"script": {
743+
"exec": [
744+
"pm.test(\"Body matches string\", function () {",
745+
" var jsonData = pm.response.json();",
746+
" pm.collectionVariables.set(\"NEGOTIATION_ID\", jsonData.id);",
747+
"",
748+
"});"
749+
],
750+
"type": "text/javascript"
751+
}
752+
}
753+
],
754+
"request": {
755+
"method": "POST",
756+
"header": [],
757+
"body": {
758+
"mode": "raw",
759+
"raw": "{\n \"assetId\": \"{{ASSET_ID}}\",\n \"endpointUrl\": \"http://plato-dataplane:8080/api/gateway/aas/1\"\n}",
760+
"options": {
761+
"raw": {
762+
"language": "json"
763+
}
764+
}
765+
},
766+
"url": {
767+
"raw": "http://localhost:8186/proxy/aas/request",
768+
"protocol": "http",
769+
"host": [
770+
"localhost"
771+
],
772+
"port": "8186",
773+
"path": [
774+
"proxy",
775+
"aas",
776+
"request"
777+
]
778+
}
779+
},
780+
"response": []
600781
}
601782
],
602783
"auth": {
@@ -715,6 +896,11 @@
715896
"key": "EDC_NAMESPACE",
716897
"value": "https://w3id.org/edc/v0.0.1/ns/",
717898
"type": "string"
899+
},
900+
{
901+
"key": "CONSUMER_ADAPTER_URL",
902+
"value": "http://localhost:31364/management/adapter",
903+
"type": "string"
718904
}
719905
]
720906
}

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

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ The Business tests were brittle, consumed a lot of resources and were quite cumb
3535
Since the old Control-Plane-Adapter is incompatible with DSP, a new iteration was created.
3636
**Due to time constraints with this release documentation for this feature will to be published subsequently**
3737

38+
## New Policies for expressing validity of the agreement
39+
40+
The dates in `ContractOffer` and `ContractAgreement` has been removed in favour of a policy based contract validity check, see [here](https://github.com/eclipse-edc/Connector/issues/2758)
41+
3842
## Other changes
3943

4044
- 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

edc-extensions/cx-oauth2/src/test/java/org/eclipse/tractusx/edc/oauth2/CxParticipantExtensionTest.java

-11
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,7 @@ void setUp(ObjectFactory factory, ServiceExtensionContext context) {
5858
@Test
5959
void initialize() {
6060
extension.initialize(context);
61-
var attributes = Map.of(PARTICIPANT_IDENTITY, "BPNSOKRATES");
6261
verify(agentService).register(isA(CxParticipantExtension.class));
63-
var claims = ClaimToken.Builder.newInstance().claim(REFERRING_CONNECTOR_CLAIM, "http://sokrates-controlplane/BPNSOKRATES").build();
64-
65-
66-
assertThat(extension.attributesFor(claims)).containsExactlyEntriesOf(attributes);
67-
68-
claims = ClaimToken.Builder.newInstance().claim(REFERRING_CONNECTOR_CLAIM, "http://sokrates-controlplane/BPNSOKRATES/").build();
69-
assertThat(extension.attributesFor(claims)).containsExactlyEntriesOf(attributes);
70-
71-
claims = ClaimToken.Builder.newInstance().claim(REFERRING_CONNECTOR_CLAIM, "http://sokrates-controlplane/test/path/BPNSOKRATES/").build();
72-
assertThat(extension.attributesFor(claims)).containsExactlyEntriesOf(attributes);
7362
}
7463

7564

edc-extensions/hashicorp-vault/src/main/java/org/eclipse/tractusx/edc/hashicorpvault/AbstractHashicorpVaultExtension.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class AbstractHashicorpVaultExtension {
5454
public HashicorpVaultClient createVaultClient(ServiceExtensionContext context, ObjectMapper mapper) {
5555
var config = loadHashicorpVaultClientConfig(context);
5656

57-
final OkHttpClient okHttpClient = createOkHttpClient(config);
57+
var okHttpClient = createOkHttpClient(config);
5858

5959
return new HashicorpVaultClient(config, okHttpClient, mapper);
6060
}

edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/TestRuntimeConfiguration.java

+5
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ public class TestRuntimeConfiguration {
4646
static final String SOKRATES_PUBLIC_API_PORT = String.valueOf(getFreePort());
4747
static final String PLATO_PUBLIC_API_PORT = String.valueOf(getFreePort());
4848
static final String PLATO_DATAPLANE_CONTROL_PORT = String.valueOf(getFreePort());
49+
static final String PLATO_DATAPLANE_PROXY_PORT = String.valueOf(getFreePort());
4950
static final String SOKRATES_DATAPLANE_CONTROL_PORT = String.valueOf(getFreePort());
5051

52+
static final String SOKRATES_DATAPLANE_PROXY_PORT = String.valueOf(getFreePort());
53+
5154
public static Map<String, String> sokratesPostgresqlConfiguration() {
5255
var baseConfiguration = sokratesConfiguration();
5356
var postgresConfiguration = postgresqlConfiguration(SOKRATES_NAME.toLowerCase());
@@ -113,6 +116,7 @@ public static Map<String, String> sokratesConfiguration() {
113116
// embedded dataplane config
114117
put("web.http.control.path", "/api/dataplane/control");
115118
put("web.http.control.port", SOKRATES_DATAPLANE_CONTROL_PORT);
119+
put("tx.dpf.consumer.proxy.port", SOKRATES_DATAPLANE_PROXY_PORT);
116120
put("edc.dataplane.token.validation.endpoint", "http://localhost:" + SOKRATES_DATAPLANE_CONTROL_PORT + "/api/dataplane/control/token");
117121
put("edc.dataplane.selector.httpplane.url", "http://localhost:" + SOKRATES_DATAPLANE_CONTROL_PORT + "/api/dataplane/control");
118122
put("edc.dataplane.selector.httpplane.sourcetypes", "HttpData");
@@ -143,6 +147,7 @@ public static Map<String, String> platoConfiguration() {
143147
// embedded dataplane config
144148
put("web.http.control.path", "/api/dataplane/control");
145149
put("web.http.control.port", PLATO_DATAPLANE_CONTROL_PORT);
150+
put("tx.dpf.consumer.proxy.port", PLATO_DATAPLANE_PROXY_PORT);
146151
put("edc.dataplane.token.validation.endpoint", "http://localhost:" + PLATO_DATAPLANE_CONTROL_PORT + "/api/dataplane/control/token");
147152
put("edc.dataplane.selector.httpplane.url", "http://localhost:" + PLATO_DATAPLANE_CONTROL_PORT + "/api/dataplane/control");
148153
put("edc.dataplane.selector.httpplane.sourcetypes", "HttpData");

0 commit comments

Comments
 (0)