diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4f51b1f25..b42a6a9d8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,20 +10,21 @@ on: - '[0-9]+.[0-9]+.[0-9]+' release: types: - - released + - published pull_request: paths-ignore: - 'charts/**' + - 'docs/**' + - '**/*.md' branches: - '*' + workflow_dispatch: jobs: secret-presence: runs-on: ubuntu-latest outputs: CXNG_GHCR_PAT: ${{ steps.secret-presence.outputs.CXNG_GHCR_PAT }} - ORG_VERACODE_API_ID: ${{ steps.secret-presence.outputs.ORG_VERACODE_API_ID }} - ORG_VERACODE_API_KEY: ${{ steps.secret-presence.outputs.ORG_VERACODE_API_KEY }} SONAR_TOKEN: ${{ steps.secret-presence.outputs.SONAR_TOKEN }} steps: - @@ -31,22 +32,19 @@ jobs: id: secret-presence run: | [ ! -z "${{ secrets.CXNG_GHCR_PAT }}" ] && echo "::set-output name=CXNG_GHCR_PAT::true" - [ ! -z "${{ secrets.ORG_VERACODE_API_ID }}" ] && echo "::set-output name=ORG_VERACODE_API_ID::true" - [ ! -z "${{ secrets.ORG_VERACODE_API_KEY }}" ] && echo "::set-output name=ORG_VERACODE_API_KEY::true" [ ! -z "${{ secrets.SONAR_TOKEN }}" ] && echo "::set-output name=SONAR_TOKEN::true" exit 0 - verify-formatting: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v3.3.0 with: fetch-depth: 0 - name: Set up JDK 11 - uses: actions/setup-java@v3.5.1 + uses: actions/setup-java@v3.10.0 with: java-version: '11' distribution: 'adopt' @@ -64,23 +62,16 @@ jobs: # Set-Up - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v3.3.0 with: fetch-depth: 0 - name: Set up JDK 11 - uses: actions/setup-java@v3.5.1 + uses: actions/setup-java@v3.10.0 with: java-version: '11' distribution: 'adopt' cache: 'maven' - - - name: Init git submodule - run: git submodule update --init - - - name: Build edc with Gradle to get specific snapshot - run: ./gradlew publishToMavenLocal -Pskip.signing=true -PedcVersion=0.0.1-20220922-SNAPSHOT -xjavadoc - working-directory: edc - name: Cache SonarCloud packages uses: actions/cache@v3 @@ -102,7 +93,6 @@ jobs: -Dsonar.host.url=https://sonarcloud.io \ -Dsonar.coverage.jacoco.xmlReportPaths=${GITHUB_WORKSPACE}/edc-tests/target/site/jacoco-aggregate/jacoco.xml \ -Dsonar.verbose=true - build-extensions: runs-on: ubuntu-latest needs: [ secret-presence, verify-formatting ] @@ -110,22 +100,15 @@ jobs: # Set-Up - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v3.3.0 - name: Set up JDK 11 - uses: actions/setup-java@v3.5.1 + uses: actions/setup-java@v3.10.0 with: java-version: '11' distribution: 'adopt' cache: 'maven' # Build - - - name: Init git submodule - run: git submodule update --init - - - name: Build edc with Gradle to get specific snapshot - run: ./gradlew publishToMavenLocal -Pskip.signing=true -PedcVersion=0.0.1-20220922-SNAPSHOT -xjavadoc - working-directory: edc - name: Build Extensions run: |- @@ -148,7 +131,7 @@ jobs: # Set-Up - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v3.3.0 - name: Login to GitHub Container Registry if: | @@ -160,19 +143,12 @@ jobs: password: ${{ secrets.CXNG_GHCR_PAT }} - name: Set up JDK 11 - uses: actions/setup-java@v3.5.1 + uses: actions/setup-java@v3.10.0 with: java-version: '11' distribution: 'adopt' cache: 'maven' # Build - - - name: Init git submodule - run: git submodule update --init - - - name: Build edc with Gradle to get specific snapshot - run: ./gradlew publishToMavenLocal -Pskip.signing=true -PedcVersion=0.0.1-20220922-SNAPSHOT -xjavadoc - working-directory: edc - name: Build Controlplane run: |- @@ -195,7 +171,7 @@ jobs: type=sha - name: Build Docker Image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: . file: edc-controlplane/${{ matrix.name }}/src/main/docker/Dockerfile @@ -206,23 +182,6 @@ jobs: ${{ (needs.secret-presence.outputs.CXNG_GHCR_PAT && github.event_name != 'pull_request' && 'true') || 'false' }} tags: ${{ steps.edc_controlplane_meta.outputs.tags }} labels: ${{ steps.edc_controlplane_meta.outputs.labels }} - - - name: Veracode Upload And Scan - uses: veracode/veracode-uploadandscan-action@v1.0 - if: | - needs.secret-presence.outputs.ORG_VERACODE_API_ID && needs.secret-presence.outputs.ORG_VERACODE_API_KEY && contains(' - refs/heads/develop - refs/heads/release/ - refs/tags/ - refs/heads/main', github.ref) - continue-on-error: true - with: - appname: product-edc/${{ matrix.name }} - createprofile: true - version: ${{ github.ref }}-${{ github.sha }} - filepath: edc-controlplane/${{ matrix.name }}/target/${{ matrix.name }}.jar - vid: ${{ secrets.ORG_VERACODE_API_ID }} - vkey: ${{ secrets.ORG_VERACODE_API_KEY }} build-dataplane: runs-on: ubuntu-latest @@ -237,7 +196,7 @@ jobs: # Set-Up - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v3.3.0 - name: Login to GitHub Container Registry if: | @@ -249,19 +208,12 @@ jobs: password: ${{ secrets.CXNG_GHCR_PAT }} - name: Set up JDK 11 - uses: actions/setup-java@v3.5.1 + uses: actions/setup-java@v3.10.0 with: java-version: '11' distribution: 'adopt' cache: 'maven' # Build - - - name: Init git submodule - run: git submodule update --init - - - name: Build edc with Gradle to get specific snapshot - run: ./gradlew publishToMavenLocal -Pskip.signing=true -PedcVersion=0.0.1-20220922-SNAPSHOT -xjavadoc - working-directory: edc - name: Build Dataplane run: |- @@ -284,7 +236,7 @@ jobs: type=sha - name: Build Docker Image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: . file: edc-dataplane/${{ matrix.name }}/src/main/docker/Dockerfile @@ -295,20 +247,3 @@ jobs: ${{ (needs.secret-presence.outputs.CXNG_GHCR_PAT && github.event_name != 'pull_request' && 'true') || 'false' }} tags: ${{ steps.edc_dataplane_meta.outputs.tags }} labels: ${{ steps.edc_dataplane_meta.outputs.labels }} - - - name: Veracode Upload And Scan - uses: veracode/veracode-uploadandscan-action@v1.0 - if: | - needs.secret-presence.outputs.ORG_VERACODE_API_ID && needs.secret-presence.outputs.ORG_VERACODE_API_KEY && contains(' - refs/heads/develop - refs/heads/release/ - refs/tags/ - refs/heads/main', github.ref) - continue-on-error: true - with: - appname: product-edc/${{ matrix.name }} - createprofile: true - version: ${{ github.ref }}-${{ github.sha }} - filepath: edc-dataplane/${{ matrix.name }}/target/${{ matrix.name }}.jar - vid: ${{ secrets.ORG_VERACODE_API_ID }} - vkey: ${{ secrets.ORG_VERACODE_API_KEY }} diff --git a/.github/workflows/helm-chart-release.yaml b/.github/workflows/helm-chart-release.yaml deleted file mode 100644 index 0a9d95129..000000000 --- a/.github/workflows/helm-chart-release.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: Release - Helm Charts - -on: - push: - paths: - - 'charts/**' - branches: - - main - workflow_dispatch: - -jobs: - release: - # depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions - # see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token - permissions: - contents: write - runs-on: ubuntu-latest - - steps: - # fetch-depth: 0 is required to determine differences in chart(s) - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - - name: Install Helm - uses: azure/setup-helm@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.4.1 - env: - CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index d10185c72..7003d6fe1 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -5,6 +5,7 @@ on: pull_request: branches: - main + - support/* types: - closed @@ -186,6 +187,7 @@ jobs: cache: 'maven' - name: Merge main back into develop and set new snapshot version + if: github.event.pull_request.base.ref == 'main' run: | # Prepare git env git config user.name "GitHub actions" diff --git a/.github/workflows/veracode.yaml b/.github/workflows/veracode.yaml index f3230f5a2..e42391c92 100644 --- a/.github/workflows/veracode.yaml +++ b/.github/workflows/veracode.yaml @@ -1,2 +1,135 @@ -# file to satisfy check in https://gh-org-checks.core.demo.catena-x.net/ -# veracode runs inside the build.yaml \ No newline at end of file +--- +name: "Veracode" + +on: + schedule: + - cron: '0 2 * * *' + workflow_dispatch: + +jobs: + secret-presence: + runs-on: ubuntu-latest + outputs: + ORG_VERACODE_API_ID: ${{ steps.secret-presence.outputs.ORG_VERACODE_API_ID }} + ORG_VERACODE_API_KEY: ${{ steps.secret-presence.outputs.ORG_VERACODE_API_KEY }} + steps: + - + name: Check whether secrets exist + id: secret-presence + run: | + [ ! -z "${{ secrets.ORG_VERACODE_API_ID }}" ] && echo "::set-output name=ORG_VERACODE_API_ID::true" + [ ! -z "${{ secrets.ORG_VERACODE_API_KEY }}" ] && echo "::set-output name=ORG_VERACODE_API_KEY::true" + exit 0 + verify-formatting: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3.3.0 + with: + fetch-depth: 0 + - + name: Set up JDK 11 + uses: actions/setup-java@v3.10.0 + with: + java-version: '11' + distribution: 'adopt' + cache: 'maven' + - + name: Verify proper formatting + run: ./mvnw -s settings.xml -B spotless:check + + build-controlplane: + runs-on: ubuntu-latest + needs: [ secret-presence, verify-formatting ] + strategy: + fail-fast: false + matrix: + name: + - edc-controlplane-memory + - edc-controlplane-postgresql + - edc-controlplane-postgresql-hashicorp-vault + steps: + # Set-Up + - + name: Checkout + uses: actions/checkout@v3.3.0 + - + name: Set up JDK 11 + uses: actions/setup-java@v3.10.0 + with: + java-version: '11' + distribution: 'adopt' + cache: 'maven' + # Build + - + name: Build Controlplane + run: |- + ./mvnw -s settings.xml -B -pl .,edc-controlplane/${{ matrix.name }} -am package + env: + GITHUB_PACKAGE_USERNAME: ${{ github.actor }} + GITHUB_PACKAGE_PASSWORD: ${{ secrets.CXNG_GHCR_PAT }} + - + name: Tar gzip files for veracode upload + run: |- + tar -czvf edc-controlplane/${{ matrix.name }}/target/${{ matrix.name }}.tar.gz edc-controlplane/${{ matrix.name }}/target/${{ matrix.name }}.jar edc-controlplane/${{ matrix.name }}/target/lib/*.jar + - + name: Veracode Upload And Scan + uses: veracode/veracode-uploadandscan-action@v1.0 + if: | + needs.secret-presence.outputs.ORG_VERACODE_API_ID && needs.secret-presence.outputs.ORG_VERACODE_API_KEY + continue-on-error: true + with: + appname: product-edc/${{ matrix.name }} + createprofile: true + version: ${{ matrix.name }}-${{ github.sha }} + filepath: edc-controlplane/${{ matrix.name }}/target/${{ matrix.name }}.tar.gz + vid: ${{ secrets.ORG_VERACODE_API_ID }} + vkey: ${{ secrets.ORG_VERACODE_API_KEY }} + + build-dataplane: + runs-on: ubuntu-latest + needs: [ secret-presence, verify-formatting ] + strategy: + fail-fast: false + matrix: + name: + - edc-dataplane-azure-vault + - edc-dataplane-hashicorp-vault + steps: + # Set-Up + - + name: Checkout + uses: actions/checkout@v3.3.0 + - + name: Set up JDK 11 + uses: actions/setup-java@v3.10.0 + with: + java-version: '11' + distribution: 'adopt' + cache: 'maven' + # Build + - + name: Build Dataplane + run: |- + ./mvnw -s settings.xml -B -pl .,edc-dataplane/${{ matrix.name }} -am package + env: + GITHUB_PACKAGE_USERNAME: ${{ github.actor }} + GITHUB_PACKAGE_PASSWORD: ${{ secrets.CXNG_GHCR_PAT }} + - + name: Tar gzip files for veracode upload + run: |- + tar -czvf edc-dataplane/${{ matrix.name }}/target/${{ matrix.name }}.tar.gz edc-dataplane/${{ matrix.name }}/target/${{ matrix.name }}.jar edc-dataplane/${{ matrix.name }}/target/lib/*.jar + - + name: Veracode Upload And Scan + uses: veracode/veracode-uploadandscan-action@v1.0 + if: | + needs.secret-presence.outputs.ORG_VERACODE_API_ID && needs.secret-presence.outputs.ORG_VERACODE_API_KEY + continue-on-error: true + with: + appname: product-edc/${{ matrix.name }} + createprofile: true + version: ${{ matrix.name }}-${{ github.sha }} + filepath: edc-dataplane/${{ matrix.name }}/target/${{ matrix.name }}.tar.gz + vid: ${{ secrets.ORG_VERACODE_API_ID }} + vkey: ${{ secrets.ORG_VERACODE_API_KEY }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 83c1881f6..5e9bb9322 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.5] - 2023-02-13 + +### Fixed + +- Use patched EDC version: 0.0.1-20220922.2-SNAPSHOT to fix catalog pagination bug +- Data Encryption extension: fixed usage of a blocking algorithm + ## [0.1.2] - 2022-09-30 ### Added @@ -108,7 +115,9 @@ corresponding [documentation](/docs/migration/Version_0.0.x_0.1.x.md). ## [0.0.1] - 2022-05-13 -[Unreleased]: https://github.com/catenax-ng/product-edc/compare/0.1.2...HEAD +[Unreleased]: https://github.com/catenax-ng/product-edc/compare/0.1.5...HEAD + +[0.1.5]: https://github.com/catenax-ng/product-edc/compare/0.1.2...0.1.5 [0.1.2]: https://github.com/catenax-ng/product-edc/compare/0.1.1...0.1.2 diff --git a/charts/edc-controlplane/Chart.yaml b/charts/edc-controlplane/Chart.yaml index 9cba1c3ae..0f24978a7 100644 --- a/charts/edc-controlplane/Chart.yaml +++ b/charts/edc-controlplane/Chart.yaml @@ -3,8 +3,8 @@ apiVersion: v2 name: edc-controlplane description: >- EDC Control-Plane - The Eclipse DataSpaceConnector administration layer with responsibility of resource management and govern contracts and data transfers -home: https://github.com/eclipse-tractusx/tractusx-edc +home: https://github.com/catenax-ng/product-edc/charts/edc-controlplane type: application -appVersion: "0.1.2" -version: 0.1.2 +appVersion: "0.1.5" +version: 0.1.5 maintainers: [] diff --git a/charts/edc-controlplane/README.md b/charts/edc-controlplane/README.md index 2ea1be08a..5a252fa48 100644 --- a/charts/edc-controlplane/README.md +++ b/charts/edc-controlplane/README.md @@ -1,6 +1,6 @@ # edc-controlplane -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.2](https://img.shields.io/badge/AppVersion-0.1.2-informational?style=flat-square) +![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.5](https://img.shields.io/badge/AppVersion-0.1.5-informational?style=flat-square) EDC Control-Plane - The Eclipse DataSpaceConnector administration layer with responsibility of resource management and govern contracts and data transfers @@ -9,7 +9,7 @@ EDC Control-Plane - The Eclipse DataSpaceConnector administration layer with res ## TL;DR ```shell $ helm repo add catenax-ng-product-edc https://catenax-ng.github.io/product-edc -$ helm install my-release catenax-ng-product-edc/edc-controlplane --version 0.1.2 +$ helm install my-release catenax-ng-product-edc/edc-controlplane --version 0.1.5 ``` ## Values diff --git a/charts/edc-dataplane/Chart.yaml b/charts/edc-dataplane/Chart.yaml index 5ece2eb44..fc069090a 100644 --- a/charts/edc-dataplane/Chart.yaml +++ b/charts/edc-dataplane/Chart.yaml @@ -3,8 +3,8 @@ apiVersion: v2 name: edc-dataplane description: >- EDC Data-Plane - The Eclipse DataSpaceConnector data layer with responsibility of transferring and receiving data streams -home: https://github.com/eclipse-tractusx/tractusx-edc +home: https://github.com/catenax-ng/product-edc/charts/edc-dataplane type: application -appVersion: "0.1.2" -version: 0.1.2 +appVersion: "0.1.5" +version: 0.1.5 maintainers: [] diff --git a/charts/edc-dataplane/README.md b/charts/edc-dataplane/README.md index de73cdb84..c73cca2e1 100644 --- a/charts/edc-dataplane/README.md +++ b/charts/edc-dataplane/README.md @@ -1,6 +1,6 @@ # edc-dataplane -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.2](https://img.shields.io/badge/AppVersion-0.1.2-informational?style=flat-square) +![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.5](https://img.shields.io/badge/AppVersion-0.1.5-informational?style=flat-square) EDC Data-Plane - The Eclipse DataSpaceConnector data layer with responsibility of transferring and receiving data streams @@ -9,7 +9,7 @@ EDC Data-Plane - The Eclipse DataSpaceConnector data layer with responsibility o ## TL;DR ```shell $ helm repo add catenax-ng-product-edc https://catenax-ng.github.io/product-edc -$ helm install my-release catenax-ng-product-edc/edc-dataplane --version 0.1.2 +$ helm install my-release catenax-ng-product-edc/edc-dataplane --version 0.1.5 ``` ## Values diff --git a/docs/release-notes/Version 0.1.5.md b/docs/release-notes/Version 0.1.5.md new file mode 100644 index 000000000..5b7fbff54 --- /dev/null +++ b/docs/release-notes/Version 0.1.5.md @@ -0,0 +1,25 @@ +# Release Notes Version 0.1.5 + +13.02.2023 + +## 0. Summary + +1. [Version updates](#1-version-updates) + - Use patched EDC version: 0.0.1-20220922.2-SNAPSHOT +2. [Extensions](#2-extensions) + - [2.1 Data Encryption Extension](#22-data-encryption-extension) + - Fixed usage of a blocking algorithm + +## 1. Version Updates + +## 1.1 Use patched EDC version: 0.0.1-20220922.2-SNAPSHOT + +The version has been updated to the patched version `0.0.1-20220922.2-SNAPSHOT` that brings in a bugfix regarding the +catalog pagination. [GitHub issue](https://github.com/eclipse-edc/Connector/issues/2008) + +## 2. Extensions + +### 2.2 Data Encryption Extension + +The encryption of the `EndpointDataReference` took up to 3 minutes unter certain circumstances. +This was fixed by using a not blocking algorithm and setting the Java CMD flag `java.security.egd` correctly. diff --git a/edc-controlplane/edc-controlplane-base/pom.xml b/edc-controlplane/edc-controlplane-base/pom.xml index 61b811404..ef4339439 100644 --- a/edc-controlplane/edc-controlplane-base/pom.xml +++ b/edc-controlplane/edc-controlplane-base/pom.xml @@ -18,7 +18,7 @@ edc-controlplane net.catenax.edc - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-controlplane/edc-controlplane-memory/pom.xml b/edc-controlplane/edc-controlplane-memory/pom.xml index 7bfadee32..4ce22c25e 100644 --- a/edc-controlplane/edc-controlplane-memory/pom.xml +++ b/edc-controlplane/edc-controlplane-memory/pom.xml @@ -16,7 +16,7 @@ net.catenax.edc edc-controlplane - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-controlplane/edc-controlplane-memory/src/main/docker/Dockerfile b/edc-controlplane/edc-controlplane-memory/src/main/docker/Dockerfile index aec27cd97..4dbb66c62 100644 --- a/edc-controlplane/edc-controlplane-memory/src/main/docker/Dockerfile +++ b/edc-controlplane/edc-controlplane-memory/src/main/docker/Dockerfile @@ -10,13 +10,13 @@ # Contributors: # Mercedes-Benz Tech Innovation GmbH - Initial Dockerfile # -FROM alpine:3.16.2 as otel +FROM alpine:3.17.1 as otel ENV OTEL_AGENT_LOCATION "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.12.1/opentelemetry-javaagent.jar" RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.16.2 +FROM alpine:3.17.1 ARG JAR ARG LIB @@ -25,7 +25,7 @@ ARG APP_USER=docker ARG APP_UID=10100 RUN apk update && \ - apk add openjdk11-jre-headless=11.0.16.1_p1-r0 --no-cache && \ + apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ rm -rf /var/cache/apk/* RUN addgroup --system "$APP_USER" @@ -53,6 +53,6 @@ CMD ["java", \ "-Dotel.javaagent.configuration-file=/app/opentelemetry.properties", \ "-Dotel.metrics.exporter=prometheus", \ "-Dotel.exporter.prometheus.port=9090", \ - "-Djava.security.edg=file:/dev/.urandom", \ + "-Djava.security.egd=file:/dev/urandom", \ "-jar", \ "edc-controlplane.jar"] diff --git a/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/pom.xml b/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/pom.xml index 402a1bac2..54c525ac7 100644 --- a/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/pom.xml +++ b/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/pom.xml @@ -17,7 +17,7 @@ net.catenax.edc edc-controlplane - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/Dockerfile b/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/Dockerfile index aec27cd97..2be259654 100644 --- a/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/Dockerfile +++ b/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/Dockerfile @@ -10,13 +10,14 @@ # Contributors: # Mercedes-Benz Tech Innovation GmbH - Initial Dockerfile # -FROM alpine:3.16.2 as otel + +FROM alpine:3.17.1 as otel ENV OTEL_AGENT_LOCATION "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.12.1/opentelemetry-javaagent.jar" RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.16.2 +FROM alpine:3.17.1 ARG JAR ARG LIB @@ -25,7 +26,7 @@ ARG APP_USER=docker ARG APP_UID=10100 RUN apk update && \ - apk add openjdk11-jre-headless=11.0.16.1_p1-r0 --no-cache && \ + apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ rm -rf /var/cache/apk/* RUN addgroup --system "$APP_USER" @@ -53,6 +54,6 @@ CMD ["java", \ "-Dotel.javaagent.configuration-file=/app/opentelemetry.properties", \ "-Dotel.metrics.exporter=prometheus", \ "-Dotel.exporter.prometheus.port=9090", \ - "-Djava.security.edg=file:/dev/.urandom", \ + "-Djava.security.egd=file:/dev/urandom", \ "-jar", \ "edc-controlplane.jar"] diff --git a/edc-controlplane/edc-controlplane-postgresql/pom.xml b/edc-controlplane/edc-controlplane-postgresql/pom.xml index 0ef3fa639..b233df971 100644 --- a/edc-controlplane/edc-controlplane-postgresql/pom.xml +++ b/edc-controlplane/edc-controlplane-postgresql/pom.xml @@ -17,7 +17,7 @@ net.catenax.edc edc-controlplane - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-controlplane/edc-controlplane-postgresql/src/main/docker/Dockerfile b/edc-controlplane/edc-controlplane-postgresql/src/main/docker/Dockerfile index aec27cd97..2be259654 100644 --- a/edc-controlplane/edc-controlplane-postgresql/src/main/docker/Dockerfile +++ b/edc-controlplane/edc-controlplane-postgresql/src/main/docker/Dockerfile @@ -10,13 +10,14 @@ # Contributors: # Mercedes-Benz Tech Innovation GmbH - Initial Dockerfile # -FROM alpine:3.16.2 as otel + +FROM alpine:3.17.1 as otel ENV OTEL_AGENT_LOCATION "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.12.1/opentelemetry-javaagent.jar" RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.16.2 +FROM alpine:3.17.1 ARG JAR ARG LIB @@ -25,7 +26,7 @@ ARG APP_USER=docker ARG APP_UID=10100 RUN apk update && \ - apk add openjdk11-jre-headless=11.0.16.1_p1-r0 --no-cache && \ + apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ rm -rf /var/cache/apk/* RUN addgroup --system "$APP_USER" @@ -53,6 +54,6 @@ CMD ["java", \ "-Dotel.javaagent.configuration-file=/app/opentelemetry.properties", \ "-Dotel.metrics.exporter=prometheus", \ "-Dotel.exporter.prometheus.port=9090", \ - "-Djava.security.edg=file:/dev/.urandom", \ + "-Djava.security.egd=file:/dev/urandom", \ "-jar", \ "edc-controlplane.jar"] diff --git a/edc-controlplane/pom.xml b/edc-controlplane/pom.xml index 7833a1b49..4fa878bcf 100644 --- a/edc-controlplane/pom.xml +++ b/edc-controlplane/pom.xml @@ -17,7 +17,7 @@ net.catenax.edc product-edc-parent - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-dataplane/edc-dataplane-azure-vault/pom.xml b/edc-dataplane/edc-dataplane-azure-vault/pom.xml index 82c0895d5..cba84c50d 100644 --- a/edc-dataplane/edc-dataplane-azure-vault/pom.xml +++ b/edc-dataplane/edc-dataplane-azure-vault/pom.xml @@ -17,7 +17,7 @@ net.catenax.edc edc-dataplane - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-dataplane/edc-dataplane-azure-vault/src/main/docker/Dockerfile b/edc-dataplane/edc-dataplane-azure-vault/src/main/docker/Dockerfile index 2aec25e1b..cddbf69eb 100644 --- a/edc-dataplane/edc-dataplane-azure-vault/src/main/docker/Dockerfile +++ b/edc-dataplane/edc-dataplane-azure-vault/src/main/docker/Dockerfile @@ -10,13 +10,13 @@ # Contributors: # Mercedes-Benz Tech Innovation GmbH - Initial Dockerfile # -FROM alpine:3.16.2 as otel +FROM alpine:3.17.1 as otel ENV OTEL_AGENT_LOCATION "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.12.1/opentelemetry-javaagent.jar" RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.16.2 +FROM alpine:3.17.1 ARG JAR ARG LIB @@ -25,7 +25,7 @@ ARG APP_USER=docker ARG APP_UID=10100 RUN apk update && \ - apk add openjdk11-jre-headless=11.0.16.1_p1-r0 --no-cache && \ + apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ rm -rf /var/cache/apk/* RUN addgroup --system "$APP_USER" @@ -53,6 +53,6 @@ CMD ["java", \ "-Dotel.javaagent.configuration-file=/app/opentelemetry.properties", \ "-Dotel.metrics.exporter=prometheus", \ "-Dotel.exporter.prometheus.port=9090", \ - "-Djava.security.edg=file:/dev/.urandom", \ + "-Djava.security.egd=file:/dev/urandom", \ "-jar", \ "edc-dataplane.jar"] diff --git a/edc-dataplane/edc-dataplane-base/pom.xml b/edc-dataplane/edc-dataplane-base/pom.xml index 4d3604e17..811e787eb 100644 --- a/edc-dataplane/edc-dataplane-base/pom.xml +++ b/edc-dataplane/edc-dataplane-base/pom.xml @@ -18,7 +18,7 @@ edc-dataplane net.catenax.edc - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-dataplane/edc-dataplane-hashicorp-vault/pom.xml b/edc-dataplane/edc-dataplane-hashicorp-vault/pom.xml index 25ab47e0d..d80c7e918 100644 --- a/edc-dataplane/edc-dataplane-hashicorp-vault/pom.xml +++ b/edc-dataplane/edc-dataplane-hashicorp-vault/pom.xml @@ -17,7 +17,7 @@ net.catenax.edc edc-dataplane - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/Dockerfile b/edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/Dockerfile index 2aec25e1b..cddbf69eb 100644 --- a/edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/Dockerfile +++ b/edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/Dockerfile @@ -10,13 +10,13 @@ # Contributors: # Mercedes-Benz Tech Innovation GmbH - Initial Dockerfile # -FROM alpine:3.16.2 as otel +FROM alpine:3.17.1 as otel ENV OTEL_AGENT_LOCATION "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.12.1/opentelemetry-javaagent.jar" RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.16.2 +FROM alpine:3.17.1 ARG JAR ARG LIB @@ -25,7 +25,7 @@ ARG APP_USER=docker ARG APP_UID=10100 RUN apk update && \ - apk add openjdk11-jre-headless=11.0.16.1_p1-r0 --no-cache && \ + apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ rm -rf /var/cache/apk/* RUN addgroup --system "$APP_USER" @@ -53,6 +53,6 @@ CMD ["java", \ "-Dotel.javaagent.configuration-file=/app/opentelemetry.properties", \ "-Dotel.metrics.exporter=prometheus", \ "-Dotel.exporter.prometheus.port=9090", \ - "-Djava.security.edg=file:/dev/.urandom", \ + "-Djava.security.egd=file:/dev/urandom", \ "-jar", \ "edc-dataplane.jar"] diff --git a/edc-dataplane/pom.xml b/edc-dataplane/pom.xml index 70d806d1b..cffb671a6 100644 --- a/edc-dataplane/pom.xml +++ b/edc-dataplane/pom.xml @@ -18,7 +18,7 @@ net.catenax.edc product-edc-parent - 0.1.2 + 0.1.5 edc-dataplane diff --git a/edc-extensions/business-partner-validation/pom.xml b/edc-extensions/business-partner-validation/pom.xml index fbfe5ba0e..68fc40c48 100644 --- a/edc-extensions/business-partner-validation/pom.xml +++ b/edc-extensions/business-partner-validation/pom.xml @@ -17,7 +17,7 @@ net.catenax.edc.extensions edc-extensions - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-extensions/business-partner-validation/src/main/java/net/catenax/edc/validation/businesspartner/BusinessPartnerValidationExtension.java b/edc-extensions/business-partner-validation/src/main/java/net/catenax/edc/validation/businesspartner/BusinessPartnerValidationExtension.java index d97953e84..b183a0fcc 100644 --- a/edc-extensions/business-partner-validation/src/main/java/net/catenax/edc/validation/businesspartner/BusinessPartnerValidationExtension.java +++ b/edc-extensions/business-partner-validation/src/main/java/net/catenax/edc/validation/businesspartner/BusinessPartnerValidationExtension.java @@ -22,10 +22,10 @@ import org.eclipse.dataspaceconnector.policy.model.Duty; import org.eclipse.dataspaceconnector.policy.model.Permission; import org.eclipse.dataspaceconnector.policy.model.Prohibition; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Requires; import org.eclipse.dataspaceconnector.spi.monitor.Monitor; import org.eclipse.dataspaceconnector.spi.policy.engine.PolicyEngine; import org.eclipse.dataspaceconnector.spi.policy.engine.RuleBindingRegistry; +import org.eclipse.dataspaceconnector.spi.system.Requires; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; diff --git a/edc-extensions/cx-oauth2/pom.xml b/edc-extensions/cx-oauth2/pom.xml index b82d0b05f..81951dc9f 100644 --- a/edc-extensions/cx-oauth2/pom.xml +++ b/edc-extensions/cx-oauth2/pom.xml @@ -18,7 +18,7 @@ edc-extensions net.catenax.edc.extensions - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/OAuth2Extension.java b/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/OAuth2Extension.java index 9fe15001c..310d82729 100644 --- a/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/OAuth2Extension.java +++ b/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/OAuth2Extension.java @@ -18,16 +18,12 @@ import lombok.Setter; import okhttp3.OkHttpClient; import org.eclipse.dataspaceconnector.iam.oauth2.spi.Oauth2JwtDecoratorRegistry; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Inject; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Provides; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Requires; import org.eclipse.dataspaceconnector.spi.EdcException; +import org.eclipse.dataspaceconnector.spi.EdcSetting; import org.eclipse.dataspaceconnector.spi.iam.IdentityService; import org.eclipse.dataspaceconnector.spi.jwt.TokenGenerationService; import org.eclipse.dataspaceconnector.spi.jwt.TokenValidationService; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; +import org.eclipse.dataspaceconnector.spi.system.*; @Provides(IdentityService.class) @Requires({ diff --git a/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/decorator/JwtDecoratorExtension.java b/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/decorator/JwtDecoratorExtension.java index 7f551fcc4..510875a2c 100644 --- a/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/decorator/JwtDecoratorExtension.java +++ b/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/decorator/JwtDecoratorExtension.java @@ -21,14 +21,10 @@ import lombok.NonNull; import lombok.Setter; import org.eclipse.dataspaceconnector.iam.oauth2.spi.Oauth2JwtDecoratorRegistry; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Inject; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Provides; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Requires; import org.eclipse.dataspaceconnector.spi.EdcException; +import org.eclipse.dataspaceconnector.spi.EdcSetting; import org.eclipse.dataspaceconnector.spi.security.CertificateResolver; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; +import org.eclipse.dataspaceconnector.spi.system.*; @Provides(Oauth2JwtDecoratorRegistry.class) @Requires(CertificateResolver.class) diff --git a/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/generator/JwtTokenGenerationServiceExtension.java b/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/generator/JwtTokenGenerationServiceExtension.java index 0fcdf35f6..2d239045b 100644 --- a/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/generator/JwtTokenGenerationServiceExtension.java +++ b/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/generator/JwtTokenGenerationServiceExtension.java @@ -16,14 +16,10 @@ import java.security.PrivateKey; import lombok.NonNull; import lombok.Setter; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Inject; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Provides; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Requires; +import org.eclipse.dataspaceconnector.spi.EdcSetting; import org.eclipse.dataspaceconnector.spi.jwt.TokenGenerationService; import org.eclipse.dataspaceconnector.spi.security.PrivateKeyResolver; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; +import org.eclipse.dataspaceconnector.spi.system.*; @Provides(TokenGenerationService.class) @Requires(PrivateKeyResolver.class) diff --git a/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/validation/JwtValidationExtension.java b/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/validation/JwtValidationExtension.java index c4e5d9ff4..bb1e7b1af 100644 --- a/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/validation/JwtValidationExtension.java +++ b/edc-extensions/cx-oauth2/src/main/java/net/catenax/edc/oauth2/jwt/validation/JwtValidationExtension.java @@ -28,13 +28,9 @@ import net.catenax.edc.oauth2.jwk.RsaPublicKeyReader; import okhttp3.OkHttpClient; import org.eclipse.dataspaceconnector.iam.oauth2.spi.Oauth2ValidationRulesRegistry; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Inject; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Provides; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Requires; +import org.eclipse.dataspaceconnector.spi.EdcSetting; import org.eclipse.dataspaceconnector.spi.jwt.TokenValidationService; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; -import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; +import org.eclipse.dataspaceconnector.spi.system.*; @Provides(TokenValidationService.class) @Requires({OkHttpClient.class, Clock.class}) diff --git a/edc-extensions/data-encryption/pom.xml b/edc-extensions/data-encryption/pom.xml index 0d1dad90d..65e9d47d6 100644 --- a/edc-extensions/data-encryption/pom.xml +++ b/edc-extensions/data-encryption/pom.xml @@ -18,7 +18,7 @@ edc-extensions net.catenax.edc.extensions - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/DataEncryptionExtension.java b/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/DataEncryptionExtension.java index ac5d2898b..5f9446dfa 100644 --- a/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/DataEncryptionExtension.java +++ b/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/DataEncryptionExtension.java @@ -22,12 +22,12 @@ import net.catenax.edc.data.encryption.key.CryptoKeyFactory; import net.catenax.edc.data.encryption.key.CryptoKeyFactoryImpl; import net.catenax.edc.data.encryption.provider.AesKeyProvider; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Provides; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Requires; import org.eclipse.dataspaceconnector.spi.EdcException; +import org.eclipse.dataspaceconnector.spi.EdcSetting; import org.eclipse.dataspaceconnector.spi.monitor.Monitor; import org.eclipse.dataspaceconnector.spi.security.Vault; +import org.eclipse.dataspaceconnector.spi.system.Provides; +import org.eclipse.dataspaceconnector.spi.system.Requires; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; import org.eclipse.dataspaceconnector.transfer.dataplane.spi.security.DataEncrypter; diff --git a/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/algorithms/aes/AesAlgorithm.java b/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/algorithms/aes/AesAlgorithm.java index 8aaddfb85..6214fe90e 100644 --- a/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/algorithms/aes/AesAlgorithm.java +++ b/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/algorithms/aes/AesAlgorithm.java @@ -16,6 +16,7 @@ import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; @@ -23,6 +24,7 @@ import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.SecretKeySpec; import lombok.NonNull; +import lombok.SneakyThrows; import net.catenax.edc.data.encryption.algorithms.CryptoAlgorithm; import net.catenax.edc.data.encryption.data.CryptoDataFactory; import net.catenax.edc.data.encryption.data.DecryptedData; @@ -30,6 +32,7 @@ import net.catenax.edc.data.encryption.key.AesKey; import net.catenax.edc.data.encryption.util.ArrayUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.jetbrains.annotations.NotNull; public class AesAlgorithm implements CryptoAlgorithm { @@ -37,12 +40,21 @@ public class AesAlgorithm implements CryptoAlgorithm { private static final String AES = "AES"; private static final Object MONITOR = new Object(); + private final SecureRandom secureRandom; + @NonNull private final CryptoDataFactory cryptoDataFactory; private AesInitializationVectorIterator initializationVectorIterator; - public AesAlgorithm(CryptoDataFactory cryptoDataFactory) { + @SneakyThrows + public AesAlgorithm(@NotNull CryptoDataFactory cryptoDataFactory) { this.cryptoDataFactory = cryptoDataFactory; - this.initializationVectorIterator = new AesInitializationVectorIterator(); + + // We use new SecureRandom() and not SecureRandom.getInstanceStrong(), as the second one + // would use a blocking algorithm, which leads to an increased encryption time of up to 3 + // minutes. Since we have already used /dev/urandom, which only provides pseudo-randomness and + // is also non-blocking, switching to a non-blocking algorithm should not matter here either. + this.secureRandom = new SecureRandom(); + this.initializationVectorIterator = new AesInitializationVectorIterator(this.secureRandom); } @Override @@ -53,7 +65,7 @@ public synchronized EncryptedData encrypt(DecryptedData data, AesKey key) final byte[] initializationVector; synchronized (MONITOR) { if (!initializationVectorIterator.hasNext()) { - initializationVectorIterator = new AesInitializationVectorIterator(); + initializationVectorIterator = new AesInitializationVectorIterator(this.secureRandom); } initializationVector = initializationVectorIterator.next(); @@ -86,4 +98,8 @@ public DecryptedData decrypt(EncryptedData data, AesKey key) byte[] decryptedData = cipher.doFinal(encrypted); return cryptoDataFactory.decryptedFromBytes(decryptedData); } + + public String getAlgorithm() { + return this.secureRandom.getAlgorithm(); + } } diff --git a/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/algorithms/aes/AesInitializationVectorIterator.java b/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/algorithms/aes/AesInitializationVectorIterator.java index 03a5cf789..e7121c613 100644 --- a/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/algorithms/aes/AesInitializationVectorIterator.java +++ b/edc-extensions/data-encryption/src/main/java/net/catenax/edc/data/encryption/algorithms/aes/AesInitializationVectorIterator.java @@ -16,19 +16,20 @@ import java.security.SecureRandom; import java.util.Iterator; import java.util.NoSuchElementException; -import lombok.SneakyThrows; import net.catenax.edc.data.encryption.util.ArrayUtil; public class AesInitializationVectorIterator implements Iterator { public static final int RANDOM_SIZE = 12; public static final int COUNTER_SIZE = 4; - public static final int VECTOR_SIZE = RANDOM_SIZE + COUNTER_SIZE; private final ByteCounter counter; - public AesInitializationVectorIterator() { - counter = new ByteCounter(COUNTER_SIZE); + private SecureRandom secureRandom; + + public AesInitializationVectorIterator(SecureRandom secureRandom) { + this.counter = new ByteCounter(COUNTER_SIZE); + this.secureRandom = secureRandom; } public AesInitializationVectorIterator(ByteCounter byteCounter) { @@ -52,11 +53,9 @@ public byte[] next() { return ArrayUtil.concat(random, counter.getBytes()); } - @SneakyThrows public byte[] getNextRandom() { - SecureRandom random = SecureRandom.getInstanceStrong(); byte[] newVector = new byte[RANDOM_SIZE]; - random.nextBytes(newVector); + secureRandom.nextBytes(newVector); return newVector; } } diff --git a/edc-extensions/data-encryption/src/test/java/net/catenax/edc/data/encryption/algorithms/aes/AesInitializationVectorIteratorTest.java b/edc-extensions/data-encryption/src/test/java/net/catenax/edc/data/encryption/algorithms/aes/AesInitializationVectorIteratorTest.java index 5a79a42b5..d7bf3d885 100644 --- a/edc-extensions/data-encryption/src/test/java/net/catenax/edc/data/encryption/algorithms/aes/AesInitializationVectorIteratorTest.java +++ b/edc-extensions/data-encryption/src/test/java/net/catenax/edc/data/encryption/algorithms/aes/AesInitializationVectorIteratorTest.java @@ -13,6 +13,7 @@ */ package net.catenax.edc.data.encryption.algorithms.aes; +import java.security.SecureRandom; import java.util.ArrayList; import java.util.List; import java.util.NoSuchElementException; @@ -28,7 +29,8 @@ class AesInitializationVectorIteratorTest { @SneakyThrows void testDistinctVectors() { final int vectorCount = 100; - AesInitializationVectorIterator iterator = new AesInitializationVectorIterator(); + final SecureRandom secureRandom = new SecureRandom(); + AesInitializationVectorIterator iterator = new AesInitializationVectorIterator(secureRandom); List vectors = new ArrayList<>(); for (var i = 0; i < vectorCount; i++) { diff --git a/edc-extensions/dataplane-selector-configuration/pom.xml b/edc-extensions/dataplane-selector-configuration/pom.xml index 5ce58e204..0987ac2e1 100644 --- a/edc-extensions/dataplane-selector-configuration/pom.xml +++ b/edc-extensions/dataplane-selector-configuration/pom.xml @@ -18,7 +18,7 @@ edc-extensions net.catenax.edc.extensions - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-extensions/dataplane-selector-configuration/src/main/java/net/catenax/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtension.java b/edc-extensions/dataplane-selector-configuration/src/main/java/net/catenax/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtension.java index 976d468d9..68072498e 100644 --- a/edc-extensions/dataplane-selector-configuration/src/main/java/net/catenax/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtension.java +++ b/edc-extensions/dataplane-selector-configuration/src/main/java/net/catenax/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtension.java @@ -24,10 +24,10 @@ import java.util.stream.Collectors; import org.eclipse.dataspaceconnector.dataplane.selector.DataPlaneSelectorService; import org.eclipse.dataspaceconnector.dataplane.selector.instance.DataPlaneInstanceImpl; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Requires; import org.eclipse.dataspaceconnector.spi.EdcException; +import org.eclipse.dataspaceconnector.spi.EdcSetting; import org.eclipse.dataspaceconnector.spi.monitor.Monitor; +import org.eclipse.dataspaceconnector.spi.system.Requires; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; import org.eclipse.dataspaceconnector.spi.system.configuration.Config; diff --git a/edc-extensions/dataplane-selector-configuration/src/test/java/net/catenax/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtensionEdcExtensionTest.java b/edc-extensions/dataplane-selector-configuration/src/test/java/net/catenax/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtensionEdcExtensionTest.java index 6ace3d84c..8d162e0d3 100644 --- a/edc-extensions/dataplane-selector-configuration/src/test/java/net/catenax/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtensionEdcExtensionTest.java +++ b/edc-extensions/dataplane-selector-configuration/src/test/java/net/catenax/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtensionEdcExtensionTest.java @@ -18,7 +18,7 @@ import java.util.Map; import org.eclipse.dataspaceconnector.dataplane.selector.DataPlaneSelectorService; import org.eclipse.dataspaceconnector.junit.extensions.EdcExtension; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Provides; +import org.eclipse.dataspaceconnector.spi.system.Provides; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; import org.eclipse.dataspaceconnector.spi.types.domain.DataAddress; diff --git a/edc-extensions/hashicorp-vault/pom.xml b/edc-extensions/hashicorp-vault/pom.xml index b3806c341..bd81c9df9 100644 --- a/edc-extensions/hashicorp-vault/pom.xml +++ b/edc-extensions/hashicorp-vault/pom.xml @@ -17,7 +17,7 @@ net.catenax.edc.extensions edc-extensions - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/AbstractHashicorpVaultExtension.java b/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/AbstractHashicorpVaultExtension.java index 23486385a..4512e8512 100644 --- a/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/AbstractHashicorpVaultExtension.java +++ b/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/AbstractHashicorpVaultExtension.java @@ -16,7 +16,7 @@ import java.time.Duration; import okhttp3.OkHttpClient; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; +import org.eclipse.dataspaceconnector.spi.EdcSetting; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; /** diff --git a/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/HashicorpVaultHealthExtension.java b/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/HashicorpVaultHealthExtension.java index 62bc5bc00..9e904a2c7 100644 --- a/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/HashicorpVaultHealthExtension.java +++ b/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/HashicorpVaultHealthExtension.java @@ -15,8 +15,8 @@ package net.catenax.edc.hashicorpvault; import okhttp3.OkHttpClient; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Requires; +import org.eclipse.dataspaceconnector.spi.EdcSetting; +import org.eclipse.dataspaceconnector.spi.system.Requires; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; import org.eclipse.dataspaceconnector.spi.system.health.HealthCheckService; diff --git a/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/HashicorpVaultVaultExtension.java b/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/HashicorpVaultVaultExtension.java index c7bfc6674..f6afafb07 100644 --- a/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/HashicorpVaultVaultExtension.java +++ b/edc-extensions/hashicorp-vault/src/main/java/net/catenax/edc/hashicorpvault/HashicorpVaultVaultExtension.java @@ -17,11 +17,11 @@ package net.catenax.edc.hashicorpvault; import okhttp3.OkHttpClient; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.Provides; import org.eclipse.dataspaceconnector.spi.security.CertificateResolver; import org.eclipse.dataspaceconnector.spi.security.PrivateKeyResolver; import org.eclipse.dataspaceconnector.spi.security.Vault; import org.eclipse.dataspaceconnector.spi.security.VaultPrivateKeyResolver; +import org.eclipse.dataspaceconnector.spi.system.Provides; import org.eclipse.dataspaceconnector.spi.system.ServiceExtension; import org.eclipse.dataspaceconnector.spi.system.ServiceExtensionContext; diff --git a/edc-extensions/pom.xml b/edc-extensions/pom.xml index e6e64c87a..75ea5cbec 100644 --- a/edc-extensions/pom.xml +++ b/edc-extensions/pom.xml @@ -17,7 +17,7 @@ net.catenax.edc product-edc-parent - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-extensions/postgresql-migration/pom.xml b/edc-extensions/postgresql-migration/pom.xml index f31e80aad..c12407c61 100644 --- a/edc-extensions/postgresql-migration/pom.xml +++ b/edc-extensions/postgresql-migration/pom.xml @@ -17,7 +17,7 @@ edc-extensions net.catenax.edc.extensions - 0.1.2 + 0.1.5 4.0.0 diff --git a/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/ContractDefinitionPostgresqlMigrationExtension.java b/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/ContractDefinitionPostgresqlMigrationExtension.java index 31285de95..1834cde8f 100644 --- a/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/ContractDefinitionPostgresqlMigrationExtension.java +++ b/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/ContractDefinitionPostgresqlMigrationExtension.java @@ -14,7 +14,7 @@ package net.catenax.edc.postgresql.migration; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; +import org.eclipse.dataspaceconnector.spi.EdcSetting; public class ContractDefinitionPostgresqlMigrationExtension extends AbstractPostgresqlMigrationExtension { diff --git a/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/ContractNegotiationPostgresqlMigrationExtension.java b/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/ContractNegotiationPostgresqlMigrationExtension.java index b198b4834..8c732742f 100644 --- a/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/ContractNegotiationPostgresqlMigrationExtension.java +++ b/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/ContractNegotiationPostgresqlMigrationExtension.java @@ -14,7 +14,7 @@ package net.catenax.edc.postgresql.migration; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; +import org.eclipse.dataspaceconnector.spi.EdcSetting; public class ContractNegotiationPostgresqlMigrationExtension extends AbstractPostgresqlMigrationExtension { diff --git a/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/PolicyPostgresqlMigrationExtension.java b/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/PolicyPostgresqlMigrationExtension.java index 5e6333ad1..9e3b64ff9 100644 --- a/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/PolicyPostgresqlMigrationExtension.java +++ b/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/PolicyPostgresqlMigrationExtension.java @@ -14,7 +14,7 @@ package net.catenax.edc.postgresql.migration; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; +import org.eclipse.dataspaceconnector.spi.EdcSetting; public class PolicyPostgresqlMigrationExtension extends AbstractPostgresqlMigrationExtension { private static final String NAME_SUBSYSTEM = "policy"; diff --git a/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/TransferProcessPostgresqlMigrationExtension.java b/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/TransferProcessPostgresqlMigrationExtension.java index f17373cf5..4ef0d97f4 100644 --- a/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/TransferProcessPostgresqlMigrationExtension.java +++ b/edc-extensions/postgresql-migration/src/main/java/net/catenax/edc/postgresql/migration/TransferProcessPostgresqlMigrationExtension.java @@ -14,7 +14,7 @@ package net.catenax.edc.postgresql.migration; -import org.eclipse.dataspaceconnector.runtime.metamodel.annotation.EdcSetting; +import org.eclipse.dataspaceconnector.spi.EdcSetting; public class TransferProcessPostgresqlMigrationExtension extends AbstractPostgresqlMigrationExtension { diff --git a/edc-tests/pom.xml b/edc-tests/pom.xml index 2c3e66e79..ed4aa6324 100644 --- a/edc-tests/pom.xml +++ b/edc-tests/pom.xml @@ -19,7 +19,7 @@ net.catenax.edc product-edc-parent - 0.1.2 + 0.1.5 net.catenax.edc.tests diff --git a/edc-tests/src/main/resources/deployment/helm/all-in-one/Chart.yaml b/edc-tests/src/main/resources/deployment/helm/all-in-one/Chart.yaml index ab8eee0cd..04b1147b5 100644 --- a/edc-tests/src/main/resources/deployment/helm/all-in-one/Chart.yaml +++ b/edc-tests/src/main/resources/deployment/helm/all-in-one/Chart.yaml @@ -54,7 +54,7 @@ dependencies: alias: platovault condition: platovault.enabled - name: postgresql - version: 11.2.4 + version: 12.1.6 repository: https://charts.bitnami.com/bitnami alias: platopostgresql condition: platopostgresql.enabled @@ -81,7 +81,7 @@ dependencies: alias: sokratesvault condition: sokratesvault.enabled - name: postgresql - version: 11.2.4 + version: 12.1.6 repository: https://charts.bitnami.com/bitnami alias: sokratespostgresql condition: sokratespostgresql.enabled diff --git a/edc-tests/src/test/java/net/catenax/edc/tests/DataManagementAPI.java b/edc-tests/src/test/java/net/catenax/edc/tests/DataManagementAPI.java index 5338a4f5e..7520b5fa7 100644 --- a/edc-tests/src/test/java/net/catenax/edc/tests/DataManagementAPI.java +++ b/edc-tests/src/test/java/net/catenax/edc/tests/DataManagementAPI.java @@ -67,7 +67,7 @@ public List requestCatalogFrom(String receivingConnectorUrl) thro final DataManagementApiContractOfferCatalog catalog = get( CATALOG_PATH, - "providerUrl=" + encodedUrl, + "providerUrl=" + encodedUrl + "&limit=1000", new TypeToken() {}); log.debug("Received " + catalog.contractOffers.size() + " offers"); diff --git a/pom.xml b/pom.xml index 2e858d861..2f1fdcad3 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ net.catenax.edc product-edc-parent - 0.1.2 + 0.1.5 pom product-edc @@ -66,7 +66,7 @@ 0.0.1-SNAPSHOT - 0.0.1-20220922-SNAPSHOT + 0.0.1-20220922.2-SNAPSHOT 1.2.2 42.5.0 9.3.1