From f7542dfb33418fc37f8e99d39d9e5e2a82088e6d Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Tue, 28 Jun 2022 13:50:27 +0200 Subject: [PATCH 01/24] Use Registration Service CLI to onboard participants (#154) --- .github/workflows/check.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index f91c1189..a7e019c4 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -2,7 +2,6 @@ name: Checks on: pull_request: - branches: [ main ] paths-ignore: - 'docs/**' From 9e8bb40c97be77fe8a92641fa2ceccbe15e33dea Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Tue, 28 Jun 2022 13:58:12 +0200 Subject: [PATCH 02/24] . --- .github/workflows/cd.yaml | 1 + .github/workflows/check.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 46f7f9ef..8b575c35 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -2,6 +2,7 @@ name: CD on: pull_request: + branches: [ main ] paths-ignore: - 'docs/**' diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index a7e019c4..f91c1189 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -2,6 +2,7 @@ name: Checks on: pull_request: + branches: [ main ] paths-ignore: - 'docs/**' From 4005592b46acdfbf3a2156a526071efecc83df35 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Fri, 1 Jul 2022 10:29:11 +0200 Subject: [PATCH 03/24] . --- .github/workflows/deploy.yaml | 7 ++++++- deployment/terraform/dataspace/main.tf | 16 +++++++++++----- deployment/terraform/dataspace/outputs.tf | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c7ccf449..a34ac5b9 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -399,7 +399,12 @@ jobs: - name: 'Register participant' run: | mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:1.0.0-SNAPSHOT:jar:all -DoutputDirectory=. - java -jar registration-service-cli-1.0.0-SNAPSHOT-all.jar -s=$REGISTRATION_SERVICE_API_URL participants add --request='{ "name": "${{matrix.participant}}", "supportedProtocols": [ "ids-multipart" ], "url": "http://${{ env.EDC_HOST }}:8282" }' + java -jar registration-service-cli-1.0.0-SNAPSHOT-all.jar \ + -s $REGISTRATION_SERVICE_API_URL \ + -d did:web:$DID_HOST \ + -k key.pem \ + participants add \ + --ids-url "http://${{ env.EDC_HOST }}:8282 env: REGISTRATION_SERVICE_API_URL: ${{ needs.Deploy-Dataspace.outputs.registration_service_url }}/api diff --git a/deployment/terraform/dataspace/main.tf b/deployment/terraform/dataspace/main.tf index 41692e83..ef1d06dc 100644 --- a/deployment/terraform/dataspace/main.tf +++ b/deployment/terraform/dataspace/main.tf @@ -37,8 +37,11 @@ locals { connector_name = "connector-registration" - registration_service_dns_label = "${var.prefix}-registration-mvd" - edc_default_port = 8181 + registration_service_dns_label = "${var.prefix}-registration-mvd" + edc_default_port = 8181 + registration_service_port = 8182 + registration_service_url_prefix = "/authority" + dataspace_did_url = "did:web:${azurerm_storage_account.dataspace_did.primary_web_host}" gaiax_did_url = "did:web:${azurerm_storage_account.gaiax_did.primary_web_host}" @@ -77,17 +80,20 @@ resource "azurerm_container_group" "registration-service" { memory = var.container_memory ports { - port = local.edc_default_port + port = local.registration_service_port protocol = "TCP" } environment_variables = { - EDC_CONNECTOR_NAME = local.connector_name + EDC_CONNECTOR_NAME = local.connector_name + JWT_AUDIENCE = "http://${local.registration_service_dns_label}.${var.location}.azurecontainer.io:${local.registration_service_port}" + WEB_HTTP_AUTHORITY_PORT = local.registration_service_port + WEB_HTTP_AUTHORITY_PATH = local.registration_service_url_prefix } liveness_probe { http_get { - port = 8181 + port = local.edc_default_port path = "/api/check/health" } initial_delay_seconds = 10 diff --git a/deployment/terraform/dataspace/outputs.tf b/deployment/terraform/dataspace/outputs.tf index c740466b..44010358 100644 --- a/deployment/terraform/dataspace/outputs.tf +++ b/deployment/terraform/dataspace/outputs.tf @@ -12,7 +12,7 @@ output "app_insights_connection_string" { } output "registration_service_url" { - value = "http://${azurerm_container_group.registration-service.fqdn}:${local.edc_default_port}" + value = "http://${azurerm_container_group.registration-service.fqdn}:${local.registration_service_port}" } output "dataspace_did_host" { From e4060bb653ebff56c4ddeb843714834e3ab371e8 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Fri, 1 Jul 2022 10:44:50 +0200 Subject: [PATCH 04/24] . --- .github/workflows/cd.yaml | 1 - .github/workflows/check.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 8b575c35..46f7f9ef 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -2,7 +2,6 @@ name: CD on: pull_request: - branches: [ main ] paths-ignore: - 'docs/**' diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index f91c1189..a7e019c4 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -2,7 +2,6 @@ name: Checks on: pull_request: - branches: [ main ] paths-ignore: - 'docs/**' From 7d0a190c8a1274d479725b2aeaa94edc9d00e7a3 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Fri, 1 Jul 2022 12:43:35 +0200 Subject: [PATCH 05/24] . --- ...strationServiceNodeDirectoryExtension.java | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java b/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java index 0076affb..df6d5678 100644 --- a/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java +++ b/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java @@ -15,10 +15,13 @@ package org.eclipse.dataspaceconnector.mvd; import org.eclipse.dataspaceconnector.catalog.spi.FederatedCacheNodeDirectory; -import org.eclipse.dataspaceconnector.common.configuration.ConfigurationFunctions; import org.eclipse.dataspaceconnector.registration.client.ApiClientFactory; import org.eclipse.dataspaceconnector.registration.client.api.RegistryApi; -import org.eclipse.dataspaceconnector.spi.system.Provides; +import org.eclipse.dataspaceconnector.spi.EdcSetting; +import org.eclipse.dataspaceconnector.spi.iam.IdentityService; +import org.eclipse.dataspaceconnector.spi.monitor.Monitor; +import org.eclipse.dataspaceconnector.spi.system.Inject; +import org.eclipse.dataspaceconnector.spi.system.Provider; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; import org.eclipse.dataspaceconnector.spi.types.TypeManager; @@ -26,18 +29,35 @@ /** * Extension to set up federated cache directory using Registration Service API as backend. */ -@Provides(FederatedCacheNodeDirectory.class) public class RegistrationServiceNodeDirectoryExtension implements ServiceExtension { - static final String API_URL = "http://localhost:8181/api"; + + @EdcSetting + private static final String REGISTRATION_SERVICE_API_URL = "registration.service.api.url"; + private static final String REGISTRATION_SERVICE_API_URL_DEFAULT = "http://localhost:8181/api"; + + @Inject + private Monitor monitor; + + @Inject + private TypeManager typeManager; + + @Inject + private IdentityService identityService; + + private String registrationServiceApiUrl; @Override public void initialize(ServiceExtensionContext context) { - var monitor = context.getMonitor(); - TypeManager typeManager = context.getTypeManager(); - var registrationServiceApiUrl = ConfigurationFunctions.propOrEnv("registration.service.api.url", API_URL); - var service = new RegistrationServiceNodeDirectory(new RegistryApi(ApiClientFactory.createApiClient(registrationServiceApiUrl))); - context.registerService(FederatedCacheNodeDirectory.class, service); + registrationServiceApiUrl = context.getSetting( + REGISTRATION_SERVICE_API_URL, REGISTRATION_SERVICE_API_URL_DEFAULT); + } + + @Provider + public FederatedCacheNodeDirectory federatedCacheNodeDirectory() { + var apiClient = ApiClientFactory.createApiClient(registrationServiceApiUrl, identityService::obtainClientCredentials); + var registryApiClient = new RegistryApi(apiClient); + return new RegistrationServiceNodeDirectory(registryApiClient); } } From 9f8214bbaea5bfd6e9ebb28441a9c27f0470eb20 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Fri, 1 Jul 2022 15:03:30 +0200 Subject: [PATCH 06/24] . --- deployment/terraform/dataspace/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/terraform/dataspace/main.tf b/deployment/terraform/dataspace/main.tf index ef1d06dc..1ff81816 100644 --- a/deployment/terraform/dataspace/main.tf +++ b/deployment/terraform/dataspace/main.tf @@ -86,7 +86,7 @@ resource "azurerm_container_group" "registration-service" { environment_variables = { EDC_CONNECTOR_NAME = local.connector_name - JWT_AUDIENCE = "http://${local.registration_service_dns_label}.${var.location}.azurecontainer.io:${local.registration_service_port}" + JWT_AUDIENCE = "http://${local.registration_service_dns_label}.${var.location}.azurecontainer.io:${local.registration_service_port}${local.registration_service_url_prefix}" WEB_HTTP_AUTHORITY_PORT = local.registration_service_port WEB_HTTP_AUTHORITY_PATH = local.registration_service_url_prefix } From 9ff92effaf53e947d35783da29c3b1cdfff19ebd Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Fri, 1 Jul 2022 16:33:49 +0200 Subject: [PATCH 07/24] . --- .github/workflows/deploy.yaml | 2 +- .../mvd/RegistrationServiceNodeDirectoryExtension.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a34ac5b9..b5890c87 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -404,7 +404,7 @@ jobs: -d did:web:$DID_HOST \ -k key.pem \ participants add \ - --ids-url "http://${{ env.EDC_HOST }}:8282 + --ids-url "http://${{ env.EDC_HOST }}:8282" env: REGISTRATION_SERVICE_API_URL: ${{ needs.Deploy-Dataspace.outputs.registration_service_url }}/api diff --git a/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java b/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java index df6d5678..1dc1b1bb 100644 --- a/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java +++ b/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java @@ -31,7 +31,6 @@ */ public class RegistrationServiceNodeDirectoryExtension implements ServiceExtension { - @EdcSetting private static final String REGISTRATION_SERVICE_API_URL = "registration.service.api.url"; private static final String REGISTRATION_SERVICE_API_URL_DEFAULT = "http://localhost:8181/api"; From 299a8d0290628a0956324d913e82ad12b2bb24b3 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Fri, 1 Jul 2022 16:50:45 +0200 Subject: [PATCH 08/24] . --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b5890c87..0d8cffec 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -406,7 +406,7 @@ jobs: participants add \ --ids-url "http://${{ env.EDC_HOST }}:8282" env: - REGISTRATION_SERVICE_API_URL: ${{ needs.Deploy-Dataspace.outputs.registration_service_url }}/api + REGISTRATION_SERVICE_API_URL: ${{ needs.Deploy-Dataspace.outputs.registration_service_url }}/authority Verify: needs: From f3b6600e212b28d7e2ecd1757b91ff3bedf0cdbd Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Fri, 1 Jul 2022 17:13:44 +0200 Subject: [PATCH 09/24] . --- .github/workflows/deploy.yaml | 2 +- .../mvd/RegistrationServiceNodeDirectoryExtension.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0d8cffec..db3fa6a4 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -295,7 +295,7 @@ jobs: dashboard_image = "mvd/data-dashboard:${{ env.RESOURCES_PREFIX }}" application_sp_object_id = "${{ secrets.APP_OBJECT_ID }}" application_sp_client_id = "${{ secrets.APP_CLIENT_ID }}" - registration_service_api_url = "${{ needs.Deploy-Dataspace.outputs.registration_service_url }}/api" + registration_service_api_url = "${{ needs.Deploy-Dataspace.outputs.registration_service_url }}/authority" EOF - name: 'Az CLI login' diff --git a/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java b/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java index 1dc1b1bb..37ce8d8e 100644 --- a/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java +++ b/extensions/refresh-catalog/src/main/java/org/eclipse/dataspaceconnector/mvd/RegistrationServiceNodeDirectoryExtension.java @@ -33,7 +33,7 @@ public class RegistrationServiceNodeDirectoryExtension implements ServiceExtensi @EdcSetting private static final String REGISTRATION_SERVICE_API_URL = "registration.service.api.url"; - private static final String REGISTRATION_SERVICE_API_URL_DEFAULT = "http://localhost:8181/api"; + private static final String REGISTRATION_SERVICE_API_URL_DEFAULT = "http://localhost:8182/authority"; @Inject private Monitor monitor; From db40a4f7a36cb05ebd6ad8bb5cf68129521532da Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Wed, 20 Jul 2022 08:36:13 +0200 Subject: [PATCH 10/24] . --- .github/workflows/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index db3fa6a4..7a634e89 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -398,8 +398,8 @@ jobs: - name: 'Register participant' run: | - mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:1.0.0-SNAPSHOT:jar:all -DoutputDirectory=. - java -jar registration-service-cli-1.0.0-SNAPSHOT-all.jar \ + mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:0.0.1-SNAPSHOT:jar:all -DoutputDirectory=. + java -jar registration-service-cli-0.0.1-SNAPSHOT-all.jar \ -s $REGISTRATION_SERVICE_API_URL \ -d did:web:$DID_HOST \ -k key.pem \ From a885aecd61a46760daafefa30eef68ee2be74640 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Thu, 21 Jul 2022 14:40:12 +0200 Subject: [PATCH 11/24] PR comments --- deployment/terraform/dataspace/main.tf | 14 +++++++------- deployment/terraform/dataspace/outputs.tf | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deployment/terraform/dataspace/main.tf b/deployment/terraform/dataspace/main.tf index 1ff81816..3a0f7d40 100644 --- a/deployment/terraform/dataspace/main.tf +++ b/deployment/terraform/dataspace/main.tf @@ -37,11 +37,11 @@ locals { connector_name = "connector-registration" - registration_service_dns_label = "${var.prefix}-registration-mvd" - edc_default_port = 8181 - registration_service_port = 8182 - registration_service_url_prefix = "/authority" - + registration_service_dns_label = "${var.prefix}-registration-mvd" + edc_default_port = 8181 + registration_service_port = 8182 + registration_service_path_prefix = "/authority" + registration_service_url = "http://${local.registration_service_dns_label}.${var.location}.azurecontainer.io:${local.registration_service_port}" dataspace_did_url = "did:web:${azurerm_storage_account.dataspace_did.primary_web_host}" gaiax_did_url = "did:web:${azurerm_storage_account.gaiax_did.primary_web_host}" @@ -86,9 +86,9 @@ resource "azurerm_container_group" "registration-service" { environment_variables = { EDC_CONNECTOR_NAME = local.connector_name - JWT_AUDIENCE = "http://${local.registration_service_dns_label}.${var.location}.azurecontainer.io:${local.registration_service_port}${local.registration_service_url_prefix}" + JWT_AUDIENCE = "${local.registration_service_url}${local.registration_service_path_prefix}" WEB_HTTP_AUTHORITY_PORT = local.registration_service_port - WEB_HTTP_AUTHORITY_PATH = local.registration_service_url_prefix + WEB_HTTP_AUTHORITY_PATH = local.registration_service_path_prefix } liveness_probe { diff --git a/deployment/terraform/dataspace/outputs.tf b/deployment/terraform/dataspace/outputs.tf index 44010358..566cdb43 100644 --- a/deployment/terraform/dataspace/outputs.tf +++ b/deployment/terraform/dataspace/outputs.tf @@ -12,7 +12,7 @@ output "app_insights_connection_string" { } output "registration_service_url" { - value = "http://${azurerm_container_group.registration-service.fqdn}:${local.registration_service_port}" + value = local.registration_service_url } output "dataspace_did_host" { From b2100e37aee65e792710f636dfc203eb46a4d999 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Thu, 21 Jul 2022 15:12:01 +0200 Subject: [PATCH 12/24] Update cd.yaml --- .github/workflows/cd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 46f7f9ef..f74741e5 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -34,12 +34,12 @@ jobs: - name: 'Register participant' run: | - mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:1.0.0-SNAPSHOT:jar:all -DoutputDirectory=. + mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:0.0.1-SNAPSHOT:jar:all -DoutputDirectory=. chmod +x system-tests/resources/register-participants.sh system-tests/resources/register-participants.sh working-directory: . env: - REGISTRATION_SERVICE_CLI_JAR_PATH: ./registration-service-cli-1.0.0-SNAPSHOT-all.jar + REGISTRATION_SERVICE_CLI_JAR_PATH: ./registration-service-cli-0.0.1-SNAPSHOT-all.jar - name: 'Unit and system tests' run: ./gradlew test From eb62e1c694b774c849996a9ef260ad49018c5c4f Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Thu, 21 Jul 2022 15:28:08 +0200 Subject: [PATCH 13/24] adapted CLI call in VerifyLocalTests --- .github/workflows/cd.yaml | 1 - system-tests/resources/register-participants.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 system-tests/resources/register-participants.sh diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index f74741e5..6626d298 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -35,7 +35,6 @@ jobs: - name: 'Register participant' run: | mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:0.0.1-SNAPSHOT:jar:all -DoutputDirectory=. - chmod +x system-tests/resources/register-participants.sh system-tests/resources/register-participants.sh working-directory: . env: diff --git a/system-tests/resources/register-participants.sh b/system-tests/resources/register-participants.sh old mode 100644 new mode 100755 index 90d91eac..9c34bf28 --- a/system-tests/resources/register-participants.sh +++ b/system-tests/resources/register-participants.sh @@ -5,5 +5,5 @@ PARTICIPANTS=(provider consumer-eu consumer-us) # Register dataspace participants for i in "${PARTICIPANTS[@]}"; do echo "Registering $i" - java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -s='http://localhost:8184/api' participants add --request='{ "name": "'$i'", "supportedProtocols": [ "ids-multipart" ], "url": "http://'$i':8282" }' + java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:$i-did-server:$i" -k=resources/vault/$i/private-key.pem -s='http://localhost:8184/api' participants add --ids-url "http://${{ env.EDC_HOST }}:8282" done From 2397dea8f7b62950bdc8d5e037c82a84cd103f7a Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Thu, 21 Jul 2022 15:32:28 +0200 Subject: [PATCH 14/24] Update register-participants.sh --- system-tests/resources/register-participants.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-tests/resources/register-participants.sh b/system-tests/resources/register-participants.sh index 9c34bf28..b04bbc7e 100755 --- a/system-tests/resources/register-participants.sh +++ b/system-tests/resources/register-participants.sh @@ -5,5 +5,5 @@ PARTICIPANTS=(provider consumer-eu consumer-us) # Register dataspace participants for i in "${PARTICIPANTS[@]}"; do echo "Registering $i" - java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:$i-did-server:$i" -k=resources/vault/$i/private-key.pem -s='http://localhost:8184/api' participants add --ids-url "http://${{ env.EDC_HOST }}:8282" + java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:$i-did-server:$i" -k=resources/vault/$i/private-key.pem -s='http://localhost:8184/api' participants add --ids-url "http://$i:8282" done From 6369558b3a0705fbeb4016175d004dcce3d14549 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Thu, 21 Jul 2022 15:53:50 +0200 Subject: [PATCH 15/24] Update register-participants.sh --- system-tests/resources/register-participants.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-tests/resources/register-participants.sh b/system-tests/resources/register-participants.sh index b04bbc7e..504f7d1f 100755 --- a/system-tests/resources/register-participants.sh +++ b/system-tests/resources/register-participants.sh @@ -5,5 +5,5 @@ PARTICIPANTS=(provider consumer-eu consumer-us) # Register dataspace participants for i in "${PARTICIPANTS[@]}"; do echo "Registering $i" - java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:$i-did-server:$i" -k=resources/vault/$i/private-key.pem -s='http://localhost:8184/api' participants add --ids-url "http://$i:8282" + java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:$i-did-server:$i" -k=system-tests/resources/vault/$i/private-key.pem -s='http://localhost:8184/api' participants add --ids-url "http://$i:8282" done From 1b0c3029c96f0594cccf373717cbfc64cb5141a3 Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Thu, 21 Jul 2022 15:57:52 +0200 Subject: [PATCH 16/24] Fixed DID URLs for docker-compose --- system-tests/resources/register-participants.sh | 2 +- system-tests/resources/webdid/consumer-eu/did.json | 4 ++-- system-tests/resources/webdid/consumer-us/did.json | 4 ++-- system-tests/resources/webdid/provider/did.json | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/system-tests/resources/register-participants.sh b/system-tests/resources/register-participants.sh index 504f7d1f..b74272e9 100755 --- a/system-tests/resources/register-participants.sh +++ b/system-tests/resources/register-participants.sh @@ -5,5 +5,5 @@ PARTICIPANTS=(provider consumer-eu consumer-us) # Register dataspace participants for i in "${PARTICIPANTS[@]}"; do echo "Registering $i" - java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:$i-did-server:$i" -k=system-tests/resources/vault/$i/private-key.pem -s='http://localhost:8184/api' participants add --ids-url "http://$i:8282" + java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:did-server:$i" -k=system-tests/resources/vault/$i/private-key.pem -s='http://localhost:8184/api' participants add --ids-url "http://$i:8282" done diff --git a/system-tests/resources/webdid/consumer-eu/did.json b/system-tests/resources/webdid/consumer-eu/did.json index f97386c1..35cd0d00 100644 --- a/system-tests/resources/webdid/consumer-eu/did.json +++ b/system-tests/resources/webdid/consumer-eu/did.json @@ -1,9 +1,9 @@ { - "id": "did:web:consumer-eu-did-server:consumer-eu", + "id": "did:web:did-server:consumer-eu", "@context": [ "https://www.w3.org/ns/did/v1", { - "@base": "did:web:consumer-eu-did-server:consumer-eu" + "@base": "did:web:did-server:consumer-eu" } ], "service": [{ diff --git a/system-tests/resources/webdid/consumer-us/did.json b/system-tests/resources/webdid/consumer-us/did.json index e193cc53..54d74bc2 100644 --- a/system-tests/resources/webdid/consumer-us/did.json +++ b/system-tests/resources/webdid/consumer-us/did.json @@ -1,9 +1,9 @@ { - "id": "did:web:consumer-us-did-server:consumer-us", + "id": "did:web:did-server:consumer-us", "@context": [ "https://www.w3.org/ns/did/v1", { - "@base": "did:web:consumer-us-did-server:consumer-us" + "@base": "did:web:did-server:consumer-us" } ], "service": [{ diff --git a/system-tests/resources/webdid/provider/did.json b/system-tests/resources/webdid/provider/did.json index 930af4af..b9a99f0b 100644 --- a/system-tests/resources/webdid/provider/did.json +++ b/system-tests/resources/webdid/provider/did.json @@ -1,9 +1,9 @@ { - "id": "did:web:provider-did-server:provider", + "id": "did:web:did-server:provider", "@context": [ "https://www.w3.org/ns/did/v1", { - "@base": "did:web:provider-did-server:provider" + "@base": "did:web:did-server:provider" } ], "service": [{ From 60f2b477918576b80844069915e4e4e0786916ad Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Thu, 21 Jul 2022 18:13:19 +0200 Subject: [PATCH 17/24] Adapted for upstream changes --- system-tests/docker-compose.yml | 13 ++++++++----- system-tests/resources/register-participants.sh | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/system-tests/docker-compose.yml b/system-tests/docker-compose.yml index bbd1440a..4bd893db 100644 --- a/system-tests/docker-compose.yml +++ b/system-tests/docker-compose.yml @@ -19,7 +19,7 @@ services: EDC_IAM_DID_WEB_USE_HTTPS: "false" EDC_CATALOG_CACHE_EXECUTION_DELAY_SECONDS: 5 EDC_CATALOG_CACHE_EXECUTION_PERIOD_SECONDS: 5 - REGISTRATION_SERVICE_API_URL: http://registration-service:8181/api + REGISTRATION_SERVICE_API_URL: http://registration-service:8184/authority depends_on: - did-server - azurite @@ -50,7 +50,7 @@ services: EDC_IAM_DID_WEB_USE_HTTPS: "false" EDC_CATALOG_CACHE_EXECUTION_DELAY_SECONDS: 5 EDC_CATALOG_CACHE_EXECUTION_PERIOD_SECONDS: 5 - REGISTRATION_SERVICE_API_URL: http://registration-service:8181/api + REGISTRATION_SERVICE_API_URL: http://registration-service:8184/authority depends_on: - did-server - azurite @@ -81,7 +81,7 @@ services: EDC_IAM_DID_WEB_USE_HTTPS: "false" EDC_CATALOG_CACHE_EXECUTION_DELAY_SECONDS: 5 EDC_CATALOG_CACHE_EXECUTION_PERIOD_SECONDS: 5 - REGISTRATION_SERVICE_API_URL: http://registration-service:8181/api + REGISTRATION_SERVICE_API_URL: http://registration-service:8184/authority depends_on: - did-server - azurite @@ -141,7 +141,10 @@ services: args: JVM_ARGS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5008" environment: - EDC_API_AUTH_KEY: ApiKeyDefaultValue + JWT_AUDIENCE: http://registration-service:8184/authority + WEB_HTTP_AUTHORITY_PORT: 8184 + WEB_HTTP_AUTHORITY_PATH: /authority + EDC_IAM_DID_WEB_USE_HTTPS: "false" ports: - - "8184:8181" + - "8184:8184" - "5008:5008" diff --git a/system-tests/resources/register-participants.sh b/system-tests/resources/register-participants.sh index b74272e9..9f878695 100755 --- a/system-tests/resources/register-participants.sh +++ b/system-tests/resources/register-participants.sh @@ -5,5 +5,5 @@ PARTICIPANTS=(provider consumer-eu consumer-us) # Register dataspace participants for i in "${PARTICIPANTS[@]}"; do echo "Registering $i" - java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:did-server:$i" -k=system-tests/resources/vault/$i/private-key.pem -s='http://localhost:8184/api' participants add --ids-url "http://$i:8282" + java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:did-server:$i" -k=system-tests/resources/vault/$i/private-key.pem -s='http://localhost:8184/authority' participants add --ids-url "http://$i:8282" done From 87ca01bb30266851f61e3c00f8d2361f6ed85db3 Mon Sep 17 00:00:00 2001 From: Peeyush Chandel <555114+cpeeyush@users.noreply.github.com> Date: Fri, 22 Jul 2022 00:58:01 +0200 Subject: [PATCH 18/24] Update JWT_AUDIENCE to localhost due to docker hosts and registration script differences --- system-tests/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-tests/docker-compose.yml b/system-tests/docker-compose.yml index 4bd893db..bccd76d6 100644 --- a/system-tests/docker-compose.yml +++ b/system-tests/docker-compose.yml @@ -141,7 +141,7 @@ services: args: JVM_ARGS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5008" environment: - JWT_AUDIENCE: http://registration-service:8184/authority + JWT_AUDIENCE: http://localhost:8184/authority WEB_HTTP_AUTHORITY_PORT: 8184 WEB_HTTP_AUTHORITY_PATH: /authority EDC_IAM_DID_WEB_USE_HTTPS: "false" From 3d243456e04f5fb0b04c5bd0cfef5c0d8f932de4 Mon Sep 17 00:00:00 2001 From: Peeyush Chandel <555114+cpeeyush@users.noreply.github.com> Date: Fri, 22 Jul 2022 01:10:01 +0200 Subject: [PATCH 19/24] Revert "Update JWT_AUDIENCE to localhost due to docker hosts and registration script differences" This reverts commit ad831731f37720bfd102ce6cc19640616661795e. --- system-tests/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-tests/docker-compose.yml b/system-tests/docker-compose.yml index bccd76d6..4bd893db 100644 --- a/system-tests/docker-compose.yml +++ b/system-tests/docker-compose.yml @@ -141,7 +141,7 @@ services: args: JVM_ARGS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5008" environment: - JWT_AUDIENCE: http://localhost:8184/authority + JWT_AUDIENCE: http://registration-service:8184/authority WEB_HTTP_AUTHORITY_PORT: 8184 WEB_HTTP_AUTHORITY_PATH: /authority EDC_IAM_DID_WEB_USE_HTTPS: "false" From 02a5ab10a2cfa4719ff8d17d063ec9f3ca02be21 Mon Sep 17 00:00:00 2001 From: Peeyush Chandel <555114+cpeeyush@users.noreply.github.com> Date: Fri, 22 Jul 2022 16:56:51 +0200 Subject: [PATCH 20/24] use docker for cli tools Use docker for cli tools add execute permission explicitly --- .github/workflows/cd.yaml | 15 +++++++-------- system-tests/docker-compose.yml | 17 +++++++++++++++++ system-tests/resources/cli-tools/Dockerfile | 12 ++++++++++++ system-tests/resources/cli-tools/entrypoint.sh | 9 +++++++++ system-tests/resources/register-participants.sh | 9 --------- 5 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 system-tests/resources/cli-tools/Dockerfile create mode 100644 system-tests/resources/cli-tools/entrypoint.sh delete mode 100755 system-tests/resources/register-participants.sh diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 6626d298..31c8b55f 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -26,20 +26,19 @@ jobs: run: ./gradlew :launcher:shadowJar working-directory: ${{ runner.temp }}/RegistrationService + - name: 'Copy Registration Service CLI' + run: | + mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:0.0.1-SNAPSHOT:jar:all -DoutputDirectory=system-tests/resources/cli-tools + cd system-tests/resources/cli-tools + mv registration-service-cli-0.0.1-SNAPSHOT-all.jar registration-service-cli.jar + working-directory: . + - name: 'Run MVD docker-compose' run: docker-compose -f system-tests/docker-compose.yml up --build --detach timeout-minutes: 10 env: REGISTRATION_SERVICE_LAUNCHER_PATH: ${{ runner.temp }}/RegistrationService/launcher - - name: 'Register participant' - run: | - mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:0.0.1-SNAPSHOT:jar:all -DoutputDirectory=. - system-tests/resources/register-participants.sh - working-directory: . - env: - REGISTRATION_SERVICE_CLI_JAR_PATH: ./registration-service-cli-0.0.1-SNAPSHOT-all.jar - - name: 'Unit and system tests' run: ./gradlew test timeout-minutes: 10 diff --git a/system-tests/docker-compose.yml b/system-tests/docker-compose.yml index 4bd893db..85cf7e51 100644 --- a/system-tests/docker-compose.yml +++ b/system-tests/docker-compose.yml @@ -148,3 +148,20 @@ services: ports: - "8184:8184" - "5008:5008" + + # cli-tools to help setup MVD environment e.g. registering participant to authority. + cli-tools: + container_name: cli-tools + build: + context: ./resources/cli-tools + volumes: + - ./resources:/resources + depends_on: + consumer-eu: + condition: service_healthy + consumer-us: + condition: service_healthy + provider: + condition: service_healthy + registration-service: + condition: service_healthy diff --git a/system-tests/resources/cli-tools/Dockerfile b/system-tests/resources/cli-tools/Dockerfile new file mode 100644 index 00000000..31948eeb --- /dev/null +++ b/system-tests/resources/cli-tools/Dockerfile @@ -0,0 +1,12 @@ +# -buster is required to have apt available +FROM openjdk:17-slim-buster + +WORKDIR /app + +# Copy Registration Service client jar +COPY ./registration-service-cli.jar /app +COPY ./entrypoint.sh /app + +RUN ["chmod", "+x", "/app/entrypoint.sh"] + +ENTRYPOINT [ "/app/entrypoint.sh"] diff --git a/system-tests/resources/cli-tools/entrypoint.sh b/system-tests/resources/cli-tools/entrypoint.sh new file mode 100644 index 00000000..b16a1234 --- /dev/null +++ b/system-tests/resources/cli-tools/entrypoint.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +PARTICIPANTS=(provider consumer-eu consumer-us) + +# Register dataspace participants +for i in "${PARTICIPANTS[@]}"; do + echo "Registering $i" + java -jar registration-service-cli.jar -d="did:web:did-server:$i" -k=/resources/vault/$i/private-key.pem -s='http://registration-service:8184/authority' participants add --ids-url "http://$i:8282" +done diff --git a/system-tests/resources/register-participants.sh b/system-tests/resources/register-participants.sh deleted file mode 100755 index 9f878695..00000000 --- a/system-tests/resources/register-participants.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -PARTICIPANTS=(provider consumer-eu consumer-us) - -# Register dataspace participants -for i in "${PARTICIPANTS[@]}"; do - echo "Registering $i" - java -jar $REGISTRATION_SERVICE_CLI_JAR_PATH -d="did:web:did-server:$i" -k=system-tests/resources/vault/$i/private-key.pem -s='http://localhost:8184/authority' participants add --ids-url "http://$i:8282" -done From 894bcd424f809f3498f8d01fbc7e50114ee9f8de Mon Sep 17 00:00:00 2001 From: Alexandre Gattiker Date: Mon, 25 Jul 2022 07:32:45 +0200 Subject: [PATCH 21/24] Simplified scripts --- .github/workflows/cd.yaml | 11 ++++++----- system-tests/resources/cli-tools/Dockerfile | 9 +++------ system-tests/resources/cli-tools/entrypoint.sh | 0 3 files changed, 9 insertions(+), 11 deletions(-) mode change 100644 => 100755 system-tests/resources/cli-tools/entrypoint.sh diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 31c8b55f..26c2b274 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -28,10 +28,11 @@ jobs: - name: 'Copy Registration Service CLI' run: | - mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:0.0.1-SNAPSHOT:jar:all -DoutputDirectory=system-tests/resources/cli-tools - cd system-tests/resources/cli-tools - mv registration-service-cli-0.0.1-SNAPSHOT-all.jar registration-service-cli.jar - working-directory: . + mvn dependency:copy -Dartifact=org.eclipse.dataspaceconnector.registrationservice:registration-service-cli:$REGISTRATION_SERVICE_VERSION:jar:all -DoutputDirectory=. + mv registration-service-cli-$REGISTRATION_SERVICE_VERSION-all.jar registration-service-cli.jar + working-directory: system-tests/resources/cli-tools + env: + REGISTRATION_SERVICE_VERSION: 0.0.1-SNAPSHOT - name: 'Run MVD docker-compose' run: docker-compose -f system-tests/docker-compose.yml up --build --detach @@ -49,4 +50,4 @@ jobs: run: docker-compose -f system-tests/docker-compose.yml logs if: always() env: - REGISTRATION_SERVICE_LAUNCHER_PATH: ${{ runner.temp }}/RegistrationService/launcher \ No newline at end of file + REGISTRATION_SERVICE_LAUNCHER_PATH: ${{ runner.temp }}/RegistrationService/launcher diff --git a/system-tests/resources/cli-tools/Dockerfile b/system-tests/resources/cli-tools/Dockerfile index 31948eeb..4ac29e2c 100644 --- a/system-tests/resources/cli-tools/Dockerfile +++ b/system-tests/resources/cli-tools/Dockerfile @@ -1,12 +1,9 @@ -# -buster is required to have apt available FROM openjdk:17-slim-buster WORKDIR /app # Copy Registration Service client jar -COPY ./registration-service-cli.jar /app -COPY ./entrypoint.sh /app +COPY ./registration-service-cli.jar . +COPY ./entrypoint.sh . -RUN ["chmod", "+x", "/app/entrypoint.sh"] - -ENTRYPOINT [ "/app/entrypoint.sh"] +ENTRYPOINT "/app/entrypoint.sh" diff --git a/system-tests/resources/cli-tools/entrypoint.sh b/system-tests/resources/cli-tools/entrypoint.sh old mode 100644 new mode 100755 From caf9630bd52dba5ec626aa54aca392b021eb78ca Mon Sep 17 00:00:00 2001 From: Peeyush Chandel <555114+cpeeyush@users.noreply.github.com> Date: Wed, 27 Jul 2022 14:14:05 +0200 Subject: [PATCH 22/24] Update doc to reflect cli-tools changes --- .github/workflows/deploy.yaml | 10 ------ system-tests/README.md | 60 ++++++++++------------------------- 2 files changed, 17 insertions(+), 53 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7a634e89..de3de9d4 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -220,22 +220,12 @@ jobs: name: ${{ steps.runterraform.outputs.connector_name }} vault: ${{ steps.runterraform.outputs.key_vault }} - # To support --retry-all-errors flag at least curl version 7.71.0 is required. - - name: 'Upgrade Curl' - run: sudo -E bash deployment/curl-upgrade.sh - working-directory: . - env: - VERSION: 7.84.0 - - name: 'Verify GAIA-X Authority DID endpoint is available' run: curl https://${{ steps.runterraform.outputs.gaiax_did_host }}/.well-known/did.json | jq '.id' - name: 'Verify Dataspace DID endpoint is available' run: curl https://${{ steps.runterraform.outputs.dataspace_did_host }}/.well-known/did.json | jq '.id' - - name: 'Verify deployed Registration Service is healthy' - run: curl --retry 10 --retry-all-errors --fail ${{ steps.runterraform.outputs.registration_service_url }}/api/check/health - # Deploy dataspace participants in parallel. Deploy-Participants: needs: diff --git a/system-tests/README.md b/system-tests/README.md index 4bf69c10..7f3adbc3 100644 --- a/system-tests/README.md +++ b/system-tests/README.md @@ -5,17 +5,17 @@ The system tests copies a file from a provider to a consumer blob storage accoun ## Publish/Build Tasks > ! Important Note ! -> -> MVD depends on Eclipse DataSpaceConnector(EDC), Identity Hub and Registration Service. These dependencies -> are __not__ published to any central artifact repository yet, so in local development we have to use locally +> +> MVD depends on Eclipse DataSpaceConnector(EDC), Identity Hub and Registration Service. These dependencies +> are __not__ published to any central artifact repository yet, so in local development we have to use locally > published dependencies. > >In order to use the correct version of each repo required by the `MVD`, you need to look in [action.yml](./.github/actions/../../../.github/actions/gradle-setup/action.yml) for the hashes of the versions of the `EDC`, `Identity Hub` and the `Registration Service` that are being used by the `MVD`. > > For Example for the dependency repositories: > - `Registration Service` -> - `Identity Hub` -> - `EDC` +> - `Identity Hub` +> - `EDC` > > the hash (which is subject to change from the values presented here as an example) can be found in the _Checkout_ steps (in the `ref` property) of [action.yml](./.github/actions/gradle-setup/action.yml): @@ -44,7 +44,7 @@ The system tests copies a file from a provider to a consumer blob storage accoun ``` > After you have cloned the `EDC`, `Identity Hub` and `Registration Service` repos locally you should run the command to -> `checkout` to the specific hash. +> `checkout` to the specific hash. > > For Example: @@ -59,9 +59,9 @@ git checkout bc13cf0cb8589b792eef733c7cf7b3422476add5 git checkout 374c14bcca23ddb1dcd7476a27264510e54de7fa ``` -> Now you can follow the rest of the process below. +> Now you can follow the rest of the process below. > Once the publications are available in _Maven Central_ this process will not be necessary -> +>
### EDC @@ -113,7 +113,7 @@ Now that the publishing to the local repositories has been completed, `MVD` can ## Local Test Execution -- `MVD` system tests can be executed locally against a local `MVD` instance. +- `MVD` system tests can be executed locally against a local `MVD` instance. - `MVD` runs three `EDC Connectors` and one `Registration Service`. _Note: Ensure that you are able to build `MVD` locally as described in the previous [section](#mvd)._ @@ -132,7 +132,9 @@ From the `Registration Service` root folder, execute the following command: ./gradlew :launcher:shadowJar ``` -From the `MVD` root folder execute the following commands to set the `Registration Launcher` path environment variable and start `MVD` using the `docker-compose.yml` file. +Copy registration service client-cli jar which should be located at `/client-cli/build/libs/registration-service-cli.jar` into MVD at folder location `/system-tests/resources/cli-tools`. If required then update copied jar file name to `registration-service-cli.jar`, full path will be `/system-tests/resources/cli-tools/registration-service-cli.jar`. This `registration-service-cli.jar` will be used by `cli-tools` docker container to execute the `Registration Service` commands. + +From the `MVD` root folder execute the following commands to set the `Registration Launcher` path environment variable and start `MVD` using the `docker-compose.yml` file. > Note that the value of the path is relative to the build system and is only here for example. You **will need to change this** @@ -149,45 +151,16 @@ docker-compose -f system-tests/docker-compose.yml up --build ``` Once completed, following services will start within their docker containers: + - 3 `EDC Connectors` - _consumer-us_ - _consumer-eu_ - _provider_ (which will also be seeded with initial required data using a [postman collection](../deployment/data/MVD.postman_collection.json)) - A `Registration Service` - A `HTTP Nginx Server` (to serve DID Documents) -- An `Azurite` blob storage service - - -_Note, the `Newman` docker container will automatically stop after seeding initial data from postman scripts._ - -`EDC Connectors` need to be registered using `Registration Service` CLI client jar. After publishing `Registration Service` locally the client jar should be available under the `Registration Service` root project folder in _client-cli/build/libs_. - -> Note that the value of the path is relative to the build system and is only here for example. - -```bash -# Replace path according to your local set up -export REGISTRATION_SERVICE_CLI_JAR_PATH=c:/RegistrationService/client-cli/build/libs/registration-service-cli.jar - -# Register Participants -./system-tests/resources/register-participants.sh -``` - -_Note for Windows PowerShell, the following commands should be run the the `MVD` root project folder._ - -```powershell -# Replace path according to your local set up - -$Env:REGISTRATION_SERVICE_CLI_JAR_PATH = "c:\RegistrationService\client-cli\build\libs\registration-service-cli.jar" +- An `Azurite` blob storage service -# Register Provider -java -jar $Env:REGISTRATION_SERVICE_CLI_JAR_PATH -s="http://localhost:8184/api" participants add --request="{ \`"name\`": \`"provider\`", \`"supportedProtocols\`": [ \`"ids-multipart\`" ], \`"url\`": \`"http://provider:8282\`" }" - -# Register Consumer-EU -java -jar $Env:REGISTRATION_SERVICE_CLI_JAR_PATH -s="http://localhost:8184/api" participants add --request="{ \`"name\`": \`"consumer-eu\`", \`"supportedProtocols\`": [ \`"ids-multipart\`" ], \`"url\`": \`"http://consumer-eu:8282\`" }" - -# Register Consumer-US -java -jar $Env:REGISTRATION_SERVICE_CLI_JAR_PATH -s="http://localhost:8184/api" participants add --request="{ \`"name\`": \`"consumer-us\`", \`"supportedProtocols\`": [ \`"ids-multipart\`" ], \`"url\`": \`"http://consumer-us:8282\`" }" -``` +_Note, the `Newman` docker container will automatically stop after seeding initial data from postman scripts and `cli-tools` container will also automatically stop after registering participants._ Set the environment variable `TEST_ENVIRONMENT` to `local` to enable local blob transfer test and then run `MVD` system test using the following command: @@ -233,7 +206,7 @@ Generated keys are imported to keystores e.g. `system-tests/resources/vault/prov `MVD` local instances use a file-system based vault and its keys are managed using a java properties file e.g.`system-tests/resources/vault/provider/provider-vault.properties`. > ! IMPORTANT ! -> +> > *File System Vault is __NOT__ a secure vault and thus should only be used for testing purposes*
@@ -247,6 +220,7 @@ Web DIDs are available under `system-tests/resources/webdid` folder. The `public ```bash docker run -i danedmunds/pem-to-jwk:1.2.1 --public --pretty < system-tests/resources/vault/provider/public-key.pem > key.public.jwk ``` +
--- From 0a84982f72a7afd5fac0934f3a2bbacccccfe496 Mon Sep 17 00:00:00 2001 From: Peeyush Chandel <555114+cpeeyush@users.noreply.github.com> Date: Wed, 27 Jul 2022 14:49:08 +0200 Subject: [PATCH 23/24] Update version number --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 51602e3d..a83311d8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ edcGroup=org.eclipse.dataspaceconnector edcVersion=0.0.1-SNAPSHOT registrationServiceGroup=org.eclipse.dataspaceconnector.registrationservice -registrationServiceVersion=1.0.0-SNAPSHOT +registrationServiceVersion=0.0.1-SNAPSHOT identityHubGroup=org.eclipse.dataspaceconnector.identityhub identityHubVersion=0.0.1-SNAPSHOT gatlingVersion=3.7.5 From aad6a25cdc4881bb91277a1a42c0f2a2b9caa1a2 Mon Sep 17 00:00:00 2001 From: Peeyush Chandel <555114+cpeeyush@users.noreply.github.com> Date: Wed, 27 Jul 2022 15:04:15 +0200 Subject: [PATCH 24/24] use latest reg service --- .github/actions/gradle-setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/gradle-setup/action.yml b/.github/actions/gradle-setup/action.yml index 01477298..78e3c7c8 100644 --- a/.github/actions/gradle-setup/action.yml +++ b/.github/actions/gradle-setup/action.yml @@ -16,7 +16,7 @@ runs: with: repository: eclipse-dataspaceconnector/RegistrationService path: RegistrationService - ref: 374c14bcca23ddb1dcd7476a27264510e54de7fa + ref: daa414856b42c8534e9123279112e33b366039b4 - name: Checkout Identity Hub uses: actions/checkout@v2