From f4658e484b4d41517febe1d9bf070d81766553a8 Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Thu, 18 Dec 2025 12:06:14 +0100 Subject: [PATCH 1/2] feat: simplify Bruno collection, move cell/DS creation into seed job --- README.md | 21 +++- k8s/apps/participant-manager-seed-job.yaml | 10 +- k8s/apps/tenant-manager-seed-job.yaml | 102 +++++++++++++++++ .../Create Dataspace Profile.bru | 95 ---------------- .../Create a new Tenant.bru | 2 +- .../Deploy Participant Profile.bru | 2 +- .../Deploy a Dataspace Profile.bru | 46 -------- .../Get Orchestration.bru | 2 +- .../Obtain Secret from Vault.bru | 2 +- .../Query Orchestration by Profile ID.bru | 2 +- ...{TM- Create Cell.bru => TM- Get Cells.bru} | 18 +-- .../Deploy Participant Profile.bru | 2 +- .../Deploy a Dataspace Profile.bru | 46 -------- .../Get Orchestration.bru | 2 +- .../Obtain Secret from Vault.bru | 2 +- .../Query Orchestration by Profile ID.bru | 2 +- ...ataspace Profile.bru => TM- Get Cells.bru} | 37 ++---- .../CFM - Provision Provider/folder.bru | 2 +- ...connector-activity- ActivityDefinition.bru | 53 --------- ...eate -dns-activity- ActivityDefinition.bru | 53 --------- ...-keycloak-activity- ActivityDefinition.bru | 53 --------- ...nboarding-activity- ActivityDefinition.bru | 57 ---------- ...gistration-activity- ActivityDefinitio.bru | 53 --------- ...eate Orchestration Definition (deploy).bru | 107 ------------------ .../ParticipantManager/folder.bru | 8 -- .../folder.bru | 8 -- .../Create Asset.bru | 2 +- .../Create Contract Definition.bru | 2 +- .../Create Policy.bru | 2 +- .../Prepare Dataplane.bru | 4 +- .../Prepare Provider Participant/folder.bru | 1 - .../EDC-V Management/folder.bru | 1 + ...eate API Access Token (using Keycloak).bru | 79 ------------- .../Create Holder in IssuerService.bru | 39 ------- ...te ParticipantContext in Control Plane.bru | 55 --------- ...eate ParticipantContext in IdentityHub.bru | 100 ---------------- ...te Vault Access Token (using Keycloak).bru | 79 ------------- .../Get Credentials.bru | 31 ----- .../Request Credentials.bru | 43 ------- .../folder.bru | 14 --- ...eate API Access Token (using Keycloak).bru | 79 ------------- .../Create Holder in IssuerService.bru | 39 ------- ...te ParticipantContext in Control Plane.bru | 55 --------- ...eate ParticipantContext in IdentityHub.bru | 100 ---------------- ...te Vault Access Token (using Keycloak).bru | 79 ------------- .../Get Credentials.bru | 31 ----- .../Request Credentials.bru | 42 ------- .../folder.bru | 14 --- ...reate -Issuer- Tenant in IssuerService.bru | 78 ------------- .../Create AttestationDefinition.bru | 40 ------- .../Create CredentialDefinition.bru | 63 ----------- .../Create Vault Access Token (Issuer).bru | 79 ------------- .../IssuerService/folder.bru | 8 -- .../legacy - do not use/folder.bru | 8 -- .../edc/jad/tests/DataTransferTest.java | 43 +------ 55 files changed, 160 insertions(+), 1837 deletions(-) create mode 100644 k8s/apps/tenant-manager-seed-job.yaml delete mode 100644 requests/EDC-V Onboarding/CFM - Provision Consumer/Create Dataspace Profile.bru delete mode 100644 requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy a Dataspace Profile.bru rename requests/EDC-V Onboarding/CFM - Provision Consumer/{TM- Create Cell.bru => TM- Get Cells.bru} (76%) delete mode 100644 requests/EDC-V Onboarding/CFM - Provision Provider/Deploy a Dataspace Profile.bru rename requests/EDC-V Onboarding/CFM - Provision Provider/{Create Dataspace Profile.bru => TM- Get Cells.bru} (50%) delete mode 100644 requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -connector-activity- ActivityDefinition.bru delete mode 100644 requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -dns-activity- ActivityDefinition.bru delete mode 100644 requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -keycloak-activity- ActivityDefinition.bru delete mode 100644 requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -onboarding-activity- ActivityDefinition.bru delete mode 100644 requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -registration-activity- ActivityDefinitio.bru delete mode 100644 requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create Orchestration Definition (deploy).bru delete mode 100644 requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/folder.bru delete mode 100644 requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/folder.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create API Access Token (using Keycloak).bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create Holder in IssuerService.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create ParticipantContext in Control Plane.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create ParticipantContext in IdentityHub.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create Vault Access Token (using Keycloak).bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Get Credentials.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Request Credentials.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/folder.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create API Access Token (using Keycloak).bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create Holder in IssuerService.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create ParticipantContext in Control Plane.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create ParticipantContext in IdentityHub.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create Vault Access Token (using Keycloak).bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Get Credentials.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Request Credentials.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/folder.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create -Issuer- Tenant in IssuerService.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create AttestationDefinition.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create CredentialDefinition.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create Vault Access Token (Issuer).bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/IssuerService/folder.bru delete mode 100644 requests/EDC-V Onboarding/legacy - do not use/folder.bru diff --git a/README.md b/README.md index acbd67a..45a8894 100644 --- a/README.md +++ b/README.md @@ -114,10 +114,24 @@ kubectl wait --namespace edc-v \ kubectl apply -k k8s/apps/ -# Wait for applications to be ready: +# Wait for seed jobs to be ready: +kubectl wait --namespace edc-v \ + --for=condition=complete job --all \ + --timeout=90s +``` + +Here's a copy-and-pasteable command to delete and redeploy everything: + +```shell +kubectl delete -k k8s/ && \ +kubectl apply -f k8s/base && \ kubectl wait --namespace edc-v \ --for=condition=ready pod \ - --selector=type=edcv-app \ + --selector=type=edcv-infra \ + --timeout=90s && \ +kubectl apply -f k8s/apps && \ +kubectl wait --namespace edc-v \ + --for=condition=complete job --all \ --timeout=90s ``` @@ -162,7 +176,8 @@ Those are needed to populate the databases and the vault with initial data. ### 4. Prepare the data space In addition to the initial seed data, a few bits and pieces are required for it to become fully operational. These can -be put in place by running the REST requests in the `CFM - Provision Consumer` folder and in the `CFM - Provision Provider` +be put in place by running the REST requests in the `CFM - Provision Consumer` folder and in the +`CFM - Provision Provider` in the [Bruno collection](./requests/EDC-V%20Onboarding). Be sure to select the `"KinD Local"` environment in Bruno. diff --git a/k8s/apps/participant-manager-seed-job.yaml b/k8s/apps/participant-manager-seed-job.yaml index 5490450..852b282 100644 --- a/k8s/apps/participant-manager-seed-job.yaml +++ b/k8s/apps/participant-manager-seed-job.yaml @@ -49,8 +49,6 @@ spec: env: - name: PM_BASE_URL value: "http://participant-manager.edc-v.svc.cluster.local:8080" - - name: TM_BASE_URL - value: "http://tenant-manager.edc-v.svc.cluster.local:8080" command: - sh - -c @@ -58,7 +56,7 @@ spec: set -e echo "================================================" - echo "ParticipantManager & TenantManager Seeding" + echo "ParticipantManager Seeding" echo "================================================" echo "" @@ -160,7 +158,7 @@ spec: "dependsOn": [] }, { - "id": "holder-entry-creator", + "id": "registration-agent", "type": "registration-activity", "discriminator": "deploy", "dependsOn": [ @@ -176,12 +174,12 @@ spec: ] }, { - "id": "onboarder", + "id": "onboarding-agent", "type": "onboarding-activity", "discriminator": "deploy", "dependsOn": [ "connector-provisioner", - "holder-entry-creator" + "registration-agent" ] } ], diff --git a/k8s/apps/tenant-manager-seed-job.yaml b/k8s/apps/tenant-manager-seed-job.yaml new file mode 100644 index 0000000..9f2455c --- /dev/null +++ b/k8s/apps/tenant-manager-seed-job.yaml @@ -0,0 +1,102 @@ +# +# Copyright (c) 2025 Metaform Systems, Inc. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# +# Contributors: +# Metaform Systems, Inc. - initial API and implementation +# + +apiVersion: batch/v1 +kind: Job +metadata: + name: tenant-manager-seed + namespace: edc-v + labels: + app: tenant-manager-seed + platform: edcv + type: edcv-job +spec: + backoffLimit: 5 + template: + metadata: + labels: + app: tenant-manager-seed + platform: edcv + type: edcv-job + spec: + restartPolicy: OnFailure + initContainers: + # Wait for tenant-manager to be ready + - name: wait-for-tenant-manager + image: curlimages/curl:latest + command: + - sh + - -c + - | + until curl -sf http://tenant-manager.edc-v.svc.cluster.local:8080/api/v1alpha1/cells; do + echo "Waiting for tenant-manager to be ready..." + sleep 5 + done + echo "Tenant Manager is ready!" + containers: + - name: seed-tenant-manager + image: curlimages/curl:latest + env: + - name: TM_BASE_URL + value: "http://tenant-manager.edc-v.svc.cluster.local:8080" + command: + - sh + - -c + - | + set -e + + echo "================================================" + echo "TenantManager Seeding" + echo "================================================" + + # Create Cell + echo "Creating Cell..." + CELL_RESPONSE=$(curl -s -X POST "$TM_BASE_URL/api/v1alpha1/cells" \ + -H "Content-Type: application/json" \ + -d '{ + "properties": { + "newCellKey": "newCellValue" + }, + "state": "active", + "stateTimestamp": "'"$(date -u +"%Y-%m-%dT%H:%M:%SZ")"'" + }') + + CELL_ID=$(echo "$CELL_RESPONSE" | grep -o '"id":"[^"]*"' | head -1 | cut -d'"' -f4) + echo "Cell created with ID: $CELL_ID" + + # Create Dataspace Profile + echo "Creating Dataspace Profile..." + PROFILE_RESPONSE=$(curl -s -X POST "$TM_BASE_URL/api/v1alpha1/dataspace-profiles" \ + -H "Content-Type: application/json" \ + -d '{ + "artifacts": [], + "properties": {} + }') + + DATASPACE_PROFILE_ID=$(echo "$PROFILE_RESPONSE" | grep -o '"id":"[^"]*"' | head -1 | cut -d'"' -f4) + echo "Dataspace Profile created with ID: $DATASPACE_PROFILE_ID" + + # Deploy Dataspace Profile + echo "Deploying Dataspace Profile..." + curl -s -X POST "$TM_BASE_URL/api/v1alpha1/dataspace-profiles/$DATASPACE_PROFILE_ID/deployments" \ + -H "Content-Type: application/json" \ + -d '{ + "profileId": "'"$DATASPACE_PROFILE_ID"'", + "cellId": "'"$CELL_ID"'" + }' + + echo "Dataspace Profile deployed successfully" + echo "================================================" + echo "TenantManager Seeding Complete" + echo "================================================" + diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Create Dataspace Profile.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Create Dataspace Profile.bru deleted file mode 100644 index 32251c3..0000000 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Create Dataspace Profile.bru +++ /dev/null @@ -1,95 +0,0 @@ -meta { - name: Create Dataspace Profile - type: http - seq: 2 -} - -post { - url: {{tmBaseUrl}}/api/v1alpha1/dataspace-profiles - body: json - auth: inherit -} - -body:json { - { - "artifacts": [], - "properties": { - "credentials": [ - { - "issuer": "did:web:issuerservice.edc-v.svc.cluster.local%3A10016:issuer", - "format": "VC1_0_JWT", - "type": "MembershipCredential", - "id": "membership-credential-def", - "idDefault": true - }, - { - "issuer": "did:web:issuerservice.edc-v.svc.cluster.local%3A10016:issuer", - "format": "VC1_0_JWT", - "type": "DataProcessorCredential", - "id": "data-processor-def" - } - ] - } - } -} - -script:post-response { - let body = res.getBody() - test("Response contains id", function () { - expect(body).to.have.property("id"); - }); - - if (body && body.id) { - bru.setVar("dataspace_profile_id", body.id); - } -} - -example { - name: 201 Response - description: Created - - request: { - url: {{baseUrl}}/api/v1alpha1/dataspace-profiles - method: POST - mode: json - body:json: { - { - "artifacts": [], - "properties": {} - } - } - } - - response: { - headers: { - Content-Type: application/json - } - - status: { - code: 201 - text: Created - } - - body: { - type: json - content: ''' - { - "artifacts": [], - "deployments": [ - { - "cellId": "", - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "version": 0 - } - ], - "id": "", - "properties": {}, - "version": 0 - } - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Create a new Tenant.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Create a new Tenant.bru index a00cd26..b10b1b2 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Create a new Tenant.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/Create a new Tenant.bru @@ -1,7 +1,7 @@ meta { name: Create a new Tenant type: http - seq: 3 + seq: 2 } post { diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy Participant Profile.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy Participant Profile.bru index f0574a4..6bc55b6 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy Participant Profile.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy Participant Profile.bru @@ -1,7 +1,7 @@ meta { name: Deploy Participant Profile type: http - seq: 5 + seq: 3 } post { diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy a Dataspace Profile.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy a Dataspace Profile.bru deleted file mode 100644 index a1c13d8..0000000 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy a Dataspace Profile.bru +++ /dev/null @@ -1,46 +0,0 @@ -meta { - name: Deploy a Dataspace Profile - type: http - seq: 4 -} - -post { - url: {{tmBaseUrl}}/api/v1alpha1/dataspace-profiles/{{dataspace_profile_id}}/deployments - body: json - auth: inherit -} - -body:json { - { - "profileId": "{{dataspace_profile_id}}", - "cellId": "{{cell_id}}" - } -} - -example { - name: 202 Response - description: Accepted - - request: { - url: {{baseUrl}}/api/v1alpha1/dataspace-profiles/:id/deployments - method: POST - mode: none - params:path: { - id: - } - } - - response: { - status: { - code: 202 - text: Accepted - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Get Orchestration.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Get Orchestration.bru index 8801c77..8632572 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Get Orchestration.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/Get Orchestration.bru @@ -1,7 +1,7 @@ meta { name: Get Orchestration type: http - seq: 7 + seq: 5 } get { diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Obtain Secret from Vault.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Obtain Secret from Vault.bru index b34e712..b99c06f 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Obtain Secret from Vault.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/Obtain Secret from Vault.bru @@ -1,7 +1,7 @@ meta { name: Obtain Secret from Vault type: http - seq: 8 + seq: 6 } get { diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Query Orchestration by Profile ID.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Query Orchestration by Profile ID.bru index 75ada94..93b9c3d 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Query Orchestration by Profile ID.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/Query Orchestration by Profile ID.bru @@ -1,7 +1,7 @@ meta { name: Query Orchestration by Profile ID type: http - seq: 6 + seq: 4 } post { diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/TM- Create Cell.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/TM- Get Cells.bru similarity index 76% rename from requests/EDC-V Onboarding/CFM - Provision Consumer/TM- Create Cell.bru rename to requests/EDC-V Onboarding/CFM - Provision Consumer/TM- Get Cells.bru index eb8fa62..74d6614 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/TM- Create Cell.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/TM- Get Cells.bru @@ -1,33 +1,23 @@ meta { - name: TM: Create Cell + name: TM: Get Cells type: http seq: 1 } -post { +get { url: {{tmBaseUrl}}/api/v1alpha1/cells body: json auth: inherit } -body:json { - { - "properties": { - "newCellKey": "newCellValue" - }, - "state": "active", - "stateTimestamp": "{{$isoTimestamp}}" - } -} - script:post-response { let body = res.getBody() test("Response contains id", function () { - expect(body).to.have.property("id"); + expect(body[0]).to.have.property("id"); }); if (body && body.id) { - bru.setVar("cell_id", body.id); + bru.setVar("cell_id", body[0].id); } } diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy Participant Profile.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy Participant Profile.bru index 267fb31..6bc55b6 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy Participant Profile.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy Participant Profile.bru @@ -1,7 +1,7 @@ meta { name: Deploy Participant Profile type: http - seq: 4 + seq: 3 } post { diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy a Dataspace Profile.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy a Dataspace Profile.bru deleted file mode 100644 index db778b1..0000000 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy a Dataspace Profile.bru +++ /dev/null @@ -1,46 +0,0 @@ -meta { - name: Deploy a Dataspace Profile - type: http - seq: 3 -} - -post { - url: {{tmBaseUrl}}/api/v1alpha1/dataspace-profiles/{{dataspace_profile_id}}/deployments - body: json - auth: inherit -} - -body:json { - { - "profileId": "{{dataspace_profile_id}}", - "cellId": "{{cell_id}}" - } -} - -example { - name: 202 Response - description: Accepted - - request: { - url: {{baseUrl}}/api/v1alpha1/dataspace-profiles/:id/deployments - method: POST - mode: none - params:path: { - id: - } - } - - response: { - status: { - code: 202 - text: Accepted - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru index 4727abc..642689f 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru @@ -1,7 +1,7 @@ meta { name: Get Orchestration type: http - seq: 6 + seq: 5 } get { diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Obtain Secret from Vault.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Obtain Secret from Vault.bru index a491f2b..aad5bbc 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Obtain Secret from Vault.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/Obtain Secret from Vault.bru @@ -1,7 +1,7 @@ meta { name: Obtain Secret from Vault type: http - seq: 7 + seq: 6 } get { diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Query Orchestration by Profile ID.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Query Orchestration by Profile ID.bru index 6637353..4c42bcc 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Query Orchestration by Profile ID.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/Query Orchestration by Profile ID.bru @@ -1,7 +1,7 @@ meta { name: Query Orchestration by Profile ID type: http - seq: 5 + seq: 4 } post { diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Create Dataspace Profile.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/TM- Get Cells.bru similarity index 50% rename from requests/EDC-V Onboarding/CFM - Provision Provider/Create Dataspace Profile.bru rename to requests/EDC-V Onboarding/CFM - Provision Provider/TM- Get Cells.bru index a77e003..74d6614 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Create Dataspace Profile.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/TM- Get Cells.bru @@ -1,30 +1,23 @@ meta { - name: Create Dataspace Profile + name: TM: Get Cells type: http seq: 1 } -post { - url: {{tmBaseUrl}}/api/v1alpha1/dataspace-profiles +get { + url: {{tmBaseUrl}}/api/v1alpha1/cells body: json auth: inherit } -body:json { - { - "artifacts": [], - "properties": {} - } -} - script:post-response { let body = res.getBody() test("Response contains id", function () { - expect(body).to.have.property("id"); + expect(body[0]).to.have.property("id"); }); if (body && body.id) { - bru.setVar("dataspace_profile_id", body.id); + bru.setVar("cell_id", body[0].id); } } @@ -33,13 +26,14 @@ example { description: Created request: { - url: {{baseUrl}}/api/v1alpha1/dataspace-profiles + url: {{baseUrl}}/api/v1alpha1/cells method: POST mode: json body:json: { { - "artifacts": [], - "properties": {} + "properties": {}, + "state": "", + "stateTimestamp": "" } } } @@ -58,19 +52,10 @@ example { type: json content: ''' { - "artifacts": [], - "deployments": [ - { - "cellId": "", - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "version": 0 - } - ], "id": "", "properties": {}, + "state": "", + "stateTimestamp": "", "version": 0 } ''' diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/folder.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/folder.bru index 0a1c2a3..fe1927d 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/folder.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/folder.bru @@ -1,6 +1,6 @@ meta { name: CFM - Provision Provider - seq: 4 + seq: 2 } auth { diff --git a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -connector-activity- ActivityDefinition.bru b/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -connector-activity- ActivityDefinition.bru deleted file mode 100644 index c8000aa..0000000 --- a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -connector-activity- ActivityDefinition.bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: PM: Create "edcv-activity" ActivityDefinition - type: http - seq: 2 -} - -post { - url: {{pmBaseUrl}}/api/v1alpha1/activity-definitions - body: json - auth: inherit -} - -body:json { - { - "description": "Provisions EDC-V Control plane entries", - "inputSchema": {}, - "outputSchema": {}, - "type": "edcv-activity" - } -} - -example { - name: 201 Response - description: Created - - request: { - url: {{baseUrl}}/api/v1alpha1/activity-definitions - method: POST - mode: json - body:json: { - { - "description omitempty": "", - "inputSchema omitempty": {}, - "outputSchema omitempty": {}, - "type": "" - } - } - } - - response: { - status: { - code: 201 - text: Created - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -dns-activity- ActivityDefinition.bru b/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -dns-activity- ActivityDefinition.bru deleted file mode 100644 index c73a439..0000000 --- a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -dns-activity- ActivityDefinition.bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: PM: Create "network-activity" ActivityDefinition - type: http - seq: 1 -} - -post { - url: {{pmBaseUrl}}/api/v1alpha1/activity-definitions - body: json - auth: inherit -} - -body:json { - { - "description": "Provisions DNS entries", - "inputSchema": {}, - "outputSchema": {}, - "type": "network-activity" - } -} - -example { - name: 201 Response - description: Created - - request: { - url: {{baseUrl}}/api/v1alpha1/activity-definitions - method: POST - mode: json - body:json: { - { - "description omitempty": "", - "inputSchema omitempty": {}, - "outputSchema omitempty": {}, - "type": "" - } - } - } - - response: { - status: { - code: 201 - text: Created - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -keycloak-activity- ActivityDefinition.bru b/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -keycloak-activity- ActivityDefinition.bru deleted file mode 100644 index e6ddd4d..0000000 --- a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -keycloak-activity- ActivityDefinition.bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: PM: Create "keycloak-activity" ActivityDefinition - type: http - seq: 4 -} - -post { - url: {{pmBaseUrl}}/api/v1alpha1/activity-definitions - body: json - auth: inherit -} - -body:json { - { - "description": "Provisions Keycloak clients", - "inputSchema": {}, - "outputSchema": {}, - "type": "keycloak-activity" - } -} - -example { - name: 201 Response - description: Created - - request: { - url: {{baseUrl}}/api/v1alpha1/activity-definitions - method: POST - mode: json - body:json: { - { - "description omitempty": "", - "inputSchema omitempty": {}, - "outputSchema omitempty": {}, - "type": "" - } - } - } - - response: { - status: { - code: 201 - text: Created - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -onboarding-activity- ActivityDefinition.bru b/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -onboarding-activity- ActivityDefinition.bru deleted file mode 100644 index e7794aa..0000000 --- a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -onboarding-activity- ActivityDefinition.bru +++ /dev/null @@ -1,57 +0,0 @@ -meta { - name: PM: Create "onboarding-activity" ActivityDefinition - type: http - seq: 5 -} - -post { - url: ''' - clientIDKey = "keycloak.clientID" - clientSecretKey = "keycloak.clientSecret" - tokenURLKey = "keycloak.tokenUrl"{{pmBaseUrl}}/api/v1alpha1/activity-definitions -''' - body: json - auth: inherit -} - -body:json { - { - "description": "Onboards participants (= requests credentials)", - "inputSchema": {}, - "outputSchema": {}, - "type": "onboarding-activity" - } -} - -example { - name: 201 Response - description: Created - - request: { - url: {{baseUrl}}/api/v1alpha1/activity-definitions - method: POST - mode: json - body:json: { - { - "description omitempty": "", - "inputSchema omitempty": {}, - "outputSchema omitempty": {}, - "type": "" - } - } - } - - response: { - status: { - code: 201 - text: Created - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -registration-activity- ActivityDefinitio.bru b/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -registration-activity- ActivityDefinitio.bru deleted file mode 100644 index 3270768..0000000 --- a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create -registration-activity- ActivityDefinitio.bru +++ /dev/null @@ -1,53 +0,0 @@ -meta { - name: PM: Create "registration-activity" ActivityDefinitio - type: http - seq: 3 -} - -post { - url: {{pmBaseUrl}}/api/v1alpha1/activity-definitions - body: json - auth: inherit -} - -body:json { - { - "description": "Creates Holder entries on the IssuerService", - "inputSchema": {}, - "outputSchema": {}, - "type": "registration-activity" - } -} - -example { - name: 201 Response - description: Created - - request: { - url: {{baseUrl}}/api/v1alpha1/activity-definitions - method: POST - mode: json - body:json: { - { - "description omitempty": "", - "inputSchema omitempty": {}, - "outputSchema omitempty": {}, - "type": "" - } - } - } - - response: { - status: { - code: 201 - text: Created - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create Orchestration Definition (deploy).bru b/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create Orchestration Definition (deploy).bru deleted file mode 100644 index 66758c2..0000000 --- a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/PM- Create Orchestration Definition (deploy).bru +++ /dev/null @@ -1,107 +0,0 @@ -meta { - name: PM: Create Orchestration Definition (deploy) - type: http - seq: 6 -} - -post { - url: {{pmBaseUrl}}/api/v1alpha1/orchestration-definitions - body: json - auth: inherit -} - -body:json { - { - "activities": [ - { - "dependsOn": [], - "discriminator": "deploy", - "inputs": [], - "type": "network-activity", - "id": "dns-provisioner" - }, - { - "id": "kc-client-provisioner", - "type": "keycloak-activity", - "discriminator": "deploy", - "dependsOn": [] - }, - { - "id": "connector-provisioner", - "type": "edcv-activity", - "discriminator": "deploy", - "dependsOn": [ - "kc-client-provisioner" - ] - }, - { - "id": "holder-entry-creator", - "type": "registration-activity", - "discriminator": "deploy", - "dependsOn": [ - "kc-client-provisioner", - "connector-provisioner" - ] - }, - { - "id": "onboarder", - "type": "onboarding-activity", - "discriminator": "deploy", - "dependsOn": [ - "connector-provisioner", - "holder-entry-creator" - ] - } - ], - "description": "Orchestrates the deployment of a new dataspace member", - "schema": {}, - "type": "cfm.orchestration.vpa.deploy", - "id": "{{$randomUUID}}" - } -} - -example { - name: 201 Response - description: Created - - request: { - url: {{baseUrl}}/api/v1alpha1/orchestration-definitions - method: POST - mode: json - body:json: { - { - "activities": [ - { - "dependsOn omitempty": [], - "discriminator": "", - "id": "", - "inputs omitempty": [ - { - "source": "", - "target": "" - } - ], - "type": "" - } - ], - "description omitempty": "", - "schema omitempty": {}, - "type": "" - } - } - } - - response: { - status: { - code: 201 - text: Created - } - - body: { - type: text - content: ''' - - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/folder.bru b/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/folder.bru deleted file mode 100644 index 40b6107..0000000 --- a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/ParticipantManager/folder.bru +++ /dev/null @@ -1,8 +0,0 @@ -meta { - name: ParticipantManager - seq: 1 -} - -auth { - mode: inherit -} diff --git a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/folder.bru b/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/folder.bru deleted file mode 100644 index a536e19..0000000 --- a/requests/EDC-V Onboarding/CFM - Seed Dataspace - do not use/folder.bru +++ /dev/null @@ -1,8 +0,0 @@ -meta { - name: CFM - Seed Dataspace - do not use - seq: 2 -} - -auth { - mode: inherit -} diff --git a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Asset.bru b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Asset.bru index 0b195df..bc85d66 100644 --- a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Asset.bru +++ b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Asset.bru @@ -1,7 +1,7 @@ meta { name: Create Asset type: http - seq: 1 + seq: 8 } post { diff --git a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Contract Definition.bru b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Contract Definition.bru index abeee2b..9218530 100644 --- a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Contract Definition.bru +++ b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Contract Definition.bru @@ -1,7 +1,7 @@ meta { name: Create Contract Definition type: http - seq: 3 + seq: 8 } post { diff --git a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Policy.bru b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Policy.bru index 771b42e..de1f366 100644 --- a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Policy.bru +++ b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Create Policy.bru @@ -1,7 +1,7 @@ meta { name: Create Policy type: http - seq: 2 + seq: 8 } post { diff --git a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Prepare Dataplane.bru b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Prepare Dataplane.bru index a72fc6c..3747575 100644 --- a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Prepare Dataplane.bru +++ b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/Prepare Dataplane.bru @@ -1,11 +1,11 @@ meta { name: Prepare Dataplane type: http - seq: 4 + seq: 8 } post { - url: {{baseURL}}/cp/api/mgmt/v1alpha/dataplanes/{{provider_id}} + url: {{baseURL}}/cp/api/mgmt/v4alpha/dataplanes/{{provider_id}} body: json auth: inherit } diff --git a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/folder.bru b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/folder.bru index e70e150..43cea18 100644 --- a/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/folder.bru +++ b/requests/EDC-V Onboarding/EDC-V Management/Prepare Provider Participant/folder.bru @@ -1,6 +1,5 @@ meta { name: Prepare Provider Participant - seq: 2 } auth { diff --git a/requests/EDC-V Onboarding/EDC-V Management/folder.bru b/requests/EDC-V Onboarding/EDC-V Management/folder.bru index a9a34a8..26faa72 100644 --- a/requests/EDC-V Onboarding/EDC-V Management/folder.bru +++ b/requests/EDC-V Onboarding/EDC-V Management/folder.bru @@ -1,5 +1,6 @@ meta { name: EDC-V Management + seq: 4 } auth { diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create API Access Token (using Keycloak).bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create API Access Token (using Keycloak).bru deleted file mode 100644 index a523bb3..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create API Access Token (using Keycloak).bru +++ /dev/null @@ -1,79 +0,0 @@ -meta { - name: Create API Access Token (using Keycloak) - type: http - seq: 2 -} - -post { - url: {{KC_HOST}}/admin/realms/edcv/clients - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: password - access_token_url: {{KC_HOST}}/realms/master/protocol/openid-connect/token - refresh_token_url: - username: admin - password: admin - client_id: admin-cli - client_secret: - scope: - credentials_placement: body - credentials_id: kc-admin - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "clientId": "{{participant_context_id}}", - "name": "{{participant_context_id}} Client", - "description": "Client for API access", - "enabled": true, - "secret": "{{participant_context_id}}-secret", - "protocol": "openid-connect", - "publicClient": false, - "serviceAccountsEnabled": true, - "standardFlowEnabled": false, - "directAccessGrantsEnabled": false, - "fullScopeAllowed": true, - "protocolMappers": [ - { - "name": "participantContextId", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "participant_context_id", - "claim.value": "{{participant_context_id}}", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "role", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "role", - "claim.value": "participant", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - } - ] - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create Holder in IssuerService.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create Holder in IssuerService.bru deleted file mode 100644 index 3fcd523..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create Holder in IssuerService.bru +++ /dev/null @@ -1,39 +0,0 @@ -meta { - name: Create Holder in IssuerService - type: http - seq: 3 -} - -post { - url: {{baseURL}}/issuer/admin/api/admin/v1alpha/participants/aXNzdWVy/holders - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: provisioner - client_secret: provisioner-secret - scope: issuer-admin-api:write - credentials_placement: body - credentials_id: edcv-provisioner - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "did": "{{participant_context_did}}", - "holderId": "{{participant_context_did}}", - "name": "{{participant_context_id}} tenant" - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create ParticipantContext in Control Plane.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create ParticipantContext in Control Plane.bru deleted file mode 100644 index fcdbe70..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create ParticipantContext in Control Plane.bru +++ /dev/null @@ -1,55 +0,0 @@ -meta { - name: Create ParticipantContext in Control Plane - type: http - seq: 5 -} - -post { - url: {{baseURL}}/cp/api/mgmt/v1alpha/participants - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: provisioner - client_secret: provisioner-secret - scope: management-api:write - credentials_placement: basic_auth_header - credentials_id: edcv-provisioner - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "participantContextId": "{{participant_context_id}}", - "identity": "{{participant_context_id}}", - "participantId": "{{participant_context_did}}", - "isActive": true, - "tokenUrl": "http://identityhub.edc-v.svc.cluster.local:7084/api/sts/token", - "clientSecret": "{{tenant_clientSecret}}", - "clientId": "{{tenant_clientId}}", - "vaultConfig": { - "credentials": { - "clientId": "{{participant_context_id}}-vault", - "clientSecret": "{{participant_context_id}}-secret", - "tokenUrl": "http://keycloak.edc-v.svc.cluster.local:8080/realms/edcv/protocol/openid-connect/token" - }, - "config": { - "secretPath": "v1/participants", - "folderPath": "{{participant_context_id}}/identityhub", - "vaultUrl": "http://vault.edc-v.svc.cluster.local:8200" - } - } - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create ParticipantContext in IdentityHub.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create ParticipantContext in IdentityHub.bru deleted file mode 100644 index 9d06f5e..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create ParticipantContext in IdentityHub.bru +++ /dev/null @@ -1,100 +0,0 @@ -meta { - name: Create ParticipantContext in IdentityHub - type: http - seq: 4 -} - -post { - url: {{baseURL}}/cs/api/identity/v1alpha/participants - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: provisioner - client_secret: provisioner-secret - scope: identity-api:read identity-api:write - credentials_placement: body - credentials_id: edcv-provisioner - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "roles": [], - "serviceEndpoints": [ - { - "type": "CredentialService", - "serviceEndpoint": "http://identityhub.edc-v.svc.cluster.local:7082/api/credentials/v1/participants/{{participant_context_id_base64}}", - "id": "{{participant_context_id}}-credentialservice-1" - }, - { - "type": "ProtocolEndpoint", - "serviceEndpoint": "http://controlplane.edc-v.svc.cluster.local:8082/api/dsp/{{participant_context_id}}/2025-1", - "id": "{{participant_context_id}}-dsp" - } - ], - "active": true, - "participantContextId": "{{participant_context_id}}", - "did": "{{participant_context_did}}", - "key": { - "keyId": "{{participant_context_did}}#key-1", - "privateKeyAlias": "{{participant_context_did}}#key-1", - "keyGeneratorParams": { - "algorithm": "EDDSA", - "curve": "ed25519" - } - }, - "additionalProperties": { - "edc.vault.hashicorp.config": { - "credentials": { - "clientId": "{{participant_context_id}}-vault", - "clientSecret": "{{participant_context_id}}-secret", - "tokenUrl": "http://keycloak.edc-v.svc.cluster.local:8080/realms/edcv/protocol/openid-connect/token" - }, - "config": { - "secretPath": "v1/participants", - "folderPath": "{{participant_context_id}}/identityhub", - "vaultUrl": "http://vault.edc-v.svc.cluster.local:8200" - } - } - } - } -} - -script:post-response { - // Parse JSON response and store clientId and clientSecret as collection variables - let jsonData; - - test("Response is valid JSON", function () { - try { - jsonData = res.getBody(); - expect(jsonData).to.be.an("object"); - } catch (e) { - throw new Error("Response body is not valid JSON"); - } - }); - - test("Response contains apiKey, clientId and clientSecret", function () { - expect(jsonData).to.have.property("clientId"); - expect(jsonData).to.have.property("clientSecret"); - expect(jsonData).to.have.property("apiKey"); - }); - - if (jsonData && jsonData.clientId && jsonData.clientSecret) { - bru.setVar("tenant_clientId", jsonData.clientId); - bru.setVar("tenant_clientSecret", jsonData.clientSecret); - bru.setVar("tenant_apiKey", jsonData.apiKey); - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create Vault Access Token (using Keycloak).bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create Vault Access Token (using Keycloak).bru deleted file mode 100644 index ec4f17e..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Create Vault Access Token (using Keycloak).bru +++ /dev/null @@ -1,79 +0,0 @@ -meta { - name: Create Vault Access Token (using Keycloak) - type: http - seq: 1 -} - -post { - url: {{KC_HOST}}/admin/realms/edcv/clients - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: password - access_token_url: {{KC_HOST}}/realms/master/protocol/openid-connect/token - refresh_token_url: - username: admin - password: admin - client_id: admin-cli - client_secret: - scope: - credentials_placement: body - credentials_id: kc-admin - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "clientId": "{{participant_context_id}}-vault", - "name": "{{participant_context_id}} Client", - "description": "Client for API access", - "enabled": true, - "secret": "{{participant_context_id}}-secret", - "protocol": "openid-connect", - "publicClient": false, - "serviceAccountsEnabled": true, - "standardFlowEnabled": false, - "directAccessGrantsEnabled": false, - "fullScopeAllowed": true, - "protocolMappers": [ - { - "name": "participantContextId", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "participant_context_id", - "claim.value": "{{participant_context_id}}", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "role", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "role", - "claim.value": "participant", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - } - ] - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Get Credentials.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Get Credentials.bru deleted file mode 100644 index 15044bd..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Get Credentials.bru +++ /dev/null @@ -1,31 +0,0 @@ -meta { - name: Get Credentials - type: http - seq: 7 -} - -get { - url: {{baseURL}}/cs/api/identity/v1alpha/participants/{{participant_context_id_base64}}/credentials - body: none - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: {{participant_context_id}} - client_secret: {{participant_context_id}}-secret - scope: identity-api:write identity-api:read - credentials_placement: body - credentials_id: edcv-consumer - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Request Credentials.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Request Credentials.bru deleted file mode 100644 index 4d2ba50..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/Request Credentials.bru +++ /dev/null @@ -1,43 +0,0 @@ -meta { - name: Request Credentials - type: http - seq: 6 -} - -post { - url: {{baseURL}}/cs/api/identity/v1alpha/participants/{{participant_context_id_base64}}/credentials/request - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: {{participant_context_id}} - client_secret: {{participant_context_id}}-secret - scope: identity-api:write identity-api:read - credentials_placement: body - credentials_id: edcv-consumer - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "issuerDid": "did:web:issuerservice.edc-v.svc.cluster.local%3A10016:issuer", - "holderPid": "{{$randomUUID}}", - "credentials": [{ - "format": "VC1_0_JWT", - "type": "MembershipCredential", - "id": "membership-credential-def" - }] - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/folder.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/folder.bru deleted file mode 100644 index 153c887..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Consumer)/folder.bru +++ /dev/null @@ -1,14 +0,0 @@ -meta { - name: Create EDC-V ParticipantContext (Consumer) - seq: 3 -} - -auth { - mode: inherit -} - -vars:pre-request { - participant_context_id: consumer - participant_context_did: did:web:identityhub.edc-v.svc.cluster.local%3A7083:consumer - participant_context_id_base64: Y29uc3VtZXI= -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create API Access Token (using Keycloak).bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create API Access Token (using Keycloak).bru deleted file mode 100644 index 70fb883..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create API Access Token (using Keycloak).bru +++ /dev/null @@ -1,79 +0,0 @@ -meta { - name: Create API Access Token (using Keycloak) - type: http - seq: 2 -} - -post { - url: {{KC_HOST}}/admin/realms/edcv/clients - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: password - access_token_url: {{KC_HOST}}/realms/master/protocol/openid-connect/token - refresh_token_url: - username: admin - password: admin - client_id: admin-cli - client_secret: - scope: - credentials_placement: basic_auth_header - credentials_id: kc-admin - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "clientId": "{{participant_context_id}}", - "name": "{{participant_context_id}} Client", - "description": "Client for API access", - "enabled": true, - "secret": "{{participant_context_id}}-secret", - "protocol": "openid-connect", - "publicClient": false, - "serviceAccountsEnabled": true, - "standardFlowEnabled": false, - "directAccessGrantsEnabled": false, - "fullScopeAllowed": true, - "protocolMappers": [ - { - "name": "participantContextId", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "participant_context_id", - "claim.value": "{{participant_context_id}}", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "role", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "role", - "claim.value": "participant", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - } - ] - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create Holder in IssuerService.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create Holder in IssuerService.bru deleted file mode 100644 index dc439f4..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create Holder in IssuerService.bru +++ /dev/null @@ -1,39 +0,0 @@ -meta { - name: Create Holder in IssuerService - type: http - seq: 3 -} - -post { - url: {{baseURL}}/issuer/admin/api/admin/v1alpha/participants/aXNzdWVy/holders - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: provisioner - client_secret: provisioner-secret - scope: issuer-admin-api:write - credentials_placement: body - credentials_id: edcv-provisioner - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "did": "{{participant_context_did}}", - "holderId": "{{participant_context_did}}", - "name": "{{participant_context_id}} tenant" - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create ParticipantContext in Control Plane.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create ParticipantContext in Control Plane.bru deleted file mode 100644 index 7e95330..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create ParticipantContext in Control Plane.bru +++ /dev/null @@ -1,55 +0,0 @@ -meta { - name: Create ParticipantContext in Control Plane - type: http - seq: 5 -} - -post { - url: {{baseURL}}/cp/api/mgmt/v1alpha/participants - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: provisioner - client_secret: provisioner-secret - scope: management-api:write - credentials_placement: basic_auth_header - credentials_id: edcv-admin - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "participantContextId": "{{participant_context_id}}", - "identity": "{{participant_context_id}}", - "participantId": "{{participant_context_did}}", - "isActive": true, - "tokenUrl": "http://identityhub.edc-v.svc.cluster.local:7084/api/sts/token", - "clientSecret": "{{tenant_clientSecret}}", - "clientId": "{{tenant_clientId}}", - "vaultConfig": { - "credentials": { - "clientId": "{{participant_context_id}}-vault", - "clientSecret": "{{participant_context_id}}-secret", - "tokenUrl": "http://keycloak.edc-v.svc.cluster.local:8080/realms/edcv/protocol/openid-connect/token" - }, - "config": { - "secretPath": "v1/participants", - "folderPath": "{{participant_context_id}}/identityhub", - "vaultUrl": "http://vault.edc-v.svc.cluster.local:8200" - } - } - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create ParticipantContext in IdentityHub.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create ParticipantContext in IdentityHub.bru deleted file mode 100644 index 9d06f5e..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create ParticipantContext in IdentityHub.bru +++ /dev/null @@ -1,100 +0,0 @@ -meta { - name: Create ParticipantContext in IdentityHub - type: http - seq: 4 -} - -post { - url: {{baseURL}}/cs/api/identity/v1alpha/participants - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: provisioner - client_secret: provisioner-secret - scope: identity-api:read identity-api:write - credentials_placement: body - credentials_id: edcv-provisioner - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "roles": [], - "serviceEndpoints": [ - { - "type": "CredentialService", - "serviceEndpoint": "http://identityhub.edc-v.svc.cluster.local:7082/api/credentials/v1/participants/{{participant_context_id_base64}}", - "id": "{{participant_context_id}}-credentialservice-1" - }, - { - "type": "ProtocolEndpoint", - "serviceEndpoint": "http://controlplane.edc-v.svc.cluster.local:8082/api/dsp/{{participant_context_id}}/2025-1", - "id": "{{participant_context_id}}-dsp" - } - ], - "active": true, - "participantContextId": "{{participant_context_id}}", - "did": "{{participant_context_did}}", - "key": { - "keyId": "{{participant_context_did}}#key-1", - "privateKeyAlias": "{{participant_context_did}}#key-1", - "keyGeneratorParams": { - "algorithm": "EDDSA", - "curve": "ed25519" - } - }, - "additionalProperties": { - "edc.vault.hashicorp.config": { - "credentials": { - "clientId": "{{participant_context_id}}-vault", - "clientSecret": "{{participant_context_id}}-secret", - "tokenUrl": "http://keycloak.edc-v.svc.cluster.local:8080/realms/edcv/protocol/openid-connect/token" - }, - "config": { - "secretPath": "v1/participants", - "folderPath": "{{participant_context_id}}/identityhub", - "vaultUrl": "http://vault.edc-v.svc.cluster.local:8200" - } - } - } - } -} - -script:post-response { - // Parse JSON response and store clientId and clientSecret as collection variables - let jsonData; - - test("Response is valid JSON", function () { - try { - jsonData = res.getBody(); - expect(jsonData).to.be.an("object"); - } catch (e) { - throw new Error("Response body is not valid JSON"); - } - }); - - test("Response contains apiKey, clientId and clientSecret", function () { - expect(jsonData).to.have.property("clientId"); - expect(jsonData).to.have.property("clientSecret"); - expect(jsonData).to.have.property("apiKey"); - }); - - if (jsonData && jsonData.clientId && jsonData.clientSecret) { - bru.setVar("tenant_clientId", jsonData.clientId); - bru.setVar("tenant_clientSecret", jsonData.clientSecret); - bru.setVar("tenant_apiKey", jsonData.apiKey); - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create Vault Access Token (using Keycloak).bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create Vault Access Token (using Keycloak).bru deleted file mode 100644 index b8a7fb0..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Create Vault Access Token (using Keycloak).bru +++ /dev/null @@ -1,79 +0,0 @@ -meta { - name: Create Vault Access Token (using Keycloak) - type: http - seq: 1 -} - -post { - url: {{KC_HOST}}/admin/realms/edcv/clients - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: password - access_token_url: {{KC_HOST}}/realms/master/protocol/openid-connect/token - refresh_token_url: - username: admin - password: admin - client_id: admin-cli - client_secret: - scope: - credentials_placement: body - credentials_id: kc-admin - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "clientId": "{{participant_context_id}}-vault", - "name": "{{participant_context_id}} Client", - "description": "Client for API access", - "enabled": true, - "secret": "{{participant_context_id}}-secret", - "protocol": "openid-connect", - "publicClient": false, - "serviceAccountsEnabled": true, - "standardFlowEnabled": false, - "directAccessGrantsEnabled": false, - "fullScopeAllowed": true, - "protocolMappers": [ - { - "name": "participantContextId", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "participant_context_id", - "claim.value": "{{participant_context_id}}", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "role", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "role", - "claim.value": "participant", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - } - ] - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Get Credentials.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Get Credentials.bru deleted file mode 100644 index 818a78f..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Get Credentials.bru +++ /dev/null @@ -1,31 +0,0 @@ -meta { - name: Get Credentials - type: http - seq: 7 -} - -get { - url: {{baseURL}}/cs/api/identity/v1alpha/participants/{{participant_context_id_base64}}/credentials - body: none - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: {{participant_context_id}} - client_secret: {{participant_context_id}}-secret - scope: identity-api:write identity-api:read - credentials_placement: body - credentials_id: edcv-provider - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Request Credentials.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Request Credentials.bru deleted file mode 100644 index 138e2d6..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/Request Credentials.bru +++ /dev/null @@ -1,42 +0,0 @@ -meta { - name: Request Credentials - type: http - seq: 6 -} - -post { - url: {{baseURL}}/cs/api/identity/v1alpha/participants/{{participant_context_id_base64}}/credentials/request - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: {{participant_context_id}} - client_secret: {{participant_context_id}}-secret - credentials_placement: body - scope: identity-api:write identity-api:read - credentials_id: edcv-provider - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} -body:json { - { - "issuerDid": "did:web:issuerservice.edc-v.svc.cluster.local%3A10016:issuer", - "holderPid": "{{$randomUUID}}", - "credentials": [{ - "format": "VC1_0_JWT", - "type": "MembershipCredential", - "id": "membership-credential-def" - }] - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/folder.bru b/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/folder.bru deleted file mode 100644 index 4db8dbe..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/Create EDC-V ParticipantContext (Provider)/folder.bru +++ /dev/null @@ -1,14 +0,0 @@ -meta { - name: Create EDC-V ParticipantContext (Provider) - seq: 3 -} - -auth { - mode: inherit -} - -vars:pre-request { - participant_context_id: provider - participant_context_did: did:web:identityhub.edc-v.svc.cluster.local%3A7083:provider - participant_context_id_base64: cHJvdmlkZXI= -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create -Issuer- Tenant in IssuerService.bru b/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create -Issuer- Tenant in IssuerService.bru deleted file mode 100644 index 84ec37c..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create -Issuer- Tenant in IssuerService.bru +++ /dev/null @@ -1,78 +0,0 @@ -meta { - name: Create "Issuer" Tenant in IssuerService - type: http - seq: 1 -} - -post { - url: {{baseURL}}/issuer/cs/api/identity/v1alpha/participants - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: provisioner - client_secret: provisioner-secret - scope: issuer-admin-api:write - credentials_placement: body - credentials_id: edcv-provisioner - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "roles": [ - "admin" - ], - "serviceEndpoints": [ - { - "type": "IssuerService", - "serviceEndpoint": "http://issuerservice.edc-v.svc.cluster.local:10012/api/issuance/v1alpha/participants/aXNzdWVy", - "id": "issuer-service-1" - } - ], - "active": true, - "participantContextId": "issuer", - "did": "did:web:issuerservice.edc-v.svc.cluster.local%3A10016:issuer", - "key": { - "keyId": "did:web:issuerservice.edc-v.svc.cluster.local%3A10016:issuer#key-1", - "privateKeyAlias": "did:web:issuerservice.edc-v.svc.cluster.local%3A10016:issuer#key-1", - "keyGeneratorParams": { - "algorithm": "EdDSA" - } - }, - "additionalProperties": { - "edc.vault.hashicorp.config": { - "credentials": { - "clientId": "{{issuer_clientId}}", - "clientSecret": "{{issuer_clientSecret}}", - "tokenUrl": "http://keycloak.edc-v.svc.cluster.local:8080/realms/edcv/protocol/openid-connect/token" - }, - "config": { - "secretPath": "v1/participants", - "folderPath": "{{issuer_clientId}}", - "vaultUrl": "http://vault.edc-v.svc.cluster.local:8200" - } - } - } - } -} - -script:post-response { - test("Response contains apiKey, clientId and clientSecret", function () { - expect(res.getBody()).to.have.property("apiKey"); - }) - let apiKey = res.getBody().apiKey; - bru.setVar("issuer_apiKey", apiKey) -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create AttestationDefinition.bru b/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create AttestationDefinition.bru deleted file mode 100644 index fe9cd4a..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create AttestationDefinition.bru +++ /dev/null @@ -1,40 +0,0 @@ -meta { - name: Create AttestationDefinition - type: http - seq: 1 -} - -post { - url: {{baseURL}}/issuer/admin/api/admin/v1alpha/participants/aXNzdWVy/attestations - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: issuer - client_secret: issuer-secret - scope: issuer-admin-api:write - credentials_placement: body - credentials_id: edcv-issuer - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "attestationType": "membership", - "configuration": { - }, - "id": "membership-attestation-def-1" - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create CredentialDefinition.bru b/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create CredentialDefinition.bru deleted file mode 100644 index b518573..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create CredentialDefinition.bru +++ /dev/null @@ -1,63 +0,0 @@ -meta { - name: Create CredentialDefinition - type: http - seq: 1 -} - -post { - url: {{baseURL}}/issuer/admin/api/admin/v1alpha/participants/aXNzdWVy/credentialdefinitions - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: client_credentials - access_token_url: {{KC_HOST}}/realms/edcv/protocol/openid-connect/token - refresh_token_url: - client_id: issuer - client_secret: issuer-secret - scope: issuer-admin-api:write - credentials_placement: body - credentials_id: edcv-issuer - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "attestations": [ - "membership-attestation-def-1" - ], - "credentialType": "MembershipCredential", - "id": "membership-credential-def", - "jsonSchema": "{}", - "jsonSchemaUrl": "https://example.com/schema/membership-credential.json", - "mappings": [ - { - "input": "membership", - "output": "credentialSubject.membership", - "required": true - }, - { - "input": "membershipType", - "output": "credentialSubject.membershipType", - "required": "true" - }, - { - "input": "membershipStartDate", - "output": "credentialSubject.membershipStartDate", - "required": true - } - ], - "rules": [], - "format": "VC1_0_JWT", - "validity": "604800" - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create Vault Access Token (Issuer).bru b/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create Vault Access Token (Issuer).bru deleted file mode 100644 index 9bf419e..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/Create Vault Access Token (Issuer).bru +++ /dev/null @@ -1,79 +0,0 @@ -meta { - name: Create Vault Access Token (Issuer) - type: http - seq: 1 -} - -post { - url: {{KC_HOST}}/admin/realms/edcv/clients - body: json - auth: oauth2 -} - -auth:oauth2 { - grant_type: password - access_token_url: {{KC_HOST}}/realms/master/protocol/openid-connect/token - refresh_token_url: - username: admin - password: admin - client_id: admin-cli - client_secret: - scope: - credentials_placement: body - credentials_id: kc-admin - token_placement: header - token_header_prefix: Bearer - auto_fetch_token: true - auto_refresh_token: false -} - -body:json { - { - "clientId": "{{issuer_clientId}}", - "name": "Issuer Client", - "description": "Client for Vault Access (Issuer)", - "enabled": true, - "secret": "{{issuer_clientSecret}}", - "protocol": "openid-connect", - "publicClient": false, - "serviceAccountsEnabled": true, - "standardFlowEnabled": false, - "directAccessGrantsEnabled": false, - "fullScopeAllowed": true, - "protocolMappers": [ - { - "name": "participantContextId", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "participant_context_id", - "claim.value": "issuer", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "role", - "protocol": "openid-connect", - "protocolMapper": "oidc-hardcoded-claim-mapper", - "consentRequired": false, - "config": { - "claim.name": "role", - "claim.value": "participant", - "jsonType.label": "String", - "access.token.claim": "true", - "id.token.claim": "true", - "userinfo.token.claim": "true" - } - } - ] - } -} - -settings { - encodeUrl: true - timeout: 0 -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/folder.bru b/requests/EDC-V Onboarding/legacy - do not use/IssuerService/folder.bru deleted file mode 100644 index 8afa6e8..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/IssuerService/folder.bru +++ /dev/null @@ -1,8 +0,0 @@ -meta { - name: IssuerService - seq: 2 -} - -auth { - mode: inherit -} diff --git a/requests/EDC-V Onboarding/legacy - do not use/folder.bru b/requests/EDC-V Onboarding/legacy - do not use/folder.bru deleted file mode 100644 index f38fa13..0000000 --- a/requests/EDC-V Onboarding/legacy - do not use/folder.bru +++ /dev/null @@ -1,8 +0,0 @@ -meta { - name: legacy - do not use - seq: 6 -} - -auth { - mode: inherit -} diff --git a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferTest.java b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferTest.java index b031951..c2cca01 100644 --- a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferTest.java +++ b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferTest.java @@ -21,7 +21,6 @@ import org.junit.jupiter.api.Test; import java.io.IOException; -import java.time.Instant; import static io.restassured.RestAssured.given; import static org.assertj.core.api.Assertions.assertThat; @@ -64,9 +63,7 @@ void testDataTransfer() { createCelExpression(adminToken); monitor.info("Create cell and dataspace profile"); - var cellId = createCell(); - var dataspaceProfileId = createDataspaceProfile(); - deployDataspaceProfile(dataspaceProfileId, cellId); + var cellId = getCellId(); // onboard consumer monitor.info("Onboarding consumer"); @@ -155,45 +152,15 @@ private String createDataspaceProfile() { * * @return the Cell ID */ - private String createCell() { + private String getCellId() { return given() .contentType(APPLICATION_JSON) - .body(""" - { - "properties": { - "cellPurpose": "e2e-test" - }, - "state": "active", - "stateTimestamp": "%s" - } - """.formatted(Instant.now().toString())) - .post(TM_BASE_URL + "/api/v1alpha1/cells") + .get(TM_BASE_URL + "/api/v1alpha1/cells") .then() - .statusCode(201) - .extract().jsonPath().getString("id"); + .statusCode(200) + .extract().jsonPath().getString("[0].id"); } - /** - * Deploys a dataspace profile in CFM. - * - * @param dataspaceProfileId the dataspace profile ID to deploy - * @param cellId the cell ID to deploy the profile to - */ - private void deployDataspaceProfile(String dataspaceProfileId, String cellId) { - given() - .baseUri(TM_BASE_URL) - .contentType(APPLICATION_JSON) - .body(""" - { - "profileId": "%s", - "cellId": "%s" - } - """.formatted(dataspaceProfileId, cellId)) - .post("/api/v1alpha1/dataspace-profiles/%s/deployments".formatted(dataspaceProfileId)) - .then() - .log().ifValidationFails() - .statusCode(202); - } /** * Creates a Common Expression Language (CEL) entry in the control plane From 8bcd515421d917a654a07701d5d1c70b16807370 Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Thu, 18 Dec 2025 15:08:09 +0100 Subject: [PATCH 2/2] poll participant profile until active --- README.md | 6 +- k8s/apps/participant-manager-seed-job.yaml | 7 - k8s/base/nats.yaml | 46 +++- .../Create a new Tenant.bru | 2 +- .../Deploy Participant Profile.bru | 4 + .../Get Orchestration.bru | 108 -------- .../Get Participant Profile.bru} | 33 ++- .../Obtain Secret from Vault.bru | 2 +- .../CFM - Provision Consumer/folder.bru | 3 +- .../Create a new Tenant.bru | 2 +- .../Deploy Participant Profile.bru | 4 + .../Get Orchestration.bru | 109 -------- .../Get Participant Profile.bru} | 31 ++- .../Obtain Secret from Vault.bru | 2 +- .../CFM - Provision Provider/folder.bru | 19 +- ...est.java => DataTransferEndToEndTest.java} | 2 +- .../eclipse/edc/jad/tests/KeycloakApi.java | 2 +- .../edc/jad/tests/ParticipantOnboarding.java | 43 +-- .../edc/jad/tests/model/Orchestration.java | 247 ------------------ .../jad/tests/model/ParticipantProfile.java | 132 ++++++++++ 20 files changed, 264 insertions(+), 540 deletions(-) delete mode 100644 requests/EDC-V Onboarding/CFM - Provision Consumer/Get Orchestration.bru rename requests/EDC-V Onboarding/{CFM - Provision Provider/Query Orchestration by Profile ID.bru => CFM - Provision Consumer/Get Participant Profile.bru} (68%) delete mode 100644 requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru rename requests/EDC-V Onboarding/{CFM - Provision Consumer/Query Orchestration by Profile ID.bru => CFM - Provision Provider/Get Participant Profile.bru} (68%) rename tests/end2end/src/test/java/org/eclipse/edc/jad/tests/{DataTransferTest.java => DataTransferEndToEndTest.java} (99%) delete mode 100644 tests/end2end/src/test/java/org/eclipse/edc/jad/tests/model/Orchestration.java create mode 100644 tests/end2end/src/test/java/org/eclipse/edc/jad/tests/model/ParticipantProfile.java diff --git a/README.md b/README.md index 45a8894..18f302a 100644 --- a/README.md +++ b/README.md @@ -195,9 +195,9 @@ of the heavy lifting by doing the following: - registers the new `ParticipantContext` with the IssuerService - requests VerifiableCredentials from the IssuerService -One word of caution: the `Query Orchestration by Profile ID` will only yield a result after the onboarding is complete. -If it returns an empty response (i.e., the onboarding is still ongoing), simply wait a bit and try again. Do run all -requests - each one is needed! +N.B.: the `Get Participant Profile` may need to be run repeatedly until all entries in the `vpas` array have a +`"state": "active"` field. This is because the deployment is an asynchronous process and all agents need to run before +the profile is activated. ## Seeding EDC-V CEL Expressions diff --git a/k8s/apps/participant-manager-seed-job.yaml b/k8s/apps/participant-manager-seed-job.yaml index 852b282..4a84381 100644 --- a/k8s/apps/participant-manager-seed-job.yaml +++ b/k8s/apps/participant-manager-seed-job.yaml @@ -144,13 +144,6 @@ spec: -H "Content-Type: application/json" \ -d '{ "activities": [ - { - "dependsOn": [], - "discriminator": "deploy", - "inputs": [], - "type": "network-activity", - "id": "dns-provisioner" - }, { "id": "kc-client-provisioner", "type": "keycloak-activity", diff --git a/k8s/base/nats.yaml b/k8s/base/nats.yaml index 15764df..044376b 100644 --- a/k8s/base/nats.yaml +++ b/k8s/base/nats.yaml @@ -38,12 +38,51 @@ spec: image: nats:latest imagePullPolicy: IfNotPresent args: - - "-js" + - "-c" + - "/etc/nats/nats.conf" ports: - containerPort: 4222 protocol: TCP + name: client + - containerPort: 8222 + protocol: TCP + name: monitor + volumeMounts: + - name: nats-config + mountPath: /etc/nats + - name: jetstream-storage + mountPath: /tmp/jetstream + volumes: + - name: nats-config + configMap: + name: nats-config + - name: jetstream-storage + emptyDir: { } restartPolicy: Always +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: nats-config + namespace: edc-v +data: + nats.conf: | + # Basic server configuration + port: 4222 + monitor_port: 8222 + + # JetStream configuration + jetstream { + store_dir: "/tmp/jetstream" + max_memory_store: 64MB + max_file_store: 512MB + } + + # Enable debug/trace + debug: true + trace: false + --- apiVersion: v1 kind: Service @@ -55,9 +94,12 @@ spec: selector: app: nats ports: - - name: nats + - name: client port: 4222 targetPort: 4222 + - name: monitor + port: 8222 + targetPort: 8222 --- apiVersion: networking.k8s.io/v1 diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Create a new Tenant.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Create a new Tenant.bru index b10b1b2..5a3475e 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Create a new Tenant.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/Create a new Tenant.bru @@ -13,7 +13,7 @@ post { body:json { { "properties": { - "name": "{{participant_name}} tenant", + "name": "{{participant_name}}", "location": "eu" }, "id":"foobar" diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy Participant Profile.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy Participant Profile.bru index 6bc55b6..95f5ab0 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy Participant Profile.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/Deploy Participant Profile.bru @@ -22,6 +22,10 @@ body:json { } } +vars:pre-request { + cell_id: 12084a60-b787-4caa-b450-97b36d9f5b97 +} + script:post-response { let body = res.getBody() test("Response contains id", function () { diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Get Orchestration.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Get Orchestration.bru deleted file mode 100644 index 8632572..0000000 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Get Orchestration.bru +++ /dev/null @@ -1,108 +0,0 @@ -meta { - name: Get Orchestration - type: http - seq: 5 -} - -get { - url: {{pmBaseUrl}}/api/v1alpha1/orchestrations/{{orchestration_id}} - body: json - auth: inherit -} - -script:post-response { - let body = res.getBody() - test("Response contains participant context ID", function () { - expect(body).to.have.property("outputData") - expect(body.outputData).to.have.property("participantContextId"); - }); - - if (body && body.outputData) { - bru.setVar("consumer_context_id", body.outputData.participantContextId); - console.log("consumer context ID: "+body.outputData.participantContextId) - } -} - -example { - name: 201 Response - description: Created - - request: { - url: {{baseUrl}}/api/v1alpha1/tenants/:id/participants - method: POST - mode: json - params:path: { - id: - } - - body:json: { - { - "error": false, - "errorDetail": "", - "id": "", - "identifier": "", - "properties": {}, - "version": 0, - "vpas": [ - { - "cell": { - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "version": 0 - }, - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "type": "", - "version": 0 - } - ] - } - } - } - - response: { - headers: { - Content-Type: application/json - } - - status: { - code: 201 - text: Created - } - - body: { - type: json - content: ''' - { - "error": false, - "errorDetail": "", - "id": "", - "identifier": "", - "properties": {}, - "version": 0, - "vpas": [ - { - "cell": { - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "version": 0 - }, - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "type": "", - "version": 0 - } - ] - } - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Query Orchestration by Profile ID.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Get Participant Profile.bru similarity index 68% rename from requests/EDC-V Onboarding/CFM - Provision Provider/Query Orchestration by Profile ID.bru rename to requests/EDC-V Onboarding/CFM - Provision Consumer/Get Participant Profile.bru index 4c42bcc..1a46f87 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Query Orchestration by Profile ID.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/Get Participant Profile.bru @@ -1,31 +1,38 @@ meta { - name: Query Orchestration by Profile ID + name: Get Participant Profile type: http seq: 4 } -post { - url: {{pmBaseUrl}}/api/v1alpha1/orchestrations/query +get { + url: {{tmBaseUrl}}/api/v1alpha1/tenants/{{tenant_id}}/participant-profiles/{{participant_profile_id}} body: json auth: inherit } -body:json { - { - "predicate": "correlationId = '{{participant_profile_id}}'" - } -} - vars:pre-request { - participant_profile_id: a22cd7343cec47438d25c2d45e292a14-api + test_tenant_id: 3fa9401d-6f47-459d-a4ea-3c6d606633c5 } script:post-response { let body = res.getBody() - test("Response contains ID", function () { - expect(body[0]).to.have.property("id"); + + + + test("Should have VPA state", function () { + expect(body).to.have.property("properties"); + expect(body.properties).to.have.property("cfm.vpa.state") + expect(body.properties["cfm.vpa.state"]).to.have.property("participantContextId") + expect(body.properties["cfm.vpa.state"]).to.have.property("holderPid") + expect(body.properties["cfm.vpa.state"]).to.have.property("credentialRequest") }); - bru.setVar("orchestration_id", body[0].id); + + let props = body.properties + if( props && props["cfm.vpa.state"]){ + state = props["cfm.vpa.state"] + + bru.setVar("consumer_context_id", state.participantContextId) + } } example { diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Obtain Secret from Vault.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/Obtain Secret from Vault.bru index b99c06f..a4fcb0b 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Obtain Secret from Vault.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/Obtain Secret from Vault.bru @@ -1,7 +1,7 @@ meta { name: Obtain Secret from Vault type: http - seq: 6 + seq: 5 } get { diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/folder.bru b/requests/EDC-V Onboarding/CFM - Provision Consumer/folder.bru index 1d4eabf..f725b75 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/folder.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Consumer/folder.bru @@ -1,6 +1,5 @@ meta { name: CFM - Provision Consumer - seq: 3 } auth { @@ -8,6 +7,6 @@ auth { } vars:pre-request { - participant_name: consumer + participant_name: Consumer Tenant participant_did: did:web:identityhub.edc-v.svc.cluster.local%3A7083:consumer } diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Create a new Tenant.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Create a new Tenant.bru index b10b1b2..5a3475e 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Create a new Tenant.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/Create a new Tenant.bru @@ -13,7 +13,7 @@ post { body:json { { "properties": { - "name": "{{participant_name}} tenant", + "name": "{{participant_name}}", "location": "eu" }, "id":"foobar" diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy Participant Profile.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy Participant Profile.bru index 6bc55b6..6544e72 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy Participant Profile.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/Deploy Participant Profile.bru @@ -22,6 +22,10 @@ body:json { } } +vars:pre-request { + cell_id: 8d5bcdcc-d2f8-4630-aa9a-9df1cad7013f +} + script:post-response { let body = res.getBody() test("Response contains id", function () { diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru deleted file mode 100644 index 642689f..0000000 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru +++ /dev/null @@ -1,109 +0,0 @@ -meta { - name: Get Orchestration - type: http - seq: 5 -} - -get { - url: {{pmBaseUrl}}/api/v1alpha1/orchestrations/{{orchestration_id}} - body: json - auth: inherit -} - -script:post-response { - let body = res.getBody() - test("Response contains participant context ID", function () { - expect(body).to.have.property("outputData") - expect(body.outputData).to.have.property("participantContextId"); - }); - - if (body && body.outputData) { - bru.setVar("provider_context_id", body.outputData.participantContextId); - console.log("provider context ID: "+body.outputData.participantContextId) - - } -} - -example { - name: 201 Response - description: Created - - request: { - url: {{baseUrl}}/api/v1alpha1/tenants/:id/participants - method: POST - mode: json - params:path: { - id: - } - - body:json: { - { - "error": false, - "errorDetail": "", - "id": "", - "identifier": "", - "properties": {}, - "version": 0, - "vpas": [ - { - "cell": { - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "version": 0 - }, - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "type": "", - "version": 0 - } - ] - } - } - } - - response: { - headers: { - Content-Type: application/json - } - - status: { - code: 201 - text: Created - } - - body: { - type: json - content: ''' - { - "error": false, - "errorDetail": "", - "id": "", - "identifier": "", - "properties": {}, - "version": 0, - "vpas": [ - { - "cell": { - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "version": 0 - }, - "id": "", - "properties": {}, - "state": "", - "stateTimestamp": "", - "type": "", - "version": 0 - } - ] - } - ''' - } - } -} diff --git a/requests/EDC-V Onboarding/CFM - Provision Consumer/Query Orchestration by Profile ID.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Get Participant Profile.bru similarity index 68% rename from requests/EDC-V Onboarding/CFM - Provision Consumer/Query Orchestration by Profile ID.bru rename to requests/EDC-V Onboarding/CFM - Provision Provider/Get Participant Profile.bru index 93b9c3d..81742d2 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Query Orchestration by Profile ID.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/Get Participant Profile.bru @@ -1,27 +1,38 @@ meta { - name: Query Orchestration by Profile ID + name: Get Participant Profile type: http seq: 4 } -post { - url: {{pmBaseUrl}}/api/v1alpha1/orchestrations/query +get { + url: {{tmBaseUrl}}/api/v1alpha1/tenants/{{tenant_id}}/participant-profiles/{{participant_profile_id}} body: json auth: inherit } -body:json { - { - "predicate": "correlationId = '{{participant_profile_id}}'" - } +vars:pre-request { + test_tenant_id: 3fa9401d-6f47-459d-a4ea-3c6d606633c5 } script:post-response { let body = res.getBody() - test("Response contains ID", function () { - expect(body[0]).to.have.property("id"); + + + + test("Should have VPA state", function () { + expect(body).to.have.property("properties"); + expect(body.properties).to.have.property("cfm.vpa.state") + expect(body.properties["cfm.vpa.state"]).to.have.property("participantContextId") + expect(body.properties["cfm.vpa.state"]).to.have.property("holderPid") + expect(body.properties["cfm.vpa.state"]).to.have.property("credentialRequest") }); - bru.setVar("orchestration_id", body[0].id); + + let props = body.properties + if( props && props["cfm.vpa.state"]){ + state = props["cfm.vpa.state"] + + bru.setVar("provider_context_id", state.participantContextId) + } } example { diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/Obtain Secret from Vault.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/Obtain Secret from Vault.bru index aad5bbc..5072052 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Obtain Secret from Vault.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/Obtain Secret from Vault.bru @@ -1,7 +1,7 @@ meta { name: Obtain Secret from Vault type: http - seq: 6 + seq: 5 } get { diff --git a/requests/EDC-V Onboarding/CFM - Provision Provider/folder.bru b/requests/EDC-V Onboarding/CFM - Provision Provider/folder.bru index fe1927d..f757417 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/folder.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/folder.bru @@ -1,6 +1,6 @@ meta { name: CFM - Provision Provider - seq: 2 + seq: 3 } auth { @@ -8,21 +8,6 @@ auth { } vars:pre-request { - participant_name: provider + participant_name: Provider Tenant participant_did: did:web:identityhub.edc-v.svc.cluster.local%3A7083:provider } - -script:post-response { - let jsonData; - - test("Response is valid JSON", function () { - try { - jsonData = res.getBody(); - if(jsonData != null && jsonData != ''){ - expect(jsonData).to.be.an("object"); - } - } catch (e) { - throw new Error("Response body is not valid JSON"); - } - }); -} diff --git a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferTest.java b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferEndToEndTest.java similarity index 99% rename from tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferTest.java rename to tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferEndToEndTest.java index c2cca01..5467f31 100644 --- a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferTest.java +++ b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/DataTransferEndToEndTest.java @@ -38,7 +38,7 @@ *

*/ @EndToEndTest -public class DataTransferTest { +public class DataTransferEndToEndTest { private static final String VAULT_TOKEN = "root"; diff --git a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/KeycloakApi.java b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/KeycloakApi.java index 706a1f3..9200354 100644 --- a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/KeycloakApi.java +++ b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/KeycloakApi.java @@ -18,7 +18,7 @@ import static io.restassured.RestAssured.given; import static org.eclipse.edc.jad.tests.Constants.KEYCLOAK_URL; -import static org.eclipse.edc.jad.tests.DataTransferTest.loadResourceFile; +import static org.eclipse.edc.jad.tests.DataTransferEndToEndTest.loadResourceFile; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.equalTo; diff --git a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/ParticipantOnboarding.java b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/ParticipantOnboarding.java index cd33c38..a184692 100644 --- a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/ParticipantOnboarding.java +++ b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/ParticipantOnboarding.java @@ -15,10 +15,11 @@ package org.eclipse.edc.jad.tests; import org.eclipse.edc.jad.tests.model.ClientCredentials; -import org.eclipse.edc.jad.tests.model.Orchestration; +import org.eclipse.edc.jad.tests.model.ParticipantProfile; import org.eclipse.edc.spi.monitor.Monitor; import java.util.Base64; +import java.util.Map; import java.util.concurrent.atomic.AtomicReference; import static io.restassured.RestAssured.given; @@ -39,6 +40,7 @@ public record ParticipantOnboarding(String participantName, String participantContextDid, String vaultToken, Monitor monitor) { + @SuppressWarnings("unchecked") public ClientCredentials execute(String cellId) { monitor.info("Creating tenant for %s".formatted(participantName)); @@ -47,22 +49,31 @@ public ClientCredentials execute(String cellId) { monitor.info("Deploy participant profile"); var profileId = deployParticipantProfile(tenantId, cellId, participantContextDid); - monitor.info("Waiting for orchestration to complete"); - var orchestrationId = queryOrchestrationByProfileId(profileId); - var orchestration = getOrchestrationById(orchestrationId); - monitor.info("Orchestration completed. Reading participant access credentials"); - var participantContextId = orchestration.getOutputData().get("participantContextId").toString(); - var secret = getVaultSecret(participantContextId); + monitor.info("Waiting for dataspace profile to become active"); + await().atMost(20, SECONDS) + .until(() -> { + var participantProfile = getParticipantProfile(tenantId, profileId); + return participantProfile.getVpas().stream().allMatch(vpa -> vpa.getState().equalsIgnoreCase("active")); + }); - var token = createKeycloakToken(participantContextId, secret, "identity-api:write", "identity-api:read"); + monitor.info("Participant Profile is active. Verifying state properties"); - monitor.info("Waiting for credential issuance"); - assertThat(orchestration.getOutputData()) + var profile = getParticipantProfile(tenantId, profileId); + var state = (Map) profile.getProperties().get("cfm.vpa.state"); + + assertThat(state) .hasFieldOrProperty("holderPid") .hasFieldOrProperty("participantContextId") .hasFieldOrProperty("credentialRequest"); - var holderPid = orchestration.getOutputData().get("holderPid"); + var participantContextId = state.get("participantContextId").toString(); + var secret = getVaultSecret(participantContextId); + + var token = createKeycloakToken(participantContextId, secret, "identity-api:write", "identity-api:read"); + + monitor.info("Waiting for credential issuance"); + + var holderPid = state.get("holderPid"); assertThat(holderPid).withFailMessage(() -> "holderPid should be on the Orchestration's output data").isNotNull(); waitForCredentialIssuance(participantContextId, token, holderPid.toString()); @@ -85,18 +96,18 @@ private String getVaultSecret(String participantContextId) { /** * Retrieves an Orchestration object by its ID. * - * @param orchestrationId the unique identifier of the orchestration to retrieve + * @param profileId the unique identifier of the orchestration to retrieve * @return the Orchestration object */ - private Orchestration getOrchestrationById(String orchestrationId) { + private ParticipantProfile getParticipantProfile(String tenant, String profileId) { return given() - .baseUri(Constants.PM_BASE_URL) + .baseUri(Constants.TM_BASE_URL) .contentType(Constants.APPLICATION_JSON) - .get("/api/v1alpha1/orchestrations/%s".formatted(orchestrationId)) + .get("/api/v1alpha1/tenants/%s/participant-profiles/%s".formatted(tenant, profileId)) .then() .log().ifValidationFails() .statusCode(200) - .extract().body().as(Orchestration.class); + .extract().body().as(ParticipantProfile.class); } /** diff --git a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/model/Orchestration.java b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/model/Orchestration.java deleted file mode 100644 index 6279313..0000000 --- a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/model/Orchestration.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 2025 Metaform Systems, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0 - * - * SPDX-License-Identifier: Apache-2.0 - * - * Contributors: - * Metaform Systems, Inc. - initial API and implementation - * - */ - -package org.eclipse.edc.jad.tests.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; -import java.util.Map; - -public class Orchestration { - private String id; - private String correlationId; - private int state; - private String stateTimestamp; - private String createdTimestamp; - private String orchestrationType; - private List steps; - private ProcessingData processingData; - private Map outputData; - private Map completed; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getCorrelationId() { - return correlationId; - } - - public void setCorrelationId(String correlationId) { - this.correlationId = correlationId; - } - - public int getState() { - return state; - } - - public void setState(int state) { - this.state = state; - } - - public String getStateTimestamp() { - return stateTimestamp; - } - - public void setStateTimestamp(String stateTimestamp) { - this.stateTimestamp = stateTimestamp; - } - - public String getCreatedTimestamp() { - return createdTimestamp; - } - - public void setCreatedTimestamp(String createdTimestamp) { - this.createdTimestamp = createdTimestamp; - } - - public String getOrchestrationType() { - return orchestrationType; - } - - public void setOrchestrationType(String orchestrationType) { - this.orchestrationType = orchestrationType; - } - - public List getSteps() { - return steps; - } - - public void setSteps(List steps) { - this.steps = steps; - } - - public ProcessingData getProcessingData() { - return processingData; - } - - public void setProcessingData(ProcessingData processingData) { - this.processingData = processingData; - } - - public Map getOutputData() { - return outputData; - } - - public void setOutputData(Map outputData) { - this.outputData = outputData; - } - - public Map getCompleted() { - return completed; - } - - public void setCompleted(Map completed) { - this.completed = completed; - } - - public static class Step { - private List activities; - - public List getActivities() { - return activities; - } - - public void setActivities(List activities) { - this.activities = activities; - } - } - - public static class Activity { - private String id; - private String type; - private String discriminator; - private List dependsOn; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getDiscriminator() { - return discriminator; - } - - public void setDiscriminator(String discriminator) { - this.discriminator = discriminator; - } - - public List getDependsOn() { - return dependsOn; - } - - public void setDependsOn(List dependsOn) { - this.dependsOn = dependsOn; - } - } - - public static class ProcessingData { - @JsonProperty("cfm.participant.id") - private String participantId; - @JsonProperty("cfm.vpa.data") - private List vpaData; - @JsonProperty("clientID.apiAccess") - private String clientIdApiAccess; - @JsonProperty("clientID.vaultAccess") - private String clientIdVaultAccess; - - public String getParticipantId() { - return participantId; - } - - public void setParticipantId(String participantId) { - this.participantId = participantId; - } - - public List getVpaData() { - return vpaData; - } - - public void setVpaData(List vpaData) { - this.vpaData = vpaData; - } - - public String getClientIdApiAccess() { - return clientIdApiAccess; - } - - public void setClientIdApiAccess(String clientIdApiAccess) { - this.clientIdApiAccess = clientIdApiAccess; - } - - public String getClientIdVaultAccess() { - return clientIdVaultAccess; - } - - public void setClientIdVaultAccess(String clientIdVaultAccess) { - this.clientIdVaultAccess = clientIdVaultAccess; - } - } - - public static class VpaData { - private String cellId; - private String externalCellId; - private String id; - private String vpaType; - - public String getCellId() { - return cellId; - } - - public void setCellId(String cellId) { - this.cellId = cellId; - } - - public String getExternalCellId() { - return externalCellId; - } - - public void setExternalCellId(String externalCellId) { - this.externalCellId = externalCellId; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getVpaType() { - return vpaType; - } - - public void setVpaType(String vpaType) { - this.vpaType = vpaType; - } - } - -} diff --git a/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/model/ParticipantProfile.java b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/model/ParticipantProfile.java new file mode 100644 index 0000000..68addca --- /dev/null +++ b/tests/end2end/src/test/java/org/eclipse/edc/jad/tests/model/ParticipantProfile.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2025 Metaform Systems, Inc. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Metaform Systems, Inc. - initial API and implementation + * + */ + +package org.eclipse.edc.jad.tests.model; + +import java.util.List; +import java.util.Map; + +public class ParticipantProfile { + private String id; + private int version; + private String identifier; + private List vpas; + private Map properties; + private boolean error; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public int getVersion() { + return version; + } + + public void setVersion(int version) { + this.version = version; + } + + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public List getVpas() { + return vpas; + } + + public void setVpas(List vpas) { + this.vpas = vpas; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public boolean isError() { + return error; + } + + public void setError(boolean error) { + this.error = error; + } + + public static class Vpa { + private String id; + private int version; + private String state; + private String stateTimestamp; + private String type; + private String cellId; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public int getVersion() { + return version; + } + + public void setVersion(int version) { + this.version = version; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getStateTimestamp() { + return stateTimestamp; + } + + public void setStateTimestamp(String stateTimestamp) { + this.stateTimestamp = stateTimestamp; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCellId() { + return cellId; + } + + public void setCellId(String cellId) { + this.cellId = cellId; + } + } +}