diff --git a/README.md b/README.md index acbd67a..18f302a 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. @@ -180,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 5490450..4a84381 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 "" @@ -146,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", @@ -160,7 +151,7 @@ spec: "dependsOn": [] }, { - "id": "holder-entry-creator", + "id": "registration-agent", "type": "registration-activity", "discriminator": "deploy", "dependsOn": [ @@ -176,12 +167,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/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 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..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 @@ -1,7 +1,7 @@ meta { name: Create a new Tenant type: http - seq: 3 + seq: 2 } post { @@ -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 f0574a4..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 @@ -1,7 +1,7 @@ meta { name: Deploy Participant Profile type: http - seq: 5 + seq: 3 } post { @@ -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/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 deleted file mode 100644 index 8801c77..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: 7 -} - -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 6637353..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: 5 + 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 b34e712..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: 8 + seq: 5 } 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 deleted file mode 100644 index 75ada94..0000000 --- a/requests/EDC-V Onboarding/CFM - Provision Consumer/Query Orchestration by Profile ID.bru +++ /dev/null @@ -1,109 +0,0 @@ -meta { - name: Query Orchestration by Profile ID - type: http - seq: 6 -} - -post { - url: {{pmBaseUrl}}/api/v1alpha1/orchestrations/query - body: json - auth: inherit -} - -body:json { - { - "predicate": "correlationId = '{{participant_profile_id}}'" - } -} - -script:post-response { - let body = res.getBody() - test("Response contains ID", function () { - expect(body[0]).to.have.property("id"); - }); - bru.setVar("orchestration_id", body[0].id); -} - -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/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 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 267fb31..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 @@ -1,7 +1,7 @@ meta { name: Deploy Participant Profile type: http - seq: 4 + seq: 3 } post { @@ -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/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 Participant Profile.bru similarity index 67% rename from requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru rename to requests/EDC-V Onboarding/CFM - Provision Provider/Get Participant Profile.bru index 4727abc..81742d2 100644 --- a/requests/EDC-V Onboarding/CFM - Provision Provider/Get Orchestration.bru +++ b/requests/EDC-V Onboarding/CFM - Provision Provider/Get Participant Profile.bru @@ -1,27 +1,38 @@ meta { - name: Get Orchestration + name: Get Participant Profile type: http - seq: 6 + seq: 4 } get { - url: {{pmBaseUrl}}/api/v1alpha1/orchestrations/{{orchestration_id}} + url: {{tmBaseUrl}}/api/v1alpha1/tenants/{{tenant_id}}/participant-profiles/{{participant_profile_id}} body: json auth: inherit } +vars:pre-request { + test_tenant_id: 3fa9401d-6f47-459d-a4ea-3c6d606633c5 +} + 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) - } + + 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") + }); + + 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 a491f2b..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: 7 + seq: 5 } get { 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..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: 4 + 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/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/DataTransferEndToEndTest.java similarity index 86% 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 b031951..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 @@ -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; @@ -39,7 +38,7 @@ *
*/
@EndToEndTest
-public class DataTransferTest {
+public class DataTransferEndToEndTest {
private static final String VAULT_TOKEN = "root";
@@ -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
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