diff --git a/.github/workflows/build-federated-authority-docker.yml b/.github/workflows/build-federated-authority-docker.yml deleted file mode 100644 index 6055354..0000000 --- a/.github/workflows/build-federated-authority-docker.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Docker Image CI - -on: - workflow_dispatch: - push: - branches: [ "main" ] - -env: - REGISTRY: ghcr.io - -jobs: - federated-catalog-docker: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - driver-opts: | - image=moby/buildkit:v0.10.6 - - name: Log in to the GitHub Container registry - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: Informatievlaanderen - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY }}/Informatievlaanderen/vsds-dataspace-connector/federated-authority - tags: | - type=raw,value={{date 'YYYYMMDDHHmmss'}} - type=raw,value=latest - - name: Build and push Docker image - uses: docker/build-push-action@v3 - with: - context: . - push: true - file: ./federated-authority-connector/Dockerfile - tags: ${{ steps.meta.outputs.tags }} - platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/http-pull-connector-docker.yml b/.github/workflows/http-plane-headers-extension-docker.yml similarity index 93% rename from .github/workflows/http-pull-connector-docker.yml rename to .github/workflows/http-plane-headers-extension-docker.yml index 84ffc16..f05227c 100644 --- a/.github/workflows/http-pull-connector-docker.yml +++ b/.github/workflows/http-plane-headers-extension-docker.yml @@ -1,4 +1,4 @@ -name: Docker Image CI +name: 1.b Build & Test Project on: workflow_dispatch: @@ -39,6 +39,6 @@ jobs: with: context: . push: true - file: ./http-pull-connector/Dockerfile + file: ./http-plane-headers-extension/Dockerfile tags: ${{ steps.meta.outputs.tags }} platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/http-plane-headers-extension-nexus.yml b/.github/workflows/http-plane-headers-extension-nexus.yml new file mode 100644 index 0000000..29ebab1 --- /dev/null +++ b/.github/workflows/http-plane-headers-extension-nexus.yml @@ -0,0 +1,35 @@ +name: 1.a Build & Test Project + +on: + workflow_dispatch: + push: + branches: [ "main" ] + +env: + REGISTRY: ghcr.io + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Maven Central Repository + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'zulu' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.OSSRH_PGP_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + - name: Build & Publish Package + run: ./gradlew clean build publish --stacktrace + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + OSSRH_PGP_PRIVATE_KEY: ${{ secrets.OSSRH_PGP_PRIVATE_KEY }} + OSSRH_PGP_SECRET_KEY_PASSPHRASE: ${{ secrets.OSSRH_PGP_SECRET_KEY_PASSPHRASE }} diff --git a/NOTICE.md b/NOTICE.md index 4814843..50e3e3e 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -3,12 +3,12 @@ Part of this project uses a modified version of the public api extension and http extension of the edc-connector from: https://github.com/eclipse-edc/Connector The following files were modified from their original source: -- http-pull-connector/src/main/java/org/eclipse/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApiImpl.java -- http-pull-connector/src/main/java/org/eclipse/org/eclipse/edc/connector/dataplane/api/controller/DataFlowRequestSupplier.java -- http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ExtendedDataPlanePublicApiController.java -- http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSink.java -- http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSinkFactory.java -- http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/DataPlanePublicApiExtension.java -- http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSink.java -- http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSource.java -- http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/DataPlaneHttpExtension.java \ No newline at end of file +- http-plane-headers-extension/src/main/java/org/eclipse/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApiImpl.java +- http-plane-headers-extension/src/main/java/org/eclipse/org/eclipse/edc/connector/dataplane/api/controller/DataFlowRequestSupplier.java +- http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ExtendedDataPlanePublicApiController.java +- http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSink.java +- http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSinkFactory.java +- http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/DataPlanePublicApiExtension.java +- http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSink.java +- http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSource.java +- http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/DataPlaneHttpExtension.java \ No newline at end of file diff --git a/README.MD b/README.MD index 1c767d0..2ed3ae5 100644 --- a/README.MD +++ b/README.MD @@ -1,20 +1,15 @@ # VSDS Dataspace connector -This repository provides connector builds that can be used to create a dataspace with an LDES Server. +This repository provides a connector build that can be used to create a dataspace with an LDES Server. -To create the images run the following docker commands from the root directory: +To create the image, run the following docker command from the root directory: 1. Image for consumer and provider connectors ```bash - docker build -t vsds-dataspace-connector:local . -f ./http-pull-connector/Dockerfile + docker build -t vsds-dataspace-connector:local . -f ./http-plane-headers-extension/Dockerfile ``` - -2. Image for the federated authority connector - ```bash - docker build -t vsds-federated-authority-connector:local . -f ./federated-authority-connector/Dockerfile - ``` - - > **Note**: These connectors are not production ready and should only be used for development purposes. + + > **Note**: This connector is not production ready and should only be used for development purposes. 3. E2E testing - [Basic flow](https://github.com/Informatievlaanderen/VSDS-LDES-E2E-testing/tree/main/tests/034.dataspace-connector-consumer-and-provider) diff --git a/federated-authority-connector/Dockerfile b/federated-authority-connector/Dockerfile deleted file mode 100644 index 5f73168..0000000 --- a/federated-authority-connector/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# Build the jar file -FROM openjdk:18-ea-bullseye AS build - -WORKDIR /app -COPY ./ . -RUN ./gradlew clean build - -# Run the jar file -FROM openjdk:18-ea-bullseye -WORKDIR /app -COPY --from=build /app/federated-authority-connector/build/libs/federated-authority-connector.jar . - -# Specify the command to run your application -CMD java -Dedc.fs.config=$EDC_FS_CONFIG -Dfcc.directory.file=$FCC_DIRECTORY_FILE -jar /app/federated-authority-connector.jar diff --git a/federated-authority-connector/README.MD b/federated-authority-connector/README.MD deleted file mode 100644 index 786785c..0000000 --- a/federated-authority-connector/README.MD +++ /dev/null @@ -1,9 +0,0 @@ -# Federated catalog connector - -Supported configuration: - -| property | description | required | default | -|--------------------------------------------|------------------------------------------------------------------------------------------------------------------|----------|-----------------------------------------| -| edc.catalog.cache.execution.delay.seconds | The initial delay for the cache crawler engine. | no | N/A (no initial execution will be done) | -| edc.catalog.cache.execution.period.seconds | The time to elapse between two crawl runs. | no | 60 | -| edc.catalog.cache.partition.num.crawlers | The number of crawlers (execution threads) that should be used. The engine will re-use crawlers when necessary. | no | 2 | diff --git a/federated-authority-connector/build.gradle.kts b/federated-authority-connector/build.gradle.kts deleted file mode 100644 index 52dcb7b..0000000 --- a/federated-authority-connector/build.gradle.kts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2022 Microsoft Corporation - * - * 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: - * Microsoft Corporation - initial API and implementation - * - */ - -plugins { - `java-library` - id("application") - alias(libs.plugins.shadow) -} - -dependencies { - runtimeOnly(libs.edc.catalog.core) - runtimeOnly(libs.edc.catalog.api) - implementation(libs.edc.catalog.spi) - - // Filesystem config - implementation(libs.edc.configuration.filesystem) - implementation(libs.edc.vault.filesystem) - - implementation(libs.edc.util) - runtimeOnly(libs.edc.spi.jsonld) - - runtimeOnly(libs.bundles.edc.connector) - runtimeOnly(libs.edc.control.plane.core) - runtimeOnly(libs.edc.data.plane.selector.core) - - // IDS stuff - runtimeOnly(libs.edc.dsp) - - // Identity Hub - runtimeOnly(libs.bundles.identity) - runtimeOnly(libs.ih.core.verifier) - runtimeOnly(libs.ih.ext.api) - runtimeOnly(libs.ih.ext.credentials.jwt) - runtimeOnly(libs.ih.ext.verifier.jwt) - - // Registration service - runtimeOnly(libs.rs.core) - runtimeOnly(libs.rs.core.credential.service) - runtimeOnly(libs.rs.ext.api) -} - -application { - mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime") -} - -var distTar = tasks.getByName("distTar") -var distZip = tasks.getByName("distZip") - -tasks.withType { - mergeServiceFiles() - archiveFileName.set("federated-authority-connector.jar") - dependsOn(distTar, distZip) -} \ No newline at end of file diff --git a/federated-authority-connector/src/main/java/org/eclipse/edc/catalog/node/directory/filesystem/CatalogExtension.java b/federated-authority-connector/src/main/java/org/eclipse/edc/catalog/node/directory/filesystem/CatalogExtension.java deleted file mode 100644 index 76bdc3c..0000000 --- a/federated-authority-connector/src/main/java/org/eclipse/edc/catalog/node/directory/filesystem/CatalogExtension.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2022 Microsoft Corporation - * - * 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: - * Microsoft Corporation - initial API and implementation - * - */ - -package org.eclipse.edc.catalog.node.directory.filesystem; - -import org.eclipse.edc.catalog.spi.FederatedCacheNodeDirectory; -import org.eclipse.edc.runtime.metamodel.annotation.Inject; -import org.eclipse.edc.runtime.metamodel.annotation.Provider; -import org.eclipse.edc.spi.EdcException; -import org.eclipse.edc.spi.system.ServiceExtension; -import org.eclipse.edc.spi.system.ServiceExtensionContext; -import org.eclipse.edc.spi.types.TypeManager; -import org.eclipse.edc.util.concurrency.LockManager; - -import java.io.File; -import java.util.concurrent.locks.ReentrantReadWriteLock; - -import static java.lang.String.format; -import static java.util.Optional.ofNullable; - -public class CatalogExtension implements ServiceExtension { - - private static final String FILE_LOCATION_SETTING = "fcc.directory.file"; - - @Inject - private TypeManager typeManager; - - @Provider - public FederatedCacheNodeDirectory createFileSystemDirectory(ServiceExtensionContext context) { - var setting = ofNullable(context.getSetting(FILE_LOCATION_SETTING, null)) - .orElseThrow(() -> new EdcException(format("Config property [%s] not found, will ABORT!", FILE_LOCATION_SETTING))); - - File nodeFile = new File(setting); - return new FileBasedNodeDirectory(nodeFile, new LockManager(new ReentrantReadWriteLock()), typeManager.getMapper()); - } - -} diff --git a/federated-authority-connector/src/main/java/org/eclipse/edc/catalog/node/directory/filesystem/FileBasedNodeDirectory.java b/federated-authority-connector/src/main/java/org/eclipse/edc/catalog/node/directory/filesystem/FileBasedNodeDirectory.java deleted file mode 100644 index 2a37886..0000000 --- a/federated-authority-connector/src/main/java/org/eclipse/edc/catalog/node/directory/filesystem/FileBasedNodeDirectory.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2022 Microsoft Corporation - * - * 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: - * Microsoft Corporation - initial API and implementation - * - */ - -package org.eclipse.edc.catalog.node.directory.filesystem; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.eclipse.edc.catalog.spi.FederatedCacheNode; -import org.eclipse.edc.catalog.spi.FederatedCacheNodeDirectory; -import org.eclipse.edc.spi.EdcException; -import org.eclipse.edc.util.concurrency.LockManager; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.List; - -/** - * File-based node directory, solely intended for use in testing, specifically with docker-compose - */ -public class FileBasedNodeDirectory implements FederatedCacheNodeDirectory { - - private static final TypeReference> NODE_LIST_TYPE = new TypeReference<>() { - }; - private final List nodes = new ArrayList<>(); - private final LockManager lockManager; - private final ObjectMapper objectMapper; - - public FileBasedNodeDirectory(File nodeFile, LockManager lockManager, ObjectMapper objectMapper) { - this.lockManager = lockManager; - this.objectMapper = objectMapper; - readAll(nodeFile); - } - - @Override - public List getAll() { - return lockManager.readLock(() -> nodes); - } - - @Override - public void insert(FederatedCacheNode node) { - lockManager.writeLock(() -> nodes.add(node)); - } - - private void readAll(File nodeFile) { - try { - var content = Files.readString(nodeFile.toPath()); - nodes.addAll(objectMapper.readValue(content, NODE_LIST_TYPE)); - } catch (IOException e) { - throw new EdcException(e); - } - } -} diff --git a/federated-authority-connector/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension b/federated-authority-connector/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension deleted file mode 100644 index 27e69f2..0000000 --- a/federated-authority-connector/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.edc.catalog.node.directory.filesystem.CatalogExtension \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4bfecf8..75cf01d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -23,9 +23,6 @@ edc-api-observability = { module = "org.eclipse.edc:api-observability", version. edc-auth-tokenbased = { module = "org.eclipse.edc:auth-tokenbased", version.ref = "edc" } edc-boot = { module = "org.eclipse.edc:boot", version.ref = "edc" } edc-build-plugin = { module = "org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin", version.ref = "edc" } -edc-catalog-core = { module = "org.eclipse.edc:federated-catalog-core", version.ref = "edc" } -edc-catalog-api = { module = "org.eclipse.edc:federated-catalog-api", version.ref = "edc" } -edc-catalog-spi = { module = "org.eclipse.edc:federated-catalog-spi", version.ref = "edc" } edc-configuration-filesystem = { module = "org.eclipse.edc:configuration-filesystem", version.ref = "edc" } edc-connector-core = { module = "org.eclipse.edc:connector-core", version.ref = "edc" } edc-control-plane-core = { module = "org.eclipse.edc:control-plane-core", version.ref = "edc" } @@ -44,9 +41,6 @@ edc-data-plane-selector-core = { module = "org.eclipse.edc:data-plane-selector-c edc-data-plane-spi = { module = "org.eclipse.edc:data-plane-spi", version.ref = "edc" } edc-data-plane-util = { module = "org.eclipse.edc:data-plane-util", version.ref = "edc" } edc-dsp = { module = "org.eclipse.edc:dsp", version.ref = "edc" } -edc-ext-identity-did-core = { module = "org.eclipse.edc:identity-did-core", version.ref = "edc" } -edc-ext-identity-did-service = { module = "org.eclipse.edc:identity-did-service", version.ref = "edc" } -edc-ext-identity-did-web = { module = "org.eclipse.edc:identity-did-web", version.ref = "edc" } edc-http = { module = "org.eclipse.edc:http", version.ref = "edc" } edc-iam-mock = { module = "org.eclipse.edc:iam-mock", version.ref = "edc" } edc-jersey-core = { module = "org.eclipse.edc:jersey-core", version.ref = "edc" } @@ -69,10 +63,6 @@ edc-transfer-spi = { module = "org.eclipse.edc:transfer-spi", version.ref = "edc edc-util = { module = "org.eclipse.edc:util", version.ref = "edc" } edc-vault-azure = { module = "org.eclipse.edc:vault-azure", version.ref = "edc" } edc-vault-filesystem = { module = "org.eclipse.edc:vault-filesystem", version.ref = "edc" } -ih-core-verifier = { module = "org.eclipse.edc:identity-hub-credentials-verifier", version.ref = "edc-ih-fix" } -ih-ext-api = { module = "org.eclipse.edc:identity-hub-api", version.ref = "edc-ih-fix" } -ih-ext-credentials-jwt = { module = "org.eclipse.edc:identity-hub-credentials-jwt", version.ref = "edc-ih-fix" } -ih-ext-verifier-jwt = { module = "org.eclipse.edc:identity-hub-verifier-jwt", version.ref = "edc-ih-fix" } jakarta-rsApi = { module = "jakarta.ws.rs:jakarta.ws.rs-api", version.ref = "rsApi" } jakartaJson = { module = "org.glassfish:jakarta.json", version.ref = "jakarta-json" } junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "jupiter" } @@ -82,13 +72,9 @@ junit-pioneer = { module = "org.junit-pioneer:junit-pioneer", version.ref = "jun okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp-mockwebserver" } opentelemetry-annotations = { module = "io.opentelemetry:opentelemetry-extension-annotations", version.ref = "openTelemetry" } restAssured = { module = "io.rest-assured:rest-assured", version.ref = "restAssured" } -rs-core = { module = "org.eclipse.edc:registration-service", version.ref = "edc" } -rs-core-credential-service = { module = "org.eclipse.edc:registration-service-credential-service", version.ref = "edc" } -rs-ext-api = { module = "org.eclipse.edc:registration-service-api", version.ref = "edc" } [bundles] edc-connector = ["edc-boot", "edc-connector-core", "edc-jersey-core", "edc-api-observability"] -identity = ["edc-ext-identity-did-core", "edc-ext-identity-did-service", "edc-ext-identity-did-web"] [plugins] shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" } diff --git a/http-plane-headers-extension/Dockerfile b/http-plane-headers-extension/Dockerfile new file mode 100644 index 0000000..a0d8233 --- /dev/null +++ b/http-plane-headers-extension/Dockerfile @@ -0,0 +1,14 @@ +# Build the jar file +FROM openjdk:18-ea-bullseye AS build + +WORKDIR /app +COPY ./ . +RUN ./gradlew clean build + +# Run the jar file +FROM openjdk:18-ea-bullseye +WORKDIR /app +COPY --from=build /app/http-plane-headers-extension/build/libs/**SNAPSHOT-all.jar ./http-plane-headers-extension.jar + +# Specify the command to run your application +CMD java -Dedc.keystore="$EDC_KEYSTORE" -Dedc.keystore.password="$EDC_KEYSTORE_PASSWORD" -Dedc.vault="$EDC_VAULT" -Dedc.fs.config="$EDC_FS_CONFIG" -jar /app/http-plane-headers-extension.jar diff --git a/http-plane-headers-extension/build.gradle.kts b/http-plane-headers-extension/build.gradle.kts new file mode 100644 index 0000000..be8920e --- /dev/null +++ b/http-plane-headers-extension/build.gradle.kts @@ -0,0 +1,136 @@ +plugins { + `java-library` + id("application") + `maven-publish` + signing + alias(libs.plugins.shadow) +} + +group = "org.eclipse.edc" +version = "1.0.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +dependencies { + + implementation(libs.edc.data.plane.util) + implementation(libs.edc.util) + implementation(libs.edc.jersey.core) + + implementation(libs.edc.control.plane.core) + implementation(libs.edc.dsp) + implementation(libs.edc.configuration.filesystem) + implementation(libs.edc.vault.filesystem) + implementation(libs.edc.iam.mock) + implementation(libs.edc.management.api) + implementation(libs.edc.transfer.data.plane) + implementation(libs.edc.transfer.pull.http.dynamic.receiver) + + implementation(libs.edc.control.plane.api.client) + implementation(libs.edc.data.plane.http.spi) + + implementation(libs.edc.data.plane.selector.api) + implementation(libs.edc.data.plane.selector.core) + implementation(libs.edc.data.plane.selector.client) + + implementation(libs.edc.data.plane.core) + +} + +application { + mainClass.set("$group.boot.system.runtime.BaseRuntime") +} + +var distTar = tasks.getByName("distTar") +var distZip = tasks.getByName("distZip") + +tasks.register("javadocJar") { + archiveClassifier = "javadoc" + from(tasks.named("javadoc")) +} + +tasks.register("sourcesJar") { + archiveClassifier = "sources" + from(sourceSets.getByName("main").allJava) +} + +publishing { + publications { + val publication = create("shadowJar") { + groupId = "be.vlaanderen.informatievlaanderen" + artifactId = "http-plane-headers-extension" + + artifact(tasks["javadocJar"]) + artifact(tasks["sourcesJar"]) + + pom { + developers { + developer { + name = "Ferre" + email = "Ferre@users.noreply.github.com" + organization = "Cegeka" + organizationUrl = "https://www.cegeka.com/" + } + developer { + name = "Jonas" + email = "Jonas@users.noreply.github.com" + organization = "Cegeka" + organizationUrl = "https://www.cegeka.com/" + } + developer { + name = "Pieter-Jan" + email = "Pieter-Jan@users.noreply.github.com" + organization = "Cegeka" + organizationUrl = "https://www.cegeka.com/" + } + developer { + name = "Yalz" + email = "Yalz@users.noreply.github.com" + organization = "Cegeka" + organizationUrl = "https://www.cegeka.com/" + } + } + licenses { + license { + name = "EUPL" + url = "https://eupl.eu/1.2/en" + } + } + scm { + connection = "scm:git:git@github.com:Informatievlaanderen/VSDS-Dataspace-Connector.git" + developerConnection = "scm:git:git@github.com:Informatievlaanderen/VSDS-Dataspace-Connector.git" + url = "git@github.com:Informatievlaanderen/VSDS-Dataspace-Connector.git" + tag = "HEAD" + } + } + } + project.shadow.component(publication) + } + signing { + val signingKey = if(System.getenv("OSSRH_PGP_PRIVATE_KEY") != null) System.getenv("OSSRH_PGP_PRIVATE_KEY").trimIndent() else "" + val signingPassword = System.getenv("OSSRH_PGP_SECRET_KEY_PASSPHRASE") + useInMemoryPgpKeys(signingKey, signingPassword) + sign(publishing.publications["shadowJar"]) + } + repositories { + maven { + val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") + val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots") + name = "ossrh" + url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl + credentials { + username = System.getenv("OSSRH_USERNAME") + password = System.getenv("OSSRH_PASSWORD") + } + } + } +} + +project.tasks.findByName("jar")?.enabled = false + +tasks.named("shadowJar") { + mergeServiceFiles() + dependsOn(distTar, distZip) +} diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/DataPlanePublicApiExtension.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/DataPlanePublicApiExtension.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/DataPlanePublicApiExtension.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/DataPlanePublicApiExtension.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApi.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApi.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApi.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApi.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApiImpl.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApiImpl.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApiImpl.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ContainerRequestContextApiImpl.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/DataFlowRequestSupplier.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/DataFlowRequestSupplier.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/DataFlowRequestSupplier.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/DataFlowRequestSupplier.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ExtendedDataPlanePublicApiController.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ExtendedDataPlanePublicApiController.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ExtendedDataPlanePublicApiController.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/controller/ExtendedDataPlanePublicApiController.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSink.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSink.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSink.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSink.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSinkFactory.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSinkFactory.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSinkFactory.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/ApiDataSinkFactory.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/HttpPart.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/HttpPart.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/HttpPart.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/pipeline/HttpPart.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/validation/ConsumerPullTransferDataAddressResolver.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/validation/ConsumerPullTransferDataAddressResolver.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/api/validation/ConsumerPullTransferDataAddressResolver.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/api/validation/ConsumerPullTransferDataAddressResolver.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/DataPlaneHttpExtension.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/DataPlaneHttpExtension.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/DataPlaneHttpExtension.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/DataPlaneHttpExtension.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/HttpRequestFactory.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/HttpRequestFactory.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/HttpRequestFactory.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/HttpRequestFactory.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/HttpRequestParamsProviderImpl.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/HttpRequestParamsProviderImpl.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/HttpRequestParamsProviderImpl.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/HttpRequestParamsProviderImpl.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseCommonHttpParamsDecorator.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseCommonHttpParamsDecorator.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseCommonHttpParamsDecorator.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseCommonHttpParamsDecorator.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseSinkHttpParamsDecorator.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseSinkHttpParamsDecorator.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseSinkHttpParamsDecorator.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseSinkHttpParamsDecorator.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseSourceHttpParamsDecorator.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseSourceHttpParamsDecorator.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseSourceHttpParamsDecorator.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/params/decorators/BaseSourceHttpParamsDecorator.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/AbstractTransferRequestBody.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/AbstractTransferRequestBody.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/AbstractTransferRequestBody.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/AbstractTransferRequestBody.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/ChunkedTransferRequestBody.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/ChunkedTransferRequestBody.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/ChunkedTransferRequestBody.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/ChunkedTransferRequestBody.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/NonChunkedTransferRequestBody.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/NonChunkedTransferRequestBody.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/NonChunkedTransferRequestBody.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/NonChunkedTransferRequestBody.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/StringRequestBodySupplier.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/StringRequestBodySupplier.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/StringRequestBodySupplier.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/StringRequestBodySupplier.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSink.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSink.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSink.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSink.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSinkFactory.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSinkFactory.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSinkFactory.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasink/HttpDataSinkFactory.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSource.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSource.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSource.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSource.java diff --git a/http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSourceFactory.java b/http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSourceFactory.java similarity index 100% rename from http-pull-connector/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSourceFactory.java rename to http-plane-headers-extension/src/main/java/org/eclipse/edc/connector/dataplane/http/pipeline/datasource/HttpDataSourceFactory.java diff --git a/http-pull-connector/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension b/http-plane-headers-extension/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension similarity index 100% rename from http-pull-connector/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension rename to http-plane-headers-extension/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension diff --git a/http-pull-connector/Dockerfile b/http-pull-connector/Dockerfile deleted file mode 100644 index b895c50..0000000 --- a/http-pull-connector/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# Build the jar file -FROM openjdk:18-ea-bullseye AS build - -WORKDIR /app -COPY ./ . -RUN ./gradlew clean build - -# Run the jar file -FROM openjdk:18-ea-bullseye -WORKDIR /app -COPY --from=build /app/http-pull-connector/build/libs/pull-connector.jar . - -# Specify the command to run your application -CMD java -Dedc.keystore=$EDC_KEYSTORE -Dedc.keystore.password=$EDC_KEYSTORE_PASSWORD -Dedc.vault=$EDC_VAULT -Dedc.fs.config=$EDC_FS_CONFIG -jar /app/pull-connector.jar diff --git a/http-pull-connector/build.gradle.kts b/http-pull-connector/build.gradle.kts deleted file mode 100644 index d82683c..0000000 --- a/http-pull-connector/build.gradle.kts +++ /dev/null @@ -1,65 +0,0 @@ -plugins { - `java-library` - id("application") - alias(libs.plugins.shadow) -} - -group = "org.eclipse.edc" - -repositories { - mavenCentral() -} - -dependencies { - - implementation(libs.edc.data.plane.util) - implementation(libs.edc.util) - implementation(libs.edc.jersey.core) - - implementation(libs.edc.control.plane.core) - implementation(libs.edc.dsp) - - // Filesystem config - implementation(libs.edc.configuration.filesystem) - implementation(libs.edc.vault.filesystem) - - // DID Web - runtimeOnly(libs.bundles.identity) - - // Identity Hub - runtimeOnly(libs.ih.core.verifier) - runtimeOnly(libs.ih.ext.api) - runtimeOnly(libs.ih.ext.credentials.jwt) - runtimeOnly(libs.ih.ext.verifier.jwt) - - - implementation(libs.edc.management.api) - implementation(libs.edc.transfer.data.plane) - implementation(libs.edc.transfer.pull.http.dynamic.receiver) - - implementation(libs.edc.control.plane.api.client) - implementation(libs.edc.data.plane.http.spi) - - implementation(libs.edc.data.plane.selector.api) - implementation(libs.edc.data.plane.selector.core) - implementation(libs.edc.data.plane.selector.client) - - implementation(libs.edc.data.plane.core) -// must not be added so our implementation is used by the dataplane -// implementation(libs.edc.data.plane.api) -// implementation(libs.edc.data.plane.http) - -} - -application { - mainClass.set("$group.boot.system.runtime.BaseRuntime") -} - -var distTar = tasks.getByName("distTar") -var distZip = tasks.getByName("distZip") - -tasks.withType { - mergeServiceFiles() - archiveFileName.set("pull-connector.jar") - dependsOn(distTar, distZip) -} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 032ebb6..7aa9ea4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,5 +14,4 @@ dependencyResolutionManagement { } } -include("http-pull-connector") -include("federated-authority-connector") +include("http-plane-headers-extension")