diff --git a/edc-controlplane/edc-controlplane-construct-x/local/README.md b/edc-controlplane/edc-controlplane-construct-x/local/README.md index dac9e8daca..342ba4e575 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/README.md +++ b/edc-controlplane/edc-controlplane-construct-x/local/README.md @@ -5,9 +5,8 @@ This `docker-compose.yaml` provides you a minimal environment for testing a pair It will start the following containers on your local machine: -- one instance of an issuer-service -- two instances of identity-hubs (for consumer and provider each) -- two instances of our current Construct-X controlplanes (as above) +- two instances of con-x wallets (one for a con-x issuer and one for a consumer and a provider each) +- two instances of our current Construct-X controlplanes (one for a consumer and a provider each) - two instances of our current Construct-X dataplanes (as above) - one Postgres DB (which is, for the sake of saving you resources on your local machine, shared by all aforementioned containers) - one HashiCorp Vault (also shared) @@ -17,8 +16,11 @@ It will start the following containers on your local machine: Before anything else, please make sure you have the docker images for con-x-controlplane-postgresql-hashicorp-vault in your local docker repository, see [here](../con-x-controlplane-postgresql-hashicorp-vault/README.md) and [here](../../../edc-dataplane/edc-dataplane-construct-x/con-x-dataplane-postgresql-hashicorp-vault/README.md). -Beyond that, you need to obtain the docker images needed to run the identity hub and the issuer services. In order to do so, please check out this [repository](https://github.com/FraunhoferISST/dev-identity-services) and clone it onto your local machine. The upper section of this [README](https://github.com/FraunhoferISST/dev-identity-services/blob/main/runtimes/dev/README.md) informs -you about the steps necessary to create the docker images. +Beyond that, you need to obtain the docker image needed to run the wallets. The image is hosted on ghcr.io and should +be downloaded automatically as soon as you start the docker-compose (see below). If the image download fails, the most +likely reason is that you need to do a docker login first. Please use a GitHub account, that is a member of the project-construct-x GitHub organization. If you don't already have one, you will need to create a Personal Access Token (classic) on your GitHub account. This token should minimally have the 'read:packages' privilege. + +Then please open a shell and do a docker login with that token as described [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic). ### Start the environment @@ -59,11 +61,10 @@ The issuer-participant will act as the dataspaces' trusted issuer. This issuer i out verifiable credentials, which the members of the dataspace can use to prove their membership (or potentially other relevant properties of themselves) to other partners in the same dataspace. After the registration of the issuer we are also providing the basic definition of the credential that shall be issued. And we also need register the expected ( -user-) members of the dataspace at the issuer service as holders at the trusted issuer's participant context. - -Assuming that the majority of users does not (at least in the beginning) want to get into the details of designing credentials, you can most probably skip the `Optionalconfig` folder (though it does no harm, if you run these requests, as long as you don't edit these requests in any way). If you're interested in the (rather advanced) topic of using customized credential subject contents in your credentials, you can take a further look at this [README](https://github.com/FraunhoferISST/dev-identity-services/blob/main/runtimes/dev/README.md). +user-) members of the dataspace at the issuer service as holders at the trusted issuer's participant context. -Pretty much the same goes for the `createAttestation` and the `createCredentialDef` requests. If you're an average user, you just need to know that +The `createAttestation` and the `createCredentialDef` requests are technically necessary to prepare the issuer to handle +incoming credential requests from the consumer and provider wallet. If you're an average user, you just need to know that they are a technical necessity at this point and you just to need to run them to ensure that rest of the requests in this collection can be executed properly. ### Create a consumer and a provider identity @@ -79,15 +80,6 @@ respectively. And we can also do some kind of a simulated DCP flow with the just documentation in the Bruno collection if you are interested in learning some more details (though that is directed at the more advanced members of the audience here, beginners can definitely skip that part). -#### Known issue / validating the identity setup -In rare cases (chances seem to be below 0.5 %) there is currently a possibility, that one of the `CreateParticipant` calls may (silently) fail. We assume that this is something that needs to be fixed on the upstream EDC identity hub project. See this [issue](https://github.com/eclipse-edc/IdentityHub/issues/913) for details. If you are unfortunate enough encounter this bug, you should notice that one of the calls in the `InspectOutcome` folder shows an empty response and that (at least) the last call of `Simulated DCP Flow` shows a negative test result. - -If one encounter one these symptoms, we would suggest that you cleanly restart the entire docker compose (see below). Chances -are near 99 % that on your next attempt, you won't encounter this problem again. - -Also, if you're interested in some more details - - ### Do a transaction between provider and consumer Finally, we are ready now to do a more or less 'normal' DSP/DCP protocol backed transaction between the consumer and the diff --git a/edc-controlplane/edc-controlplane-construct-x/local/additional_config/logging.properties b/edc-controlplane/edc-controlplane-construct-x/local/additional_config/logging.properties deleted file mode 100644 index 5c9a7fbcb3..0000000000 --- a/edc-controlplane/edc-controlplane-construct-x/local/additional_config/logging.properties +++ /dev/null @@ -1,18 +0,0 @@ -handlers = java.util.logging.ConsoleHandler - -# Console Handler Config - -java.util.logging.ConsoleHandler.formatter = org.eclipse.tractusx.identityhub.monitor.ColorfulFormatter -java.util.logging.ConsoleHandler.level = FINE - -# Root level und Package-level - -.level = INFO -jakarta.json.level = OFF -jdk.event.level = OFF -okhttp3.internal.level = OFF -org.eclipse.edc.level = FINE -org.flywaydb.level = OFF -org.glassfish.level = OFF -org.jvnet.level = OFF -org.postgresql.level = OFF \ No newline at end of file diff --git a/edc-controlplane/edc-controlplane-construct-x/local/additional_config/mc-cred-def.json b/edc-controlplane/edc-controlplane-construct-x/local/additional_config/mc-cred-def.json deleted file mode 100644 index 9defee0bfa..0000000000 --- a/edc-controlplane/edc-controlplane-construct-x/local/additional_config/mc-cred-def.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "MC-Cred-Def": { - "blackList": [], - "default": { - "credentialSubject": { - "isMember": true - } - } - } -} \ No newline at end of file diff --git a/edc-controlplane/edc-controlplane-construct-x/local/additional_config/vault-init.sh b/edc-controlplane/edc-controlplane-construct-x/local/additional_config/vault-init.sh index 996c237bba..a512381361 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/additional_config/vault-init.sh +++ b/edc-controlplane/edc-controlplane-construct-x/local/additional_config/vault-init.sh @@ -49,4 +49,29 @@ create_and_store_keypair() { # create keypair for consumer and provider dataplane: create_and_store_keypair "cons" -create_and_store_keypair "prov" \ No newline at end of file +create_and_store_keypair "prov" + +create_and_store_aes_key() { + local prefix=$1 + local aes_key + + # AES-Key erzeugen + aes_key="$(openssl rand -base64 32 | tr -d '\n')" + + # AES-Key in Vault schreiben, Pfad an Prefix koppeln + jq -n --arg content "$aes_key" '{data:{content:$content}}' | \ + curl -sSf \ + -H "X-Vault-Token: $TOKEN" \ + -H "Content-Type: application/json" \ + -X POST \ + --data-binary @- \ + "$VAULT/v1/secret/data/${prefix}-aes-key-alias" \ + || { echo "Failed to create aes key entry for ${prefix}"; exit 1; } + + echo "AES key stored at secret/data/${prefix}-aes-key-alias" +} + +# create AES keys for wallets +create_and_store_aes_key "issuer-wallet" +create_and_store_aes_key "consumer-wallet" +create_and_store_aes_key "provider-wallet" \ No newline at end of file diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/environments/local-con-x-env.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/environments/local-con-x-env.bru index 09f0b73b0e..df66b443df 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/environments/local-con-x-env.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/environments/local-con-x-env.bru @@ -19,12 +19,9 @@ vars { PROVIDER_IDHUB_ID_API: http://localhost:21100/api/identity PROVIDER_IDHUB_STS_API: http://localhost:21500/api/sts PROVIDER_IDHUB_CREDS_API: http://localhost:21600/api/credentials - ISS_ID: did:web:local-issuer-service:con-x-issuer - CONS_ID: did:web:consumer-idhub:user:consumer - PROV_ID: did:web:provider-idhub:user:provider - B64_ISS_ID: - B64_CONS_ID: - B64_PROV_ID: + ISS_ID: did:web:local-issuer-wallet:con-x-issuer + CONS_ID: did:web:consumer-wallet:user:consumer + PROV_ID: did:web:provider-wallet:user:provider cons_access_token: eyJraWQiOiJkaWQ6d2ViOmNvbnN1bWVyLWlkaHViOnVzZXI6Y29uc3VtZXIja2V5LTEiLCJhbGciOiJFZDI1NTE5In0.eyJhdWQiOiJkaWQ6d2ViOmNvbnN1bWVyLWlkaHViOnVzZXI6Y29uc3VtZXIiLCJzdWIiOiJkaWQ6d2ViOnByb3ZpZGVyLWlkaHViOnVzZXI6cHJvdmlkZXIiLCJuYmYiOjE3NzAyNzg5NTQsInNjb3BlIjoib3JnLmVjbGlwc2UudHJhY3R1c3gudmMudHlwZTpNZW1iZXJzaGlwQ3JlZGVudGlhbDpyZWFkIiwiaXNzIjoiZGlkOndlYjpjb25zdW1lci1pZGh1Yjp1c2VyOmNvbnN1bWVyIiwiZXhwIjoxNzcwMjc5MjU0LCJpYXQiOjE3NzAyNzg5NTQsImp0aSI6ImFjY2Vzc3Rva2VuLTcxYThmNTA5LTgwYTktNDMwZC1iMjU0LTMxNGFiYTBkNjY5OSJ9.ipRpdi_Ekh7y4IIqhqLgHU35Fn7NNkv6e6hILXy8pZObdy33y3MKppI61424eyHwqzmh7X2kwV2S5gDy3aOKCQ prov_access_token: eyJraWQiOiJkaWQ6d2ViOnByb3ZpZGVyLWlkaHViOnVzZXI6cHJvdmlkZXIja2V5LTEiLCJhbGciOiJFZDI1NTE5In0.eyJzdWIiOiJkaWQ6d2ViOnByb3ZpZGVyLWlkaHViOnVzZXI6cHJvdmlkZXIiLCJhdWQiOiJkaWQ6d2ViOmNvbnN1bWVyLWlkaHViOnVzZXI6Y29uc3VtZXIiLCJuYmYiOjE3NzAyNzg5NTUsImlzcyI6ImRpZDp3ZWI6cHJvdmlkZXItaWRodWI6dXNlcjpwcm92aWRlciIsImV4cCI6MTc3MDI3OTI1NSwiaWF0IjoxNzcwMjc4OTU1LCJqdGkiOiJkNjA0MTVjOS1kMGM0LTRiNWQtYjI4My01ZmNmYjhlMDY2OGQiLCJ0b2tlbiI6ImV5SnJhV1FpT2lKa2FXUTZkMlZpT21OdmJuTjFiV1Z5TFdsa2FIVmlPblZ6WlhJNlkyOXVjM1Z0WlhJamEyVjVMVEVpTENKaGJHY2lPaUpGWkRJMU5URTVJbjAuZXlKaGRXUWlPaUprYVdRNmQyVmlPbU52Ym5OMWJXVnlMV2xrYUhWaU9uVnpaWEk2WTI5dWMzVnRaWElpTENKemRXSWlPaUprYVdRNmQyVmlPbkJ5YjNacFpHVnlMV2xrYUhWaU9uVnpaWEk2Y0hKdmRtbGtaWElpTENKdVltWWlPakUzTnpBeU56ZzVOVFFzSW5OamIzQmxJam9pYjNKbkxtVmpiR2x3YzJVdWRISmhZM1IxYzNndWRtTXVkSGx3WlRwTlpXMWlaWEp6YUdsd1EzSmxaR1Z1ZEdsaGJEcHlaV0ZrSWl3aWFYTnpJam9pWkdsa09uZGxZanBqYjI1emRXMWxjaTFwWkdoMVlqcDFjMlZ5T21OdmJuTjFiV1Z5SWl3aVpYaHdJam94Tnpjd01qYzVNalUwTENKcFlYUWlPakUzTnpBeU56ZzVOVFFzSW1wMGFTSTZJbUZqWTJWemMzUnZhMlZ1TFRjeFlUaG1OVEE1TFRnd1lUa3RORE13WkMxaU1qVTBMVE14TkdGaVlUQmtOalk1T1NKOS5pcFJwZGlfRWtoN3k0SUlxaHFMZ0hVMzVGbjdOTmt2NmU2aElMWHk4cFpPYmR5MzN5M01LcHBJNjE0MjRleUh3cXptaDdYMmt3VjJTNWdEeTNhT0tDUSJ9.42YDTnuzZ0RprqLjFw6hUoAXrgpPxyzKNFrqLdbWz6HXAiujkq32QAFU-M9gtQ0hMNcjshRZUX6DryBWxhGNDw offerId: MQ==:YXNzZXRJZA==:MDFhN2ZjYWYtODgzOS00N2JmLTllZDAtM2Y0YjliMTFiOWM5 @@ -32,4 +29,7 @@ vars { contractId: 3345f7f1-f735-4c92-8aa2-6e137203b2f9 transferId: 3ebe55c6-900a-4c03-b213-20c5c3f0274d pullSecret: eyJraWQiOiJwcm92X3B1YiIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJhbm9ueW1vdXMiLCJhdWQiOiJkaWQ6d2ViOmNvbnN1bWVyLWlkaHViOnVzZXI6Y29uc3VtZXIiLCJzdWIiOiJhbm9ueW1vdXMiLCJpYXQiOjE3NzAyNzg5ODgsImp0aSI6IjUwYWQxMjk3LWZhN2QtNDI0ZC1hNjBhLTg5M2MwMGE4OTZhYyJ9.GkSz0qXhFmqPaLQpfPLkAvODX-iekoAQvLh3Kglhm7DApNF3PsGnv-Qzm7m8eNAqTUTWB9XXkRng_XqWmuAd-FWvzwG8d7ZaAahuykkOgX1W7vHWBMdJa-zvNm0cnzm-TQLWYCU-tDSKk_g_UrDUaFf9Jdq-avCoer3wcZrEmrf0K4o_WWs-l5hZEfDIOYHRsgoCY3P8pMcZYRjV57zdLUDl9SvLuCRR0ex0fKxJ2pb7mlaCL5ooD6fRaqWyrLvrIKZaDYfwKrX7IRJT9ePKyls9VKA9JBakh676L0jBr5-2TYG3uE9Xhyv4CZlqyck-_NyiL4Jao8-lL5FVCbPDVQ + ISS_PART_CONT: localissuer + CONS_PART_CONT: consumer + PROV_PART_CONT: provider } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Inspect Outcome/ShowConsumerCredentials.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Inspect Outcome/ShowConsumerCredentials.bru index 679b88d710..5886d0f70b 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Inspect Outcome/ShowConsumerCredentials.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Inspect Outcome/ShowConsumerCredentials.bru @@ -14,6 +14,19 @@ headers { x-api-key: YWRtaW4.adminKey } +script:pre-request { + const t = Date.now(); + await new Promise(resolve => setTimeout(resolve, 2500)); + console.log("Waited " + (Date.now() - t) + " ms"); +} + +tests { + test("Got non-empty response", function(){ + const body = res.getBody(); + expect(body).to.be.an("array").that.is.not.empty; + }) +} + settings { encodeUrl: true timeout: 0 diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Inspect Outcome/ShowProviderCredentials.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Inspect Outcome/ShowProviderCredentials.bru index 6f276a3a00..072de2cdd0 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Inspect Outcome/ShowProviderCredentials.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Inspect Outcome/ShowProviderCredentials.bru @@ -14,6 +14,13 @@ headers { x-api-key: YWRtaW4.adminKey } +tests { + test("Got non-empty response", function(){ + const body = res.getBody() + expect(body).to.be.an("array").that.is.not.empty; + }) +} + settings { encodeUrl: true timeout: 0 diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/CreateConsumerParticipant.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/CreateConsumerParticipant.bru index 85b5611188..6c2d065aa4 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/CreateConsumerParticipant.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/CreateConsumerParticipant.bru @@ -16,30 +16,37 @@ headers { body:json { { - "roles":[], - "serviceEndpoints":[{ + "roles": [], + "serviceEndpoints": [ + { "id": "ConsumerCredentialService-ID", - "type": "CredentialService", - "serviceEndpoint": "http://consumer-idhub:13131/api/credentials/v1/participants/{{B64_CONS_ID}}" - }], - "active": true, - "participantContextId": "{{CONS_ID}}", - "did": "{{CONS_ID}}", - "key":{ - "keyId": "{{CONS_ID}}#key-1", - "privateKeyAlias": "{{CONS_ID}}-alias", - "keyGeneratorParams":{ - "algorithm": "EdDSA", - "curve": "Ed25519" - } + "type": "CredentialService", + "serviceEndpoint": "http://consumer-wallet:13131/api/credentials/v1/participants/{{CONS_PART_CONT}}" + }, + { + "id": "ConsumerIssuerService-ID", + "type": "IssuerService", + "serviceEndpoint": "http://consumer-wallet:13132/api/issuance/v1alpha/participants/{{CONS_PART_CONT}}" } + ], + "active": true, + "participantContextId": "{{CONS_PART_CONT}}", + "did": "{{CONS_ID}}", + "key": { + "keyId": "{{CONS_ID}}#key-1", + "privateKeyAlias": "{{CONS_ID}}-alias", + "keyGeneratorParams": { + "algorithm": "EdDSA", + "curve": "Ed25519" + } + } } } script:pre-request { - const btoa = require("btoa"); const cons_id = bru.getEnvVar("CONS_ID"); - bru.setEnvVar("B64_CONS_ID", btoa(cons_id)); + const participantContext = cons_id.split(":").slice(3).join(":").replace(/:/g, "-"); + bru.setEnvVar("CONS_PART_CONT", participantContext); } script:post-response { diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/Get Consumer DID Doc.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/Get Consumer DID Doc.bru index fdb531e548..557b4b54a5 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/Get Consumer DID Doc.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/Get Consumer DID Doc.bru @@ -1,7 +1,7 @@ meta { name: Get Consumer DID Doc type: http - seq: 2 + seq: 3 } get { @@ -11,7 +11,7 @@ get { } headers { - Host: consumer-idhub + Host: consumer-wallet } settings { diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/RequestConsumerCredential.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/RequestConsumerDevMemCredential.bru similarity index 55% rename from edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/RequestConsumerCredential.bru rename to edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/RequestConsumerDevMemCredential.bru index caa59e2563..922b9e7b11 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/RequestConsumerCredential.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Consumer ID/RequestConsumerDevMemCredential.bru @@ -1,11 +1,11 @@ meta { - name: RequestConsumerCredential + name: RequestConsumerDevMemCredential type: http - seq: 3 + seq: 2 } post { - url: {{CONSUMER_IDHUB_ID_API}}/v1alpha/participants/{{B64_CONS_ID}}/credentials/request + url: {{CONSUMER_IDHUB_ID_API}}/v1alpha/participants/{{CONS_PART_CONT}}/credentials/request body: json auth: none } @@ -16,15 +16,15 @@ body:json { "credentials": [{ "format": "VC1_0_JWT", "type": "MembershipCredential", - "id": "MC-Cred-Def" + "id": "dev-credential-def-1" }] } } script:pre-request { - const btoa = require("btoa"); const cons_id = bru.getEnvVar("CONS_ID"); - bru.setEnvVar("B64_CONS_ID", btoa(cons_id)); + const participantContext = cons_id.split(":").slice(3).join(":").replace(/:/g, "-"); + bru.setEnvVar("CONS_PART_CONT", participantContext); req.setHeader("x-api-key", bru.getEnvVar("CONSUMER_IH_APIKEY")); } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/CreateIssuerParticipant.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/CreateIssuerParticipant.bru index 92ac1fc389..380ab5c193 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/CreateIssuerParticipant.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/CreateIssuerParticipant.bru @@ -19,13 +19,18 @@ body:json { "roles": [], "serviceEndpoints": [ { - "id": "Issuer-IssuerService", - "type": "IssuerService", - "serviceEndpoint": "http://local-issuer-service:13132/api/issuance/v1alpha/participants/{{B64_ISS_ID}}" + "id": "IssuerIssuerService-ID", + "type": "IssuerService", + "serviceEndpoint": "http://local-issuer-wallet:13132/api/issuance/v1alpha/participants/{{ISS_PART_CONT}}" + }, + { + "id": "IssuerCredentialService-ID", + "type": "CredentialService", + "serviceEndpoint": "http://local-issuer-wallet:13131/api/credentials/v1/participants/{{ISS_PART_CONT}}" } ], "active": true, - "participantContextId": "{{ISS_ID}}", + "participantContextId": "{{ISS_PART_CONT}}", "did": "{{ISS_ID}}", "key": { "keyId": "{{ISS_ID}}#key-1", @@ -39,9 +44,9 @@ body:json { } script:pre-request { - const btoa = require("btoa"); const iss_id = bru.getEnvVar("ISS_ID"); - bru.setEnvVar("B64_ISS_ID", btoa(iss_id)); + const participantContext = iss_id.split(":").slice(3).join(":").replace(/:/g, "-"); + bru.setEnvVar("ISS_PART_CONT", participantContext); } script:post-response { diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Get Issuer DID Doc.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Get Issuer DID Doc.bru new file mode 100644 index 0000000000..0c5112c435 --- /dev/null +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Get Issuer DID Doc.bru @@ -0,0 +1,20 @@ +meta { + name: Get Issuer DID Doc + type: http + seq: 2 +} + +get { + url: {{ISSUER_DID_API}}/con-x-issuer/did.json + body: none + auth: inherit +} + +headers { + Host: local-issuer-wallet +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Optionalconfig/GetConfig.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Optionalconfig/GetConfig.bru deleted file mode 100644 index 03b59dab22..0000000000 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Optionalconfig/GetConfig.bru +++ /dev/null @@ -1,26 +0,0 @@ -meta { - name: GetConfig - type: http - seq: 1 -} - -get { - url: {{ISSUER_ISS_API}}/v1alpha/credentialsetup/{{B64_ISS_ID}} - body: none - auth: inherit -} - -headers { - x-api-key: YWRtaW4.adminKey -} - -script:pre-request { - const btoa = require("btoa"); - const iss_id = bru.getEnvVar("ISS_ID"); - bru.setEnvVar("B64_ISS_ID", btoa(iss_id)); -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Optionalconfig/SetConfig.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Optionalconfig/SetConfig.bru deleted file mode 100644 index b20210edde..0000000000 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Optionalconfig/SetConfig.bru +++ /dev/null @@ -1,39 +0,0 @@ -meta { - name: SetConfig - type: http - seq: 2 -} - -post { - url: {{ISSUER_ISS_API}}/v1alpha/credentialsetup/{{B64_ISS_ID}} - body: json - auth: inherit -} - -headers { - x-api-key: YWRtaW4.adminKey -} - -body:json { - { - "MC-Cred-Def": { - "blackList": [], - "default": { - "credentialSubject": { - "isMember": true - } - } - } - } -} - -script:pre-request { - const btoa = require("btoa"); - const iss_id = bru.getEnvVar("ISS_ID"); - bru.setEnvVar("B64_ISS_ID", btoa(iss_id)); -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Optionalconfig/folder.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Optionalconfig/folder.bru deleted file mode 100644 index b4adf7b488..0000000000 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/Optionalconfig/folder.bru +++ /dev/null @@ -1,16 +0,0 @@ -meta { - name: Optionalconfig -} - -auth { - mode: inherit -} - -docs { - The requests in this folder are only for advanced users who are interested in creating different types of credentials. Other users can safely ignore this. - - Additional info can be found here: - - https://github.com/factory-x-contributions/fx-id-hub-charts/tree/feat/quickfix_main/extensions/quickfix - -} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/addConsumerHolder.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/addConsumerHolder.bru index 2fed748a75..11f36cebcf 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/addConsumerHolder.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/addConsumerHolder.bru @@ -1,11 +1,11 @@ meta { name: addConsumerHolder type: http - seq: 2 + seq: 3 } post { - url: {{ISSUER_ISS_API}}/v1alpha/participants/{{B64_ISS_ID}}/holders + url: {{ISSUER_ISS_API}}/v1alpha/participants/{{ISS_PART_CONT}}/holders body: json auth: inherit } @@ -14,17 +14,14 @@ body:json { { "holderId" : "{{CONS_ID}}", "did" : "{{CONS_ID}}", - "name" : "{{CONS_ID}}" + "name" : "{{CONS_PART_CONT}}" } } script:pre-request { - const btoa = require("btoa"); - const iss_id = bru.getEnvVar("ISS_ID"); - bru.setEnvVar("B64_ISS_ID", btoa(iss_id)); - const cons_id = bru.getEnvVar("CONS_ID"); - bru.setEnvVar("B64_CONS_ID", btoa(cons_id)); + const participantContext = cons_id.split(":").slice(3).join(":").replace(/:/g, "-"); + bru.setEnvVar("CONS_PART_CONT", participantContext); req.setHeader("x-api-key", bru.getEnvVar("ISSUER_APIKEY")); } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/addProviderHolder.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/addProviderHolder.bru index d31390290d..e10bfc6ac6 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/addProviderHolder.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/addProviderHolder.bru @@ -1,11 +1,11 @@ meta { name: addProviderHolder type: http - seq: 3 + seq: 4 } post { - url: {{ISSUER_ISS_API}}/v1alpha/participants/{{B64_ISS_ID}}/holders + url: {{ISSUER_ISS_API}}/v1alpha/participants/{{ISS_PART_CONT}}/holders body: json auth: inherit } @@ -14,16 +14,14 @@ body:json { { "holderId" : "{{PROV_ID}}", "did" : "{{PROV_ID}}", - "name" : "{{PROV_ID}}" + "name" : "{{PROV_PART_CONT}}" } } script:pre-request { - const btoa = require("btoa"); - const iss_id = bru.getEnvVar("ISS_ID"); - bru.setEnvVar("B64_ISS_ID", btoa(iss_id)); const prov_id = bru.getEnvVar("PROV_ID"); - bru.setEnvVar("B64_PROV_ID", btoa(prov_id)); + const participantContext = prov_id.split(":").slice(3).join(":").replace(/:/g, "-"); + bru.setEnvVar("PROV_PART_CONT", participantContext); req.setHeader("x-api-key", bru.getEnvVar("ISSUER_APIKEY")); } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createAttestation.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createAttestation.bru deleted file mode 100644 index 05874d6ee5..0000000000 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createAttestation.bru +++ /dev/null @@ -1,39 +0,0 @@ -meta { - name: createAttestation - type: http - seq: 4 -} - -post { - url: {{ISSUER_ISS_API}}/v1alpha/participants/{{B64_ISS_ID}}/attestations - body: json - auth: none -} - -headers { - ~x-api-key: {{ISSUER_APIKEY}} -} - -body:json { - { - "attestationType": "presentation", - "configuration": { - "credentialType": "MembershipCredential", - "outputClaim": "isMember", - "required": false - }, - "id": "MC-Attestation" - } -} - -script:pre-request { - const btoa = require("btoa"); - const iss_id = bru.getEnvVar("ISS_ID"); - bru.setEnvVar("B64_ISS_ID", btoa(iss_id)); - req.setHeader("x-api-key", bru.getEnvVar("ISSUER_APIKEY")); -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createCredentialDef.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createCredentialDef.bru deleted file mode 100644 index e188d5475e..0000000000 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createCredentialDef.bru +++ /dev/null @@ -1,38 +0,0 @@ -meta { - name: createCredentialDef - type: http - seq: 5 -} - -post { - url: {{ISSUER_ISS_API}}/v1alpha/participants/{{B64_ISS_ID}}/credentialdefinitions - body: json - auth: inherit -} - -body:json { - { - "attestations": ["MC-Attestation"], - "credentialType": "MembershipCredential", - "format": "VC1_0_JWT", - "id": "MC-Cred-Def", - "jsonSchema": "{}", - "jsonSchemaUrl": "", - "mappings": [ - ], - "validity": 15552000 - } -} - -script:pre-request { - const btoa = require("btoa"); - const iss_id = bru.getEnvVar("ISS_ID"); - bru.setEnvVar("B64_ISS_ID", btoa(iss_id)); - - req.setHeader("x-api-key", bru.getEnvVar("ISSUER_APIKEY")); -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createDevAttestation.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createDevAttestation.bru new file mode 100644 index 0000000000..1e9801e71c --- /dev/null +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createDevAttestation.bru @@ -0,0 +1,55 @@ +meta { + name: createDevAttestation + type: http + seq: 5 +} + +post { + url: {{ISSUER_ISS_API}}/v1alpha/participants/{{ISS_PART_CONT}}/attestations + body: json + auth: none +} + +headers { + ~x-api-key: {{ISSUER_APIKEY}} +} + +body:json { + { + "attestationType": "dev", + "id": "dev-def-1", + "configuration": { + "{{CONS_ID}}": { + "isConsumer": true, + "isProvider": false, + "foo": { + "bar": 123 + } + }, + "{{PROV_ID}}": { + "isConsumer": false, + "isProvider": true, + "foo": { + "bar": 789 + } + }, + "default": { + "isConsumer": false, + "isProvider": false, + "foo": { + "bar": 0 + } + }, + "blackList": [] + } + } +} + +script:pre-request { + req.setHeader("x-api-key", bru.getEnvVar("ISSUER_APIKEY")); +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createDevMemCredentialDef.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createDevMemCredentialDef.bru new file mode 100644 index 0000000000..fe36fe1f4e --- /dev/null +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Issuer/createDevMemCredentialDef.bru @@ -0,0 +1,42 @@ +meta { + name: createDevMemCredentialDef + type: http + seq: 6 +} + +post { + url: {{ISSUER_ISS_API}}/v1alpha/participants/{{ISS_PART_CONT}}/credentialdefinitions + body: json + auth: inherit +} + +body:json { + { + "attestations": [ + "dev-def-1" + ], + "credentialType": "MembershipCredential", + "id": "dev-credential-def-1", + "jsonSchema": "{}", + "jsonSchemaUrl": "https://example.com/schema/dev-credential.json", + "mappings": [ + { + "input": "content", + "output": "credentialSubject", + "required": true + } + ], + "rules": [], + "format": "VC1_0_JWT", + "validity": 15552000 + } +} + +script:pre-request { + req.setHeader("x-api-key", bru.getEnvVar("ISSUER_APIKEY")); +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/CreateProviderParticipant.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/CreateProviderParticipant.bru index 2c43e1e115..d37af1d728 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/CreateProviderParticipant.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/CreateProviderParticipant.bru @@ -16,30 +16,37 @@ headers { body:json { { - "roles":[], - "serviceEndpoints":[{ - "id": "ConsumerCredentialService-ID", - "type": "CredentialService", - "serviceEndpoint": "http://provider-idhub:13131/api/credentials/v1/participants/{{B64_PROV_ID}}" - }], - "active": true, - "participantContextId": "{{PROV_ID}}", - "did": "{{PROV_ID}}", - "key":{ - "keyId": "{{PROV_ID}}#key-1", - "privateKeyAlias": "{{PROV_ID}}-alias", - "keyGeneratorParams":{ - "algorithm": "EdDSA", - "curve": "Ed25519" - } + "roles": [], + "serviceEndpoints": [ + { + "id": "ProviderCredentialService-ID", + "type": "CredentialService", + "serviceEndpoint": "http://provider-wallet:13131/api/credentials/v1/participants/{{PROV_PART_CONT}}" + }, + { + "id": "ProviderIssuerService-ID", + "type": "IssuerService", + "serviceEndpoint": "http://provider-wallet:13132/api/issuance/v1alpha/participants/{{PROV_PART_CONT}}" } + ], + "active": true, + "participantContextId": "{{PROV_PART_CONT}}", + "did": "{{PROV_ID}}", + "key": { + "keyId": "{{PROV_ID}}#key-1", + "privateKeyAlias": "{{PROV_ID}}-alias", + "keyGeneratorParams": { + "algorithm": "EdDSA", + "curve": "Ed25519" + } + } } } script:pre-request { - const btoa = require("btoa"); const prov_id = bru.getEnvVar("PROV_ID"); - bru.setEnvVar("B64_PROV_ID", btoa(prov_id)); + const participantContext = prov_id.split(":").slice(3).join(":").replace(/:/g, "-"); + bru.setEnvVar("PROV_PART_CONT", participantContext); } script:post-response { diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/Get Provider DID Doc.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/Get Provider DID Doc.bru index 67dc6c4baa..0187613b95 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/Get Provider DID Doc.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/Get Provider DID Doc.bru @@ -1,7 +1,7 @@ meta { name: Get Provider DID Doc type: http - seq: 2 + seq: 3 } get { @@ -11,7 +11,7 @@ get { } headers { - Host: provider-idhub + Host: provider-wallet } settings { diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/RequestProviderCredential.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/RequestProviderDevMemCredential.bru similarity index 55% rename from edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/RequestProviderCredential.bru rename to edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/RequestProviderDevMemCredential.bru index 364ca2a4a6..b71fd56e0c 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/RequestProviderCredential.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Prepare Provider ID/RequestProviderDevMemCredential.bru @@ -1,11 +1,11 @@ meta { - name: RequestProviderCredential + name: RequestProviderDevMemCredential type: http - seq: 3 + seq: 2 } post { - url: {{PROVIDER_IDHUB_ID_API}}/v1alpha/participants/{{B64_PROV_ID}}/credentials/request + url: {{PROVIDER_IDHUB_ID_API}}/v1alpha/participants/{{PROV_PART_CONT}}/credentials/request body: json auth: none } @@ -16,15 +16,15 @@ body:json { "credentials": [{ "format": "VC1_0_JWT", "type": "MembershipCredential", - "id": "MC-Cred-Def" + "id": "dev-credential-def-1" }] } } script:pre-request { - const btoa = require("btoa"); const prov_id = bru.getEnvVar("PROV_ID"); - bru.setEnvVar("B64_PROV_ID", btoa(prov_id)); + const participantContext = prov_id.split(":").slice(3).join(":").replace(/:/g, "-"); + bru.setEnvVar("PROV_PART_CONT", participantContext); req.setHeader("x-api-key", bru.getEnvVar("PROVIDER_IH_APIKEY")); } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Simulated DCP Flow/Consumer Token.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Simulated DCP Flow/Consumer Token.bru index 1cf237a75b..16b2325aa7 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Simulated DCP Flow/Consumer Token.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Simulated DCP Flow/Consumer Token.bru @@ -15,7 +15,7 @@ body:form-urlencoded { client_secret: {{CONSUMER_STS_SECRET}} client_id: {{CONS_ID}} audience: {{PROV_ID}} - bearer_access_scope: org.eclipse.tractusx.vc.type:MembershipCredential:read + bearer_access_scope: org.eclipse.dspace.dcp.vc.type:MembershipCredential:read } script:post-response { diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Simulated DCP Flow/Get Credential.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Simulated DCP Flow/Get Credential.bru index a8d2564895..8ea42d7663 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Simulated DCP Flow/Get Credential.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/identities/Simulated DCP Flow/Get Credential.bru @@ -5,7 +5,7 @@ meta { } post { - url: {{CONSUMER_IDHUB_CREDS_API}}/v1/participants/{{B64_CONS_ID}}/presentations/query + url: {{CONSUMER_IDHUB_CREDS_API}}/v1/participants/{{CONS_PART_CONT}}/presentations/query body: json auth: bearer } @@ -17,23 +17,27 @@ auth:bearer { body:json { { "@context": [ - "https://w3id.org/tractusx-trust/v0.8", + "https://w3id.org/dspace-dcp/v1.0/dcp.jsonld", "https://identity.foundation/presentation-exchange/submission/v1" ], "type": "PresentationQueryMessage", "presentationDefinition": null, "scope": [ - "org.eclipse.tractusx.vc.type:MembershipCredential:read" + "org.eclipse.dspace.dcp.vc.type:MembershipCredential:read" ] } } tests { - test("contains presentation", function(){ - const presentation = res.getBody().presentation; - const isString = typeof(presentation) == "string"; - const success = isString && presentation.split(".").length == 3; - expect(success == true); + test("Contains VerifiableCredential", function(){ + const atob = require("atob"); + const presentation = res.getBody().presentation[0]; + const decodedPayload = JSON.parse(atob(presentation.split(".")[1])); + + const verifiableCred = atob(decodedPayload.vp.verifiableCredential[0].split(".")[1]); + + const success = verifiableCred.includes("VerifiableCredential") + expect(success); }) } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/other/RevokeCred.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/other/RevokeCred.bru new file mode 100644 index 0000000000..ff1f8f4883 --- /dev/null +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/other/RevokeCred.bru @@ -0,0 +1,24 @@ +meta { + name: RevokeCred + type: http + seq: 2 +} + +post { + url: {{ISSUER_ISS_API}}/v1alpha/participants/{{ISS_PART_CONT}}/credentials/27fa4b9e-b15b-4908-a174-e440fc026e99/revoke + body: none + auth: inherit +} + +headers { + x-api-key: YWRtaW4.adminKey +} + +script:pre-request { + // req.setHeader("x-api-key", bru.getEnvVar("ISSUER_APIKEY")); +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/other/Version.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/other/Version.bru new file mode 100644 index 0000000000..708f04f28f --- /dev/null +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/other/Version.bru @@ -0,0 +1,25 @@ +meta { + name: Version + type: http + seq: 7 +} + +get { + url: http://localhost:29020/dsp/.well-known/dspace-version + body: none + auth: inherit +} + +headers { + Accept: application/json +} + +script:post-response { + const contractId = res.getBody()['contractAgreementId']; + bru.setEnvVar("contractId", contractId); +} + +settings { + encodeUrl: true + timeout: 0 +} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/other/folder.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/other/folder.bru new file mode 100644 index 0000000000..70b6b92c45 --- /dev/null +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/other/folder.bru @@ -0,0 +1,8 @@ +meta { + name: other + seq: 3 +} + +auth { + mode: inherit +} diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/InitPullTransfer.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/InitPullTransfer.bru index fa82fb9d44..b7635d665c 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/InitPullTransfer.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/InitPullTransfer.bru @@ -16,9 +16,9 @@ body:json { "edc": "https://w3id.org/edc/v0.0.1/ns/" }, "@type": "TransferRequestDto", - "protocol": "dataspace-protocol-http", + "protocol": "dataspace-protocol-http:2025-1", "contractId": "{{contractId}}", - "counterPartyAddress": "http://provider-controlplane:9020/dsp", + "counterPartyAddress": "http://provider-controlplane:9020/dsp/2025-1", "connectorId": "{{PROV_ID}}", "transferType": "HttpData-PULL" } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/InitiateNegotiation.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/InitiateNegotiation.bru index b4cb6316a2..80e72fa844 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/InitiateNegotiation.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/InitiateNegotiation.bru @@ -21,9 +21,9 @@ body:json { "odrl": "http://www.w3.org/ns/odrl/2/" }, "@type": "ContractRequest", - "counterPartyAddress": "http://provider-controlplane:9020/dsp", + "counterPartyAddress": "http://provider-controlplane:9020/dsp/2025-1", "connectorId": "{{PROV_ID}}", - "protocol": "dataspace-protocol-http", + "protocol": "dataspace-protocol-http:2025-1", "policy": { "@context": "http://www.w3.org/ns/odrl.jsonld", "@id": "{{offerId}}", diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/RequestProviderCatalog.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/RequestProviderCatalog.bru index aab44ce5f5..128f08a1c7 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/RequestProviderCatalog.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/RequestProviderCatalog.bru @@ -15,15 +15,22 @@ body:json { "@context": { "@vocab": "https://w3id.org/edc/v0.0.1/ns/" }, - "counterPartyAddress": "http://provider-controlplane:9020/dsp", + "counterPartyAddress": "http://provider-controlplane:9020/dsp/2025-1", "counterPartyId": "{{PROV_ID}}", - "protocol": "dataspace-protocol-http" - + "protocol": "dataspace-protocol-http:2025-1" } } script:post-response { - const offerId = res.getBody()['dcat:dataset']['odrl:hasPolicy']['@id']; + const offerArray = res.getBody().dataset[0].hasPolicy; + var offerId; + res.getBody().dataset[0].hasPolicy.forEach(item => { + const type = item['@type']; + const id = item['@id']; + if (type != null && type == "Offer" && id != null) { + offerId = id; + } + }); bru.setEnvVar("offerId", offerId); } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/folder.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/folder.bru index c54282bb58..1ef94a8456 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/folder.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/consumer/folder.bru @@ -3,6 +3,10 @@ meta { seq: 2 } +headers { + x-api-key: cons-management-api-key +} + auth { mode: inherit } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/provider/folder.bru b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/provider/folder.bru index 8c38fee8f1..3a2cc52bdf 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/provider/folder.bru +++ b/edc-controlplane/edc-controlplane-construct-x/local/bruno/con-x-local-test/transactions/provider/folder.bru @@ -3,6 +3,10 @@ meta { seq: 1 } +headers { + x-api-key: prov-management-api-key +} + auth { mode: inherit } diff --git a/edc-controlplane/edc-controlplane-construct-x/local/docker-compose.yaml b/edc-controlplane/edc-controlplane-construct-x/local/docker-compose.yaml index bf1c383ed2..a31e8e50d5 100644 --- a/edc-controlplane/edc-controlplane-construct-x/local/docker-compose.yaml +++ b/edc-controlplane/edc-controlplane-construct-x/local/docker-compose.yaml @@ -19,15 +19,15 @@ # services: - local-issuer-service: - container_name: local-issuer-service - image: issuerservice-dev:latest - pull_policy: never + local-issuer-wallet: + container_name: local-issuer-wallet + image: ghcr.io/project-construct-x/wallet:0.17.0-1 + pull_policy: missing depends_on: shared-postgres: condition: service_healthy - shared-vault: - condition: service_healthy + vault-init: + condition: service_completed_successfully ports: - "1044:1044" # debugger - "10000:80" # did API -> / @@ -40,25 +40,26 @@ services: environment: - JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:1044 - - edc.statuslist.callback.address=http://local-issuer-service:9999/statuslist - - edc.hostname=local-issuer-service - - edc.ih.issuer.dev.defaultconfig=/app/setup.json - - edc.issuer.issuance.send.retry.limit=0 - - edc.iam.did.web.use.https=false - - edc.ih.api.superuser.id=admin - - edc.ih.api.superuser.key=YWRtaW4.adminKey - - edc.issuer.statuslist.signing.key.alias=foo - - web.http.did.port=80 - - edc.sql.schema.autocreate=true - - edc.datasource.default.url=jdbc:postgresql://shared-postgres:5432/iss_db - - edc.datasource.default.user=admin - - edc.datasource.default.password=password - - edc.vault.hashicorp.url=http://shared-vault:8200 - - edc.vault.hashicorp.health.check.enabled=true - - edc.vault.hashicorp.token=vaultsecret0123456789 - volumes: - - ./additional_config/mc-cred-def.json:/app/setup.json - - ./additional_config/logging.properties:/app/logging.properties + - EDC_STATUSLIST_CALLBACK_ADDRESS=http://local-issuer-wallet:9999/statuslist + - EDC_HOSTNAME=local-issuer-wallet + - EDC_ISSUER_ISSUANCE_SEND_RETRY_LIMIT=0 + - EDC_IAM_CREDENTIAL_RENEWAL_GRACEPERIOD=172800 + - EDC_IAM_DID_WEB_USE_HTTPS=false + - EDC_IH_API_SUPERUSER_ID=admin + - EDC_IH_API_KEY_SUPERUSER=YWRtaW4.adminKey + - EDC_ISSUER_STATUSLIST_SIGNING_KEY_ALIAS=foo + - EDC_ENCRYPTION_AES_KEY_ALIAS=issuer-wallet-aes-key-alias + - EDC_IAM_KEY_ALGORITHM=RSA + - EDC_IH_API_SUPERUSER_PUBLIC_KEY_ALIAS=admin1#pubkey + - EDC_IH_API_SUPERUSER_PRIVATE_KEY_ALIAS=admin1#privkey + - WEB_HTTP_DID_PORT=80 + - EDC_SQL_SCHEMA_AUTOCREATE=true + - EDC_DATASOURCE_DEFAULT_URL=jdbc:postgresql://shared-postgres:5432/iss_db + - EDC_DATASOURCE_DEFAULT_USER=admin + - EDC_DATASOURCE_DEFAULT_PASSWORD=password + - EDC_VAULT_HASHICORP_URL=http://shared-vault:8200 + - EDC_VAULT_HASHICORP_HEALTH_CHECK_ENABLED=true + - EDC_VAULT_HASHICORP_TOKEN=vaultsecret0123456789 networks: - con-x-test-network @@ -118,15 +119,15 @@ services: networks: - con-x-test-network - consumer-idhub: - container_name: consumer-idhub - image: identityhub-dev:latest - pull_policy: never + consumer-wallet: + container_name: consumer-wallet + image: ghcr.io/project-construct-x/wallet:0.17.0-1 + pull_policy: missing depends_on: shared-postgres: condition: service_healthy - shared-vault: - condition: service_healthy + vault-init: + condition: service_completed_successfully ports: - "1045:1045" # debugger - "20000:80" # did API -> / @@ -137,32 +138,37 @@ services: # - "9999:9999" # statuslist API -> /statuslist environment: - JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:1045 - - edc.hostname=consumer-idhub - - edc.iam.did.web.use.https=false - - edc.ih.api.superuser.id=admin - - edc.ih.api.superuser.key=YWRtaW4.adminKey - - web.http.did.port=80 - - edc.sql.schema.autocreate=true - - edc.datasource.default.url=jdbc:postgresql://shared-postgres:5432/cons_ih_db - - edc.datasource.default.user=admin - - edc.datasource.default.password=password - - edc.vault.hashicorp.url=http://shared-vault:8200 - - edc.vault.hashicorp.health.check.enabled=true - - edc.vault.hashicorp.token=vaultsecret0123456789 - volumes: - - ./additional_config/logging.properties:/app/logging.properties + - EDC_HOSTNAME=consumer-wallet + - EDC_IAM_DID_WEB_USE_HTTPS=false + - EDC_ISSUER_ISSUANCE_SEND_RETRY_LIMIT=0 + - EDC_IAM_CREDENTIAL_RENEWAL_GRACEPERIOD=172800 + - EDC_IH_API_SUPERUSER_ID=admin + - EDC_IH_API_KEY_SUPERUSER=YWRtaW4.adminKey + - EDC_ISSUER_STATUSLIST_SIGNING_KEY_ALIAS=foo + - EDC_ENCRYPTION_AES_KEY_ALIAS=consumer-wallet-aes-key-alias + - EDC_IAM_KEY_ALGORITHM=RSA + - EDC_IH_API_SUPERUSER_PUBLIC_KEY_ALIAS=admin2#pubkey + - EDC_IH_API_SUPERUSER_PRIVATE_KEY_ALIAS=admin2#privkey + - WEB_HTTP_DID_PORT=80 + - EDC_SQL_SCHEMA_AUTOCREATE=true + - EDC_DATASOURCE_DEFAULT_URL=jdbc:postgresql://shared-postgres:5432/cons_ih_db + - EDC_DATASOURCE_DEFAULT_USER=admin + - EDC_DATASOURCE_DEFAULT_PASSWORD=password + - EDC_VAULT_HASHICORP_URL=http://shared-vault:8200 + - EDC_VAULT_HASHICORP_HEALTH_CHECK_ENABLED=true + - EDC_VAULT_HASHICORP_TOKEN=vaultsecret0123456789 networks: - con-x-test-network - provider-idhub: - container_name: provider-idhub - image: identityhub-dev:latest - pull_policy: never + provider-wallet: + container_name: provider-wallet + image: ghcr.io/project-construct-x/wallet:0.17.0-1 + pull_policy: missing depends_on: shared-postgres: condition: service_healthy - shared-vault: - condition: service_healthy + vault-init: + condition: service_completed_successfully ports: - "1046:1045" # debugger - "21000:80" # did API -> / @@ -173,20 +179,25 @@ services: # - "9999:9999" # statuslist API -> /statuslist environment: - JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:1045 - - edc.hostname=provider-idhub - - edc.iam.did.web.use.https=false - - edc.ih.api.superuser.id=admin - - edc.ih.api.superuser.key=YWRtaW4.adminKey - - web.http.did.port=80 - - edc.sql.schema.autocreate=true - - edc.datasource.default.url=jdbc:postgresql://shared-postgres:5432/prov_ih_db - - edc.datasource.default.user=admin - - edc.datasource.default.password=password - - edc.vault.hashicorp.url=http://shared-vault:8200 - - edc.vault.hashicorp.health.check.enabled=true - - edc.vault.hashicorp.token=vaultsecret0123456789 - volumes: - - ./additional_config/logging.properties:/app/logging.properties + - EDC_HOSTNAME=provider-wallet + - EDC_IAM_DID_WEB_USE_HTTPS=false + - EDC_ISSUER_ISSUANCE_SEND_RETRY_LIMIT=0 + - EDC_IAM_CREDENTIAL_RENEWAL_GRACEPERIOD=172800 + - EDC_IH_API_SUPERUSER_ID=admin + - EDC_IH_API_KEY_SUPERUSER=YWRtaW4.adminKey + - EDC_ISSUER_STATUSLIST_SIGNING_KEY_ALIAS=foo + - EDC_ENCRYPTION_AES_KEY_ALIAS=provider-wallet-aes-key-alias + - EDC_IAM_KEY_ALGORITHM=RSA + - EDC_IH_API_SUPERUSER_PUBLIC_KEY_ALIAS=admin3#pubkey + - EDC_IH_API_SUPERUSER_PRIVATE_KEY_ALIAS=admin3#privkey + - WEB_HTTP_DID_PORT=80 + - EDC_SQL_SCHEMA_AUTOCREATE=true + - EDC_DATASOURCE_DEFAULT_URL=jdbc:postgresql://shared-postgres:5432/prov_ih_db + - EDC_DATASOURCE_DEFAULT_USER=admin + - EDC_DATASOURCE_DEFAULT_PASSWORD=password + - EDC_VAULT_HASHICORP_URL=http://shared-vault:8200 + - EDC_VAULT_HASHICORP_HEALTH_CHECK_ENABLED=true + - EDC_VAULT_HASHICORP_TOKEN=vaultsecret0123456789 networks: - con-x-test-network @@ -208,17 +219,19 @@ services: - tx.edc.postgresql.migration.policy-monitor.enabled=false - tx.edc.postgresql.migration.policy.enabled=false - tx.edc.postgresql.migration.transferprocess.enabled=false - - edc.iam.trusted-issuer.example.id=did:web:local-issuer-service:con-x-issuer + - edc.iam.trusted-issuer.example.id=did:web:local-issuer-wallet:con-x-issuer - edc.iam.did.web.use.https=false - edc.iam.sts.oauth.client.secret.alias=consumersecret - edc.iam.credential.revocation.mimetype=application/json - - edc.iam.sts.oauth.token.url=http://consumer-idhub:9292/api/sts/token - - edc.iam.sts.oauth.client.id=did:web:consumer-idhub:user:consumer - - edc.iam.issuer.id=did:web:consumer-idhub:user:consumer + - edc.iam.sts.oauth.token.url=http://consumer-wallet:9292/api/sts/token + - edc.iam.sts.oauth.client.id=did:web:consumer-wallet:user:consumer + - edc.iam.issuer.id=did:web:consumer-wallet:user:consumer - web.http.port=9000 - web.http.path=/api - web.http.management.port=9010 - web.http.management.path=/management + - web.http.management.auth.key=cons-management-api-key + - web.http.management.auth.type=tokenbased - web.http.protocol.port=9020 - web.http.protocol.path=/dsp - web.http.validation.port=9030 @@ -226,7 +239,7 @@ services: - web.http.control.port=9050 - web.http.control.path=/control - edc.hostname=consumer-controlplane - - edc.participant.id=did:web:consumer-idhub:user:consumer + - edc.participant.id=did:web:consumer-wallet:user:consumer - edc.dsp.callback.address=http://consumer-controlplane:9020/dsp - edc.sql.schema.autocreate=true - edc.datasource.default.url=jdbc:postgresql://shared-postgres:5432/cons_cpl @@ -235,8 +248,14 @@ services: - edc.vault.hashicorp.url=http://shared-vault:8200 - edc.vault.hashicorp.health.check.enabled=true - edc.vault.hashicorp.token=vaultsecret0123456789 - volumes: - - ./additional_config/logging.properties:/app/dataspaceconnector-configuration.properties + - tx.edc.iam.iatp.default-scopes.test.alias=org.eclipse.dspace.dcp.vc.type + - tx.edc.iam.iatp.default-scopes.test.type=MembershipCredential + - tx.edc.iam.iatp.default-scopes.test.operation=read + healthcheck: + test: ["CMD-SHELL", "wget --spider http://localhost:9000/api/check/readiness || exit 1"] + start_period: 10s + interval: 3s + retries: 30 depends_on: shared-postgres: condition: service_healthy @@ -275,18 +294,16 @@ services: - edc.vault.hashicorp.url=http://shared-vault:8200 - edc.vault.hashicorp.health.check.enabled=true - edc.vault.hashicorp.token=vaultsecret0123456789 - - edc.iam.trusted-issuer.example.id=did:web:local-issuer-service:con-x-issuer + - edc.iam.trusted-issuer.example.id=did:web:local-issuer-wallet:con-x-issuer - edc.iam.did.web.use.https=false - edc.iam.sts.oauth.client.secret.alias=consumersecret - edc.iam.credential.revocation.mimetype=application/json - - edc.iam.sts.oauth.token.url=http://consumer-idhub:9292/api/sts/token - - edc.iam.sts.oauth.client.id=did:web:consumer-idhub:user:consumer - - edc.iam.issuer.id=did:web:consumer-idhub:user:consumer + - edc.iam.sts.oauth.token.url=http://consumer-wallet:9292/api/sts/token + - edc.iam.sts.oauth.client.id=did:web:consumer-wallet:user:consumer + - edc.iam.issuer.id=did:web:consumer-wallet:user:consumer depends_on: - shared-postgres: + consumer-controlplane: condition: service_healthy - vault-init: - condition: service_completed_successfully entrypoint: [ "java", "-jar", "edc-runtime.jar", "--log-level=DEBUG" ] ports: - "5008:5005" # Debugger @@ -312,17 +329,19 @@ services: - tx.edc.postgresql.migration.policy-monitor.enabled=false - tx.edc.postgresql.migration.policy.enabled=false - tx.edc.postgresql.migration.transferprocess.enabled=false - - edc.iam.trusted-issuer.example.id=did:web:local-issuer-service:con-x-issuer + - edc.iam.trusted-issuer.example.id=did:web:local-issuer-wallet:con-x-issuer - edc.iam.did.web.use.https=false - edc.iam.sts.oauth.client.secret.alias=providersecret - edc.iam.credential.revocation.mimetype=application/json - - edc.iam.sts.oauth.token.url=http://provider-idhub:9292/api/sts/token - - edc.iam.sts.oauth.client.id=did:web:provider-idhub:user:provider - - edc.iam.issuer.id=did:web:provider-idhub:user:provider + - edc.iam.sts.oauth.token.url=http://provider-wallet:9292/api/sts/token + - edc.iam.sts.oauth.client.id=did:web:provider-wallet:user:provider + - edc.iam.issuer.id=did:web:provider-wallet:user:provider - web.http.port=9000 - web.http.path=/api - web.http.management.port=9010 - web.http.management.path=/management + - web.http.management.auth.key=prov-management-api-key + - web.http.management.auth.type=tokenbased - web.http.protocol.port=9020 - web.http.protocol.path=/dsp - web.http.validation.port=9030 @@ -330,7 +349,7 @@ services: - web.http.control.port=9050 - web.http.control.path=/control - edc.hostname=provider-controlplane - - edc.participant.id=did:web:provider-idhub:user:provider + - edc.participant.id=did:web:provider-wallet:user:provider - edc.dsp.callback.address=http://provider-controlplane:9020/dsp - edc.sql.schema.autocreate=true - edc.datasource.default.url=jdbc:postgresql://shared-postgres:5432/prov_cpl @@ -339,8 +358,14 @@ services: - edc.vault.hashicorp.url=http://shared-vault:8200 - edc.vault.hashicorp.health.check.enabled=true - edc.vault.hashicorp.token=vaultsecret0123456789 - volumes: - - ./additional_config/logging.properties:/app/dataspaceconnector-configuration.properties + - tx.edc.iam.iatp.default-scopes.test.alias=org.eclipse.dspace.dcp.vc.type + - tx.edc.iam.iatp.default-scopes.test.type=MembershipCredential + - tx.edc.iam.iatp.default-scopes.test.operation=read + healthcheck: + test: [ "CMD-SHELL", "wget --spider http://localhost:9000/api/check/readiness || exit 1" ] + start_period: 10s + interval: 3s + retries: 30 depends_on: shared-postgres: condition: service_healthy @@ -379,18 +404,16 @@ services: - edc.vault.hashicorp.url=http://shared-vault:8200 - edc.vault.hashicorp.health.check.enabled=true - edc.vault.hashicorp.token=vaultsecret0123456789 - - edc.iam.trusted-issuer.example.id=did:web:local-issuer-service:con-x-issuer + - edc.iam.trusted-issuer.example.id=did:web:local-issuer-wallet:con-x-issuer - edc.iam.did.web.use.https=false - edc.iam.sts.oauth.client.secret.alias=providersecret - edc.iam.credential.revocation.mimetype=application/json - - edc.iam.sts.oauth.token.url=http://provider-idhub:9292/api/sts/token - - edc.iam.sts.oauth.client.id=did:web:provider-idhub:user:provider - - edc.iam.issuer.id=did:web:provider-idhub:user:provider + - edc.iam.sts.oauth.token.url=http://provider-wallet:9292/api/sts/token + - edc.iam.sts.oauth.client.id=did:web:provider-wallet:user:provider + - edc.iam.issuer.id=did:web:provider-wallet:user:provider depends_on: - shared-postgres: + provider-controlplane: condition: service_healthy - vault-init: - condition: service_completed_successfully entrypoint: [ "java", "-jar", "edc-runtime.jar", "--log-level=DEBUG" ] ports: - "5007:5005" # Debugger