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

Structure DigitalTwinId + "-" + SubmodelId is not allowed in the offerId field from contract negotiation request #484

Closed
matbmoser opened this issue Jun 14, 2023 · 7 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@matbmoser
Copy link

matbmoser commented Jun 14, 2023

Describe the bug

We at Catena-X were using the target as digital twin id + the submodel id to configure our assets at the providers.
At the previous version of the edc < v0.4.1 it was posible to use the following DID construction of offerid:

# digitalTwinId + "-" + submodelId
urn:uuid:32aa72de-297a-4405-9148-13e12744028a-urn:uuid:699f1245-f57e-4d6b-acdb-ab763665554a

Now the problem comes since the offer Id needs to have the following structure:

 #<edcContractId>:<target>:<generated offerId/policyId>
# Example:
1:urn:uuid:32aa72de-297a-4405-9148-13e12744028a-urn:uuid:699f1245-f57e-4d6b-acdb-ab763665554a:3a32e390-2dbf-4c22-894f-31ff6332919e

This causes that when we start the contract negotiation the request stays in state REQUESTING and never finds the correct asset.

Here is how you can reproduce it:

To Reproduce

1. Call the catalog:

image

2. Start contract negotiation:

image

3. Get negotiation:

image

NOTE: The contract negotiation blocks and stays in requesting until it loops 7 times and tries to terminate more 7 times.

Log at provider side:

DEBUG 2023-06-14T14:51:58.321440567 [Provider] Contract offer rejected as invalid: The ContractDefinition with id %s either does not exist or the access to it is not granted.

DEBUG 2023-06-14T14:52:15.33309943 DSP: Incoming ContractRequestMessage for contract negotiation process

DEBUG 2023-06-14T14:52:15.334312952 [Provider] Contract offer rejected as invalid: Invalid id: 1:urn:uuid:32aa72de-297a-4405-9148-13e12744028a-urn:uuid:699f1245-f57e-4d6b-acdb-ab763665554a:3a32e390-2dbf-4c22-894f-31ff6332919e

4. Negotiation tries to terminate but stays in a loop:

DEBUG 2023-06-14T14:58:08.056471186 ContractNegotiation: ID 84ae08f2-ea80-4d73-8e63-5224c54db912. [Consumer] send rejection
DEBUG 2023-06-14T14:58:08.425957651 ContractNegotiation: ID 0564deff-f6c0-46fc-b54c-24cc66d7ea8c. Attempt #5 failed to [Consumer] send rejection. Cause: org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp/negotiations/0564deff-f6c0-46fc-b54c-24cc66d7ea8c/termination, headers=[Content-Type:application/json, Authorization:eyJ0eXAiOiJhdCtqd3QiLCJraWQiOiJlM2I3ZTNjODliMDYwZmM4NWI2MDVmM2RhZWZiMWU1MGI0N2Y1OThmMDEyNzA0YzM0OWU3N2M1NjQwOGNhMjYxIiwiYWxnIjoiUlMyNTYifQ.eyJzY29wZSI6Imlkc2M6SURTX0NPTk5FQ1RPUl9BVFRSSUJVVEVTX0FMTCIsImF1ZCI6WyJodHRwczovL21hdGVyaWFscGFzcy5pbnQuZGVtby5jYXRlbmEteC5uZXQvQlBOTDAwMDAwMDAwMDAwMC9hcGkvdjEvZHNwIl0sImlzcyI6Imh0dHBzOi8vZGFwczEuaW50LmRlbW8uY2F0ZW5hLXgubmV0Iiwic3ViIjoiM0Y6RUU6NjA6N0U6Nzk6Q0M6QzI6QkU6NzA6OEE6NTY6MDU6MTM6OEU6NTI6MjI6NTI6NkE6MEQ6MTc6a2V5aWQ6M0Y6RUU6NjA6N0U6Nzk6Q0M6QzI6QkU6NzA6OEE6NTY6MDU6MTM6OEU6NTI6MjI6NTI6NkE6MEQ6MTciLCJuYmYiOjE2ODY3NTQ2NzIsImlhdCI6MTY4Njc1NDY3MiwianRpIjoiYTZjN2JiNTUtZTAzYi00YTcxLWE0NTMtZDE4OTE2MTA2ZWZjIiwiZXhwIjoxNjg2NzU4MjcyLCJjbGllbnRfaWQiOiIzRjpFRTo2MDo3RTo3OTpDQzpDMjpCRTo3MDo4QTo1NjowNToxMzo4RTo1MjoyMjo1Mjo2QTowRDoxNzprZXlpZDozRjpFRTo2MDo3RTo3OTpDQzpDMjpCRTo3MDo4QTo1NjowNToxMzo4RTo1MjoyMjo1Mjo2QTowRDoxNyIsIkB0eXBlIjoiaWRzOkRhdFBheWxvYWQiLCJAY29udGV4dCI6Imh0dHBzOi8vdzNpZC5vcmcvaWRzYS9jb250ZXh0cy9jb250ZXh0Lmpzb25sZCIsInNlY3VyaXR5UHJvZmlsZSI6IkJBU0VfU0VDVVJJVFlfUFJPRklMRSIsInJlZmVycmluZ0Nvbm5lY3RvciI6Imh0dHBzOi8vbWF0ZXJpYWxwYXNzLmRldi5kZW1vLmNhdGVuYS14Lm5ldC9jb25zdW1lci9CUE5MMDAwMDAwMDBDQkE1In0.T_OK90_9AmM_g7ubzDd3ZYYVcdGCTtqubai9JNQPwYN0--sjzyzRXPB_OCDScx9M8uDGAowBtLZHZFFh5SWVDgiCDyMv1UpEHyHRvWJJBKKbLYfbsvM31cDfMld2N52LpyfQ9JAoPAzKX2F8ZUgSoTQSBKDJGRyj38T8hk0vF3JayD9nsrBI347l5PnntG2QW94wCYsSof4ARxiIqJhFssKwED1EPoownSnk2CsEjU97I24syeWlJvk4EJk4T0wuvPLz_7KR2vvDGDihgZurz2aQSaajVlOlIbD3MptQtD1MDGBRZQLVtB_RsN_aIRXfYe9DLc1dtbVZjx25Uy4p4g]} was not successful but was 400: {"@context":{"@vocab":"https://w3id.org/edc/v0.0.1/ns/"},"@type":"https://w3id.org/dspace/v0.8/ContractNegotiationError","https://w3id.org/dspace/v0.8/code":"400","https://w3id.org/dspace/v0.8/reason":["ContractNegotiation with processId 0564deff-f6c0-46fc-b54c-24cc66d7ea8c not found"],"https://w3id.org/dspace/v0.8/processId":"0564deff-f6c0-46fc-b54c-24cc66d7ea8c"}
java.util.concurrent.CompletionException: org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp/negotiations/0564deff-f6c0-46fc-b54c-24cc66d7ea8c/termination, headers=[Content-Type:application/json, Authorization:eyJ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RvciI6Imh0dHBzOi8vbWF0ZXJpYWxwYXNzLmRldi5kZW1vLmNhdGVuYS14Lm5ldC9jb25zdW1lci9CUE5MMDAwMDAwMDBDQkE1In0.T_OK90_9AmM_g7ubzDd3ZYYVcdGCTtqubai9JNQPwYN0--sjzyzRXPB_OCDScx9M8uDGAowBtLZHZFFh5SWVDgiCDyMv1UpEHyHRvWJJBKKbLYfbsvM31cDfMld2N52LpyfQ9JAoPAzKX2F8ZUgSoTQSBKDJGRyj38T8hk0vF3JayD9nsrBI347l5PnntG2QW94wCYsSof4ARxiIqJhFssKwED1EPoownSnk2CsEjU97I24syeWlJvk4EJk4T0wuvPLz_7KR2vvDGDihgZurz2aQSaajVlOlIbD3MptQtD1MDGBRZQLVtB_RsN_aIRXfYe9DLc1dtbVZjx25Uy4p4g]} was not successful but was 400: {"@context":{"@vocab":"https://w3id.org/edc/v0.0.1/ns/"},"@type":"https://w3id.org/dspace/v0.8/ContractNegotiationError","https://w3id.org/dspace/v0.8/code":"400","https://w3id.org/dspace/v0.8/reason":["ContractNegotiation with processId 0564deff-f6c0-46fc-b54c-24cc66d7ea8c not found"],"https://w3id.org/dspace/v0.8/processId":"0564deff-f6c0-46fc-b54c-24cc66d7ea8c"}
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
at dev.failsafe.spi.FailsafeFuture.completeResult(FailsafeFuture.java:101)
at dev.failsafe.AsyncExecutionImpl.complete(AsyncExecutionImpl.java:153)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.whenComplete(Unknown Source)
at dev.failsafe.AsyncExecutionImpl.executeAsync(AsyncExecutionImpl.java:143)
at dev.failsafe.AsyncExecutionImpl.record(AsyncExecutionImpl.java:100)
at dev.failsafe.AsyncExecutionImpl.recordResult(AsyncExecutionImpl.java:106)
at dev.failsafe.okhttp.FailsafeCall$1.onResponse(FailsafeCall.java:145)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp/negotiations/0564deff-f6c0-46fc-b54c-24cc66d7ea8c/termination, headers=[Content-Type:application/json, Authorization:eyJ0eXAiOiJhdCtqd3QiLCJraWQiOiJlM2I3ZTNjODliMDYwZmM4NWI2MDVmM2RhZWZiMWU1MGI0N2Y1OThmMDEyNzA0YzM0OWU3N2M1NjQwOGNhMjYxIiwiYWxnIjoiUlMyNTYifQ.eyJzY29wZSI6Imlkc2M6SURTX0NPTk5FQ1RPUl9BVFRSSUJVVEVTX0FMTCIsImF1ZCI6WyJodHRwczovL21hdGVyaWFscGFzcy5pbnQuZGVtby5jYXRlbmEteC5uZXQvQlBOTDAwMDAwMDAwMDAwMC9hcGkvdjEvZHNwIl0sImlzcyI6Imh0dHBzOi8vZGFwczEuaW50LmRlbW8uY2F0ZW5hLXgubmV0Iiwic3ViIjoiM0Y6RUU6NjA6N0U6Nzk6Q0M6QzI6QkU6NzA6OEE6NTY6MDU6MTM6OEU6NTI6MjI6NTI6NkE6MEQ6MTc6a2V5aWQ6M0Y6RUU6NjA6N0U6Nzk6Q0M6QzI6QkU6NzA6OEE6NTY6MDU6MTM6OEU6NTI6MjI6NTI6NkE6MEQ6MTciLCJuYmYiOjE2ODY3NTQ2NzIsImlhdCI6MTY4Njc1NDY3MiwianRpIjoiYTZjN2JiNTUtZTAzYi00YTcxLWE0NTMtZDE4OTE2MTA2ZWZjIiwiZXhwIjoxNjg2NzU4MjcyLCJjbGllbnRfaWQiOiIzRjpFRTo2MDo3RTo3OTpDQzpDMjpCRTo3MDo4QTo1NjowNToxMzo4RTo1MjoyMjo1Mjo2QTowRDoxNzprZXlpZDozRjpFRTo2MDo3RTo3OTpDQzpDMjpCRTo3MDo4QTo1NjowNToxMzo4RTo1MjoyMjo1Mjo2QTowRDoxNyIsIkB0eXBlIjoiaWRzOkRhdFBheWxvYWQiLCJAY29udGV4dCI6Imh0dHBzOi8vdzNpZC5vcmcvaWRzYS9jb250ZXh0cy9jb250ZXh0Lmpzb25sZCIsInNlY3VyaXR5UHJvZmlsZSI6IkJBU0VfU0VDVVJJVFlfUFJPRklMRSIsInJlZmVycmluZ0Nvbm5lY3RvciI6Imh0dHBzOi8vbWF0ZXJpYWxwYXNzLmRldi5kZW1vLmNhdGVuYS14Lm5ldC9jb25zdW1lci9CUE5MMDAwMDAwMDBDQkE1In0.T_OK90_9AmM_g7ubzDd3ZYYVcdGCTtqubai9JNQPwYN0--sjzyzRXPB_OCDScx9M8uDGAowBtLZHZFFh5SWVDgiCDyMv1UpEHyHRvWJJBKKbLYfbsvM31cDfMld2N52LpyfQ9JAoPAzKX2F8ZUgSoTQSBKDJGRyj38T8hk0vF3JayD9nsrBI347l5PnntG2QW94wCYsSof4ARxiIqJhFssKwED1EPoownSnk2CsEjU97I24syeWlJvk4EJk4T0wuvPLz_7KR2vvDGDihgZurz2aQSaajVlOlIbD3MptQtD1MDGBRZQLVtB_RsN_aIRXfYe9DLc1dtbVZjx25Uy4p4g]} was not successful but was 400: {"@context":{"@vocab":"https://w3id.org/edc/v0.0.1/ns/"},"@type":"https://w3id.org/dspace/v0.8/ContractNegotiationError","https://w3id.org/dspace/v0.8/code":"400","https://w3id.org/dspace/v0.8/reason":["ContractNegotiation with processId 0564deff-f6c0-46fc-b54c-24cc66d7ea8c not found"],"https://w3id.org/dspace/v0.8/processId":"0564deff-f6c0-46fc-b54c-24cc66d7ea8c"}
at org.eclipse.edc.spi.http.FallbackFactories.lambda$statusMustBeSuccessful$0(FallbackFactories.java:41)
at dev.failsafe.Fallback.lambda$builderOfException$0(Fallback.java:106)
at dev.failsafe.internal.FallbackImpl.applyStage(FallbackImpl.java:68)
at dev.failsafe.internal.FallbackExecutor.lambda$applyAsync$2(FallbackExecutor.java:94)
at dev.failsafe.internal.FallbackExecutor.lambda$applyAsync$5(FallbackExecutor.java:109)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(Unknown Source)
at dev.failsafe.internal.FallbackExecutor.lambda$applyAsync$6(FallbackExecutor.java:80)
at dev.failsafe.internal.RetryPolicyExecutor.handleAsync(RetryPolicyExecutor.java:145)
at dev.failsafe.internal.RetryPolicyExecutor.lambda$applyAsync$1(RetryPolicyExecutor.java:125)
... 8 more

DEBUG 2023-06-14T14:58:08.430032768 [CONSUMER] ContractNegotiation 0564deff-f6c0-46fc-b54c-24cc66d7ea8c is now in state TERMINATING.

DEBUG 2023-06-14T14:58:09.130917348 Entity 0564deff-f6c0-46fc-b54c-24cc66d7ea8c ContractNegotiation retry #5 will not be attempted before 31296 ms

Status when asked for the negotiation:
{
    "@type": "edc:ContractNegotiationDto",
    "@id": "0564deff-f6c0-46fc-b54c-24cc66d7ea8c",
    "edc:type": "CONSUMER",
    "edc:protocol": "dataspace-protocol-http",
    "edc:state": "TERMINATING",
    "edc:counterPartyAddress": "https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp",
    "edc:callbackAddresses": [],
    "edc:errorDetail": "Failed to send ContractRequestMessage to provider: org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp/negotiations/request, headers=[Content-Type:application/json, Authorization:eyJ0eXAiOiJhdCtqd3QiLCJraW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XJpYWxwYXNzLmRldi5kZW1vLmNhdGVuYS14Lm5ldC9jb25zdW1lci9CUE5MMDAwMDAwMDBDQkE1In0.FTFsK4s-GNW48Of7LFExGYharyydRtqinC-c8L5TlEav_ZIJ2UuyMYrTuPlTxX6rFTP61g5Kcg8_EwONAwzajrrnu2c73r2ZAyL7tD1LYrTeZqAMk5Tn6-ZTXMhWw2zMdZlK-vdls82efRA5FQTXppkciuf_s7SmW8c8t7I6kd5n_sKK9cPOVWMqxAyKk4NocZpFOl_QKry9vYfpdeXtN5crW88dN7R3_8Uq-Y5uQwlzbTAdRvJzOrqFeGIHMrmoo5dE7egbPuQfw6RhsShfRWghyCMv_R77SD4jD5cRAjaGNZCJWGQEXi82dtIIhNp27Nr0ecjGRMZOHzD9QOiSPA]} was not successful but was 400: {\"@context\":{\"@vocab\":\"https://w3id.org/edc/v0.0.1/ns/\"},\"@type\":\"https://w3id.org/dspace/v0.8/ContractNegotiationError\",\"https://w3id.org/dspace/v0.8/code\":\"400\",\"https://w3id.org/dspace/v0.8/reason\":[\"Contract offer is not valid: Invalid id: 1:urn:uuid:32aa72de-297a-4405-9148-13e12744028a-urn:uuid:699f1245-f57e-4d6b-acdb-ab763665554a:3a32e390-2dbf-4c22-894f-31ff6332919e\"]}",
    "@context": {
        "dct": "https://purl.org/dc/terms/",
        "tx": "https://w3id.org/tractusx/v0.0.1/ns/",
        "edc": "https://w3id.org/edc/v0.0.1/ns/",
        "dcat": "https://www.w3.org/ns/dcat/",
        "odrl": "http://www.w3.org/ns/odrl/2/",
        "dspace": "https://w3id.org/dspace/v0.8/"
    }
}

5. After he tries to terminate 7 times he terminates.

DEBUG 2023-06-14T15:02:25.392032857 ContractNegotiation: ID 0564deff-f6c0-46fc-b54c-24cc66d7ea8c. [Consumer] send rejection
SEVERE 2023-06-14T15:02:40.998556211 ContractNegotiation: ID 0564deff-f6c0-46fc-b54c-24cc66d7ea8c. Attempt #8 failed to [Consumer] send rejection. Retry limit exceeded. Cause: org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp/negotiations/0564deff-f6c0-46fc-b54c-24cc66d7ea8c/termination, headers=[Content-Type:application/json, Authorization:eyJ0eXAiOiJhdCtqd3QiLCJraWQiOiJlM2I3ZTNjODliMDYwZmM4NWI2MDVmM2RhZWZiMWU1MGI0N2Y1OThmMDEyNzA0YzM0OWU3N2M1NjQwOGNhMjYxIiwiYWxnIjoiUlMyNTYifQ.eyJzY29wZSI6Imlkc2M6SURTX0NPTk5FQ1RPUl9BVFRSSUJVVEVTX0FMTCIsImF1ZCI6WyJodHRwczovL21hdGVyaWFscGFzcy5pbnQuZGVtby5jYXRlbmEteC5uZXQvQlBOTDAwMDAwMDAwMDAwMC9hcGkvdjEvZHNwIl0sImlzcyI6Imh0dHBzOi8vZGFwczEuaW50LmRlbW8uY2F0ZW5hLXgubmV0Iiwic3ViIjoiM0Y6RUU6NjA6N0U6Nzk6Q0M6QzI6QkU6NzA6OEE6NTY6MDU6MTM6OEU6NTI6MjI6NTI6NkE6MEQ6MTc6a2V5aWQ6M0Y6RUU6NjA6N0U6Nzk6Q0M6QzI6QkU6NzA6OEE6NTY6MDU6MTM6OEU6NTI6MjI6NTI6NkE6MEQ6MTciLCJuYmYiOjE2ODY3NTQ5NDUsImlhdCI6MTY4Njc1NDk0NSwianRpIjoiODUwZGM1NGQtMjAwNi00ZDU4LWE5M2MtNGI1ODA4MDdhYTQwIiwiZXhwIjoxNjg2NzU4NTQ1LCJjbGllbnRfaWQiOiIzRjpFRTo2MDo3RTo3OTpDQzpDMjpCRTo3MDo4QTo1NjowNToxMzo4RTo1MjoyMjo1Mjo2QTowRDoxNzprZXlpZDozRjpFRTo2MDo3RTo3OTpDQzpDMjpCRTo3MDo4QTo1NjowNToxMzo4RTo1MjoyMjo1Mjo2QTowRDoxNyIsIkB0eXBlIjoiaWRzOkRhdFBheWxvYWQiLCJAY29udGV4dCI6Imh0dHBzOi8vdzNpZC5vcmcvaWRzYS9jb250ZXh0cy9jb250ZXh0Lmpzb25sZCIsInNlY3VyaXR5UHJvZmlsZSI6IkJBU0VfU0VDVVJJVFlfUFJPRklMRSIsInJlZmVycmluZ0Nvbm5lY3RvciI6Imh0dHBzOi8vbWF0ZXJpYWxwYXNzLmRldi5kZW1vLmNhdGVuYS14Lm5ldC9jb25zdW1lci9CUE5MMDAwMDAwMDBDQkE1In0.ZyvsQLi6r0bLmagdtsI6aiV_WWId4pzQc02wBAtg4gHeCHqTkJjPK8JdtR3iYWeM7J4u9IvbCX2gELh3TyLOp7tfr05uPekwkfFiBZhH_B_beC4Jr71tcaKY1a75BydraNnuwYNisj5S7FDgSmXpIMTw3kHru6nthEY_5d3krlOFwemzdmG_xoKDnTqThtOiRlISiH6747vfPgnDNlyvr-ozy3ji63obJKqdNMnpHWZykq8pph_3nR2i6b4w7Yx_ZXbXYa5SdB41g7_869nD3CQVBmr74o966M0iIdZ-sLa5aiPRXE2bNBARgsdy_kT51T9-7rGiJ4T3Bi8MEIK5TA]} was not successful but was 400: {"@context":{"@vocab":"https://w3id.org/edc/v0.0.1/ns/"},"@type":"https://w3id.org/dspace/v0.8/ContractNegotiationError","https://w3id.org/dspace/v0.8/code":"400","https://w3id.org/dspace/v0.8/reason":["ContractNegotiation with processId 0564deff-f6c0-46fc-b54c-24cc66d7ea8c not found"],"https://w3id.org/dspace/v0.8/processId":"0564deff-f6c0-46fc-b54c-24cc66d7ea8c"}
java.util.concurrent.CompletionException: org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp/negotiations/0564deff-f6c0-46fc-b54c-24cc66d7ea8c/termination, headers=[Content-Type:application/json, Authorization:eyJ0eXAiOiJhdCtqd3QiLCJraWQiOiJlM2I3ZTNjODliMDYwZmM4NWI2MDVmM2RhZWZiMWU1MGI0N2Y1OThmMDEyNzA0YzM0OWU3N2M1NjQwOGNhMj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bLmagdtsI6aiV_WWId4pzQc02wBAtg4gHeCHqTkJjPK8JdtR3iYWeM7J4u9IvbCX2gELh3TyLOp7tfr05uPekwkfFiBZhH_B_beC4Jr71tcaKY1a75BydraNnuwYNisj5S7FDgSmXpIMTw3kHru6nthEY_5d3krlOFwemzdmG_xoKDnTqThtOiRlISiH6747vfPgnDNlyvr-ozy3ji63obJKqdNMnpHWZykq8pph_3nR2i6b4w7Yx_ZXbXYa5SdB41g7_869nD3CQVBmr74o966M0iIdZ-sLa5aiPRXE2bNBARgsdy_kT51T9-7rGiJ4T3Bi8MEIK5TA]} was not successful but was 400: {"@context":{"@vocab":"https://w3id.org/edc/v0.0.1/ns/"},"@type":"https://w3id.org/dspace/v0.8/ContractNegotiationError","https://w3id.org/dspace/v0.8/code":"400","https://w3id.org/dspace/v0.8/reason":["ContractNegotiation with processId 0564deff-f6c0-46fc-b54c-24cc66d7ea8c not found"],"https://w3id.org/dspace/v0.8/processId":"0564deff-f6c0-46fc-b54c-24cc66d7ea8c"}
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
at dev.failsafe.spi.FailsafeFuture.completeResult(FailsafeFuture.java:101)
at dev.failsafe.AsyncExecutionImpl.complete(AsyncExecutionImpl.java:153)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.whenComplete(Unknown Source)
at dev.failsafe.AsyncExecutionImpl.executeAsync(AsyncExecutionImpl.java:143)
at dev.failsafe.AsyncExecutionImpl.record(AsyncExecutionImpl.java:100)
at dev.failsafe.AsyncExecutionImpl.recordResult(AsyncExecutionImpl.java:106)
at dev.failsafe.okhttp.FailsafeCall$1.onResponse(FailsafeCall.java:145)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp/negotiations/0564deff-f6c0-46fc-b54c-24cc66d7ea8c/termination, headers=[Content-Type:application/json, Authorization:eyJ0eXAiOiJhdCtqd3QiLCJraWQiOiJlM2I3ZTNjODliMDYwZmM4NWI2MDVmM2RhZWZiMWU1MGI0N2Y1OThmMDEyNzA0YzM0OWU3N2M1NjQwOGNhMjYxIiwiYWxnIjoiUlMyNTYifQ.eyJzY29wZSI6Imlkc2M6SURTX0NPTk5FQ1RPUl9BVFRSSUJVVEVTX0FMTCIsImF1ZCI6WyJodHRwczovL21hdGVyaWFscGFzcy5pbnQuZGVtby5jYXRlbmEteC5uZXQvQlBOTDAwMDAwMDAwMDAwMC9hcGkvdjEvZHNwIl0sImlzcyI6Imh0dHBzOi8vZGFwczEuaW50LmRlbW8uY2F0ZW5hLXgubmV0Iiwic3ViIjoiM0Y6RUU6NjA6N0U6Nzk6Q0M6QzI6QkU6NzA6OEE6NTY6MDU6MTM6OEU6NTI6MjI6NTI6NkE6MEQ6MTc6a2V5aWQ6M0Y6RUU6NjA6N0U6Nzk6Q0M6QzI6QkU6NzA6OEE6NTY6MDU6MTM6OEU6NTI6MjI6NTI6NkE6MEQ6MTciLCJuYmYiOjE2ODY3NTQ5NDUsImlhdCI6MTY4Njc1NDk0NSwianRpIjoiODUwZGM1NGQtMjAwNi00ZDU4LWE5M2MtNGI1ODA4MDdhYTQwIiwiZXhwIjoxNjg2NzU4NTQ1LCJjbGllbnRfaWQiOiIzRjpFRTo2MDo3RTo3OTpDQzpDMjpCRTo3MDo4QTo1NjowNToxMzo4RTo1MjoyMjo1Mjo2QTowRDoxNzprZXlpZDozRjpFRTo2MDo3RTo3OTpDQzpDMjpCRTo3MDo4QTo1NjowNToxMzo4RTo1MjoyMjo1Mjo2QTowRDoxNyIsIkB0eXBlIjoiaWRzOkRhdFBheWxvYWQiLCJAY29udGV4dCI6Imh0dHBzOi8vdzNpZC5vcmcvaWRzYS9jb250ZXh0cy9jb250ZXh0Lmpzb25sZCIsInNlY3VyaXR5UHJvZmlsZSI6IkJBU0VfU0VDVVJJVFlfUFJPRklMRSIsInJlZmVycmluZ0Nvbm5lY3RvciI6Imh0dHBzOi8vbWF0ZXJpYWxwYXNzLmRldi5kZW1vLmNhdGVuYS14Lm5ldC9jb25zdW1lci9CUE5MMDAwMDAwMDBDQkE1In0.ZyvsQLi6r0bLmagdtsI6aiV_WWId4pzQc02wBAtg4gHeCHqTkJjPK8JdtR3iYWeM7J4u9IvbCX2gELh3TyLOp7tfr05uPekwkfFiBZhH_B_beC4Jr71tcaKY1a75BydraNnuwYNisj5S7FDgSmXpIMTw3kHru6nthEY_5d3krlOFwemzdmG_xoKDnTqThtOiRlISiH6747vfPgnDNlyvr-ozy3ji63obJKqdNMnpHWZykq8pph_3nR2i6b4w7Yx_ZXbXYa5SdB41g7_869nD3CQVBmr74o966M0iIdZ-sLa5aiPRXE2bNBARgsdy_kT51T9-7rGiJ4T3Bi8MEIK5TA]} was not successful but was 400: {"@context":{"@vocab":"https://w3id.org/edc/v0.0.1/ns/"},"@type":"https://w3id.org/dspace/v0.8/ContractNegotiationError","https://w3id.org/dspace/v0.8/code":"400","https://w3id.org/dspace/v0.8/reason":["ContractNegotiation with processId 0564deff-f6c0-46fc-b54c-24cc66d7ea8c not found"],"https://w3id.org/dspace/v0.8/processId":"0564deff-f6c0-46fc-b54c-24cc66d7ea8c"}
at org.eclipse.edc.spi.http.FallbackFactories.lambda$statusMustBeSuccessful$0(FallbackFactories.java:41)
at dev.failsafe.Fallback.lambda$builderOfException$0(Fallback.java:106)
at dev.failsafe.internal.FallbackImpl.applyStage(FallbackImpl.java:68)
at dev.failsafe.internal.FallbackExecutor.lambda$applyAsync$2(FallbackExecutor.java:94)
at dev.failsafe.internal.FallbackExecutor.lambda$applyAsync$5(FallbackExecutor.java:109)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(Unknown Source)
at dev.failsafe.internal.FallbackExecutor.lambda$applyAsync$6(FallbackExecutor.java:80)
at dev.failsafe.internal.RetryPolicyExecutor.handleAsync(RetryPolicyExecutor.java:145)
at dev.failsafe.internal.RetryPolicyExecutor.lambda$applyAsync$1(RetryPolicyExecutor.java:125)
... more
DEBUG 2023-06-14T15:02:41.00275903 [CONSUMER] ContractNegotiation 0564deff-f6c0-46fc-b54c-24cc66d7ea8c is now in state TERMINATED.

Payload from negotiation response after terminated:

{
    "@type": "edc:ContractNegotiationDto",
    "@id": "0564deff-f6c0-46fc-b54c-24cc66d7ea8c",
    "edc:type": "CONSUMER",
    "edc:protocol": "dataspace-protocol-http",
    "edc:state": "TERMINATED",
    "edc:counterPartyAddress": "https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp",
    "edc:callbackAddresses": [],
    "edc:errorDetail": "Failed to send ContractNegotiationTerminationMessage to provider: org.eclipse.edc.spi.http.EdcHttpClientException: Server response to Request{method=POST, url=https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/v1/dsp/negotiations/0564deff-f6c0-46fc-b54c-24cc66d7ea8c/termination, headers=[Content-Type:application/json, Authorization:eyJ0eXAiOiJhdCtqd3QiLCJraWQiOiJlM2I3ZTNjODliMDYwZmM4NWI2MDVmM2RhZWZiMWU1MGI0N2Y1OThmMDEyNzA0YzM0OWU3N2M1NjQwOGNhMjYxIiwiYWxnIjoiUlMyNTYifQ.eyJzY29wZSI6Imlkc2M6SURTX0NPTk5FQ1RPUl9BVFRSSUJ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7tfr05uPekwkfFiBZhH_B_beC4Jr71tcaKY1a75BydraNnuwYNisj5S7FDgSmXpIMTw3kHru6nthEY_5d3krlOFwemzdmG_xoKDnTqThtOiRlISiH6747vfPgnDNlyvr-ozy3ji63obJKqdNMnpHWZykq8pph_3nR2i6b4w7Yx_ZXbXYa5SdB41g7_869nD3CQVBmr74o966M0iIdZ-sLa5aiPRXE2bNBARgsdy_kT51T9-7rGiJ4T3Bi8MEIK5TA]} was not successful but was 400: {\"@context\":{\"@vocab\":\"https://w3id.org/edc/v0.0.1/ns/\"},\"@type\":\"https://w3id.org/dspace/v0.8/ContractNegotiationError\",\"https://w3id.org/dspace/v0.8/code\":\"400\",\"https://w3id.org/dspace/v0.8/reason\":[\"ContractNegotiation with processId 0564deff-f6c0-46fc-b54c-24cc66d7ea8c not found\"],\"https://w3id.org/dspace/v0.8/processId\":\"0564deff-f6c0-46fc-b54c-24cc66d7ea8c\"}",
    "@context": {
        "dct": "https://purl.org/dc/terms/",
        "tx": "https://w3id.org/tractusx/v0.0.1/ns/",
        "edc": "https://w3id.org/edc/v0.0.1/ns/",
        "dcat": "https://www.w3.org/ns/dcat/",
        "odrl": "http://www.w3.org/ns/odrl/2/",
        "dspace": "https://w3id.org/dspace/v0.8/"
    }
}

Working Example:

Lets do the same as before but using a simple target id like: "3"

1. Request Catalog:

image

2. Start negotiation:

image

3. Get negotiation

image

Logs at provider:
DEBUG 2023-06-14T15:08:20.025974152 DSP: Incoming ContractRequestMessage for contract negotiation process
DEBUG 2023-06-14T15:08:20.036052734 [Provider] Contract offer received.
DEBUG 2023-06-14T15:08:20.039046588 [PROVIDER] ContractNegotiation d919e9a6-5869-491f-b705-70ec4c94778e is now in state REQUESTED.
DEBUG 2023-06-14T15:08:20.46417716 [PROVIDER] ContractNegotiation d919e9a6-5869-491f-b705-70ec4c94778e is now in state AGREEING.
DEBUG 2023-06-14T15:08:20.470863081 ContractNegotiation: ID d919e9a6-5869-491f-b705-70ec4c94778e. [Provider] send agreement
DEBUG 2023-06-14T15:08:20.64869199 [PROVIDER] ContractNegotiation d919e9a6-5869-491f-b705-70ec4c94778e is now in state AGREED.
DEBUG 2023-06-14T15:08:21.11687344 DSP: Incoming ContractAgreementVerificationMessage for contract negotiation process: 40fcbba9-4733-423f-abf3-21672dfeebb0
DEBUG 2023-06-14T15:08:21.133107633 [PROVIDER] ContractNegotiation d919e9a6-5869-491f-b705-70ec4c94778e is now in state VERIFIED.
DEBUG 2023-06-14T15:08:21.651087181 [PROVIDER] ContractNegotiation d919e9a6-5869-491f-b705-70ec4c94778e is now in state FINALIZING.
DEBUG 2023-06-14T15:08:21.658177009 ContractNegotiation: ID d919e9a6-5869-491f-b705-70ec4c94778e. [Provider] send finalization
DEBUG 2023-06-14T15:08:21.741778018 [PROVIDER] ContractNegotiation d919e9a6-5869-491f-b705-70ec4c94778e is now in state FINALIZED

Expected behavior

It should work even if we use DIDs as targets. Because this has been standardized between the companies and is a way to search the asset by target in the EDC provider side.

Context Informations

Add any other context about the probleme here.

  • Used version: v0.4.1
  • OS: Windows, Kubernetes container in Argo CD Linux
  • Docker Version: v0.4.1

Possible Implementation

Ideas:

  • Parse the target id in another way, for example: In another field.
  • Allow other types of separators for the offerId for example: "/", ";" or "_"
  • Make an exception for the following targets "digitalTwinId (UUID)" + "-" + "submodelId (UUID)"
@matbmoser matbmoser added the bug Something isn't working label Jun 14, 2023
@matbmoser matbmoser changed the title Structure DigitalTwinId + "-" + SubmodelId is not allowed in the offerId from contract negotiation request Structure DigitalTwinId + "-" + SubmodelId is not allowed in the offerId from contract negotiation request Jun 14, 2023
@matbmoser matbmoser changed the title Structure DigitalTwinId + "-" + SubmodelId is not allowed in the offerId from contract negotiation request Structure DigitalTwinId + "-" + SubmodelId is not allowed in the offerId field from contract negotiation request Jun 14, 2023
@matbmoser matbmoser added the enhancement New feature or request label Jun 14, 2023
@paullatzelsperger
Copy link
Contributor

paullatzelsperger commented Jun 22, 2023

The problem here is, that on contract negotiation, we combine the contract-definition-id, the asset-id and a random UUID into one string using the colon ":" as separator: <DEF_ID>:<ASSET_ID>:<UUID>. so your urn:uuid:... gets misinterpreted.

As this is not specific to Tractus-X EDC, but rather the upstream, we should deal with this there.

[edit]: I created an issue in upstream EDC: eclipse-edc/Connector#3211

@paullatzelsperger
Copy link
Contributor

We looked at your example once again, and it seems like there is two issues with you code:

  1. All IDs should be UUIDs, please don't use special characters such as ":"
  2. Encoding submodel IDs in the asset ID is not a good idea, it's better to put this into a asset property

Nevertheless, we will try to make the <DEF_ID>:<ASSET_ID>:<UUID> thing of contract negotiations more robust.

@ndr-brt
Copy link
Contributor

ndr-brt commented Jun 28, 2023

this has been fixed upstream by encoding the 3 parts of the id, will be part of the next release: eclipse-edc/Connector#3211

@matbmoser
Copy link
Author

matbmoser commented Jun 28, 2023

Awesome to hear that! Thank you @paullatzelsperger and @ndr-brt!

That not only affected our product also affects the IRS for example since they are all using this urn:uuid: prefix ;)

@florianrusch-zf
Copy link
Contributor

I assume that we then also need a patch for 0.4.1, otherwise none of the use cases/products can use 0.4.1 at the moment.

@stefan-ettl I guess a ZF colleague has already told you that.

@wolf4ood
Copy link
Contributor

wolf4ood commented Jul 6, 2023

Hi @matbmoser

we incorporated the upstream EDC fix in the latest 0.5.0-rc5 release.
If you have time give it a try :)

Thanks

@matbmoser
Copy link
Author

matbmoser commented Jul 13, 2023

image
I just got the catalog and the Policy Id (EDC 0.5.0) is correctly included and Encoded in Base64 :) Thank you guys!

@ndr-brt ndr-brt closed this as completed Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants