Skip to content

Commit

Permalink
Merge pull request #152 from catenax-ng/2405-source
Browse files Browse the repository at this point in the history
feat: Portal autosetup latest workflow
  • Loading branch information
adkumar1 authored Jun 6, 2024
2 parents e1f9dad + 86dcc74 commit 023bb30
Show file tree
Hide file tree
Showing 31 changed files with 977 additions and 465 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Create SemVer or ref tags dependent of trigger event
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ name: "CodeQL"

on:
push:

branches: ["closeRelease"]
paths-ignore:
- "**/*.md"
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [1.5.9] - 2024-06-03
### Added
- Support Portal autosetup latest workflow.
- Support SDE, Digital twin, EDC 7 support 24/05 release.

### Fixed
- Dependabot reported security issues fixed.

## [1.5.8] - 2024-05-16
### Changed
Expand Down Expand Up @@ -307,4 +314,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Integration to Catena-X Portal

### Known knowns
- Cross side scripting (XSS) shall be mitigated (low risk)
- Cross side scripting (XSS) shall be mitigated (low risk)
202 changes: 80 additions & 122 deletions DEPENDENCIES

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ COPY ./src ./src
RUN mvn clean install -Dmaven.test.skip=true

FROM eclipse-temurin:17.0.11_9-jdk

ENV USER=autosetupuser
ENV UID=1000
ENV GID=1000
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ This service will help service provider to set up DFT/SDE with EDC and EDC as se
### Software Version

```shell
Application version: 1.5.8
Helm release version: 1.5.10
Application version: 1.5.9
Helm release version: 1.5.11
```

# Container images
Expand Down
4 changes: 2 additions & 2 deletions charts/orchestrator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ sources:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.5.10
version: 1.5.11

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.5.8"
appVersion: "1.5.9"

dependencies:
- condition: postgresql.enabled
Expand Down
2 changes: 1 addition & 1 deletion charts/orchestrator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# managed-service-orchestrator

![Version: 1.5.10](https://img.shields.io/badge/Version-1.5.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.5.8](https://img.shields.io/badge/AppVersion-1.5.8-informational?style=flat-square)
![Version: 1.5.11](https://img.shields.io/badge/Version-1.5.11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.5.9](https://img.shields.io/badge/AppVersion-1.5.9-informational?style=flat-square)

This service will help service provider to set up DFT/SDE with EDC and EDC as service in service provider environment.

Expand Down
70 changes: 32 additions & 38 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</parent>
<groupId>org.eclipse.tractusx</groupId>
<artifactId>managed-service-orchestrator</artifactId>
<version>1.5.8</version>
<version>1.5.9</version>
<name>managed-service-orchestrator</name>
<description>managed-service-orchestrator</description>
<properties>
Expand All @@ -47,7 +47,7 @@
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>3.0.3</version>
<version>4.0.3</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.persistence</groupId>
Expand Down Expand Up @@ -182,6 +182,10 @@
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
</dependency>
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
Expand All @@ -190,18 +194,15 @@
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio-admin</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
<version>8.5.6</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.3.0</version>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
Expand All @@ -221,17 +222,17 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
<version>1.77</version>
<version>1.78.1</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.77</version>
<version>1.78.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.0</version>
<version>1.26.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand All @@ -241,7 +242,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
Expand All @@ -261,7 +262,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.2</version>
<version>42.7.3</version>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
Expand All @@ -273,16 +274,6 @@
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio</artifactId>
<version>8.5.6</version>
</dependency>
<dependency>
<groupId>io.minio</groupId>
<artifactId>minio-admin</artifactId>
<version>8.5.6</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
Expand Down Expand Up @@ -337,22 +328,25 @@
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.dash</groupId>
<artifactId>license-tool-plugin</artifactId>
<version>1.0.3-SNAPSHOT</version>
<executions>
<execution>
<id>license-check</id>
<goals>
<goal>license-check</goal>
</goals>
</execution>
</executions>
<configuration>
<projectId>automotive.tractusx</projectId>
<summary>DEPENDENCIES</summary>
</configuration>
</plugin>
<groupId>org.eclipse.dash</groupId>
<artifactId>license-tool-plugin</artifactId>
<version>1.1.1-SNAPSHOT</version>
<configuration>
<projectId>automotive.tractusx</projectId>
<!-- name of dependencies file -->
<summary>DEPENDENCIES</summary>
<!-- include test dependencies -->
<includeScope>test</includeScope>
</configuration>
<executions>
<execution>
<id>license-check</id>
<goals>
<goal>license-check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/********************************************************************************
#* Copyright (c) 2022, 2023 T-Systems International GmbH
#* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
#* Copyright (c) 2022,2024 T-Systems International GmbH
#* Copyright (c) 2022,2024 Contributors to the Eclipse Foundation
#*
#* See the NOTICE file(s) distributed with this work for additional
#* information regarding copyright ownership.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/********************************************************************************
* Copyright (c) 2023 T-Systems International GmbH
* Copyright (c) 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2024 T-Systems International GmbH
* Copyright (c) 2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/********************************************************************************
#* Copyright (c) 2022, 2023 T-Systems International GmbH
#* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
#* Copyright (c) 2022,2024 T-Systems International GmbH
#* Copyright (c) 2022,2024 Contributors to the Eclipse Foundation
#*
#* See the NOTICE file(s) distributed with this work for additional
#* information regarding copyright ownership.
Expand Down Expand Up @@ -58,4 +58,8 @@ public class SDEConfigurationProperty {
private String discoveryClientId;
private String discoveryClientSecret;

private String bpdmProviderEdcDataspaceApi;
private String bpdmProviderBpnl;
private String bpdmProviderEdcPublicApi;

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/********************************************************************************
* Copyright (c) 2023 T-Systems International GmbH
* Copyright (c) 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2023,2024 T-Systems International GmbH
* Copyright (c) 2023,2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -23,6 +23,7 @@
import java.util.Map;

import org.apache.commons.lang3.StringUtils;
import org.eclipse.tractusx.autosetup.model.Customer;
import org.eclipse.tractusx.autosetup.utility.PasswordGenerator;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
Expand All @@ -41,8 +42,23 @@ public class ConnectorCommonUtilityManager {

@Value("${edc.ssi.authorityId:}")
private String authorityId;

public Map<String, String> prepareConnectorInput(String packageName, Map<String, String> inputData) {

@Value("${edc.iatp.id}")
private String edcIatpId;

@Value("${edc.iatp.sts.dim.url}")
private String edcIatpStsDimUrl;

@Value("${edc.iatp.sts.oauth.token.url}")
private String edcIatpStsOauthTokenUrl;

@Value("${edc.bdrs.server}")
private String edcBdrsServer;

@Value("${edc.iam.trusted-issuer}")
private String edcIamTrustedIssuer;

public Map<String, String> prepareConnectorInput(Customer customerDetails, String packageName, Map<String, String> inputData) {

String generateRandomPassword = PasswordGenerator.generateRandomPassword(50);
String dnsName = inputData.get("dnsName");
Expand All @@ -55,6 +71,8 @@ public Map<String, String> prepareConnectorInput(String packageName, Map<String,

String localControlplane = dnsNameURLProtocol + "://" + packageName
+ "-edccontrolplane-edc-controlplane:8182/validation/token";

String dataPlanePublicEndpoint = controlplaneurl + "/api/public";

inputData.put("controlPlaneValidationEndpoint", localControlplane);

Expand All @@ -64,7 +82,7 @@ public Map<String, String> prepareConnectorInput(String packageName, Map<String,
inputData.put("edcApiKeyValue", generateRandomPassword);
inputData.put("controlPlaneIdsEndpoint", controlplaneurl + "/api/v1/ids/data");
inputData.put("dataplaneendpoint", controlplaneurl);
inputData.put("dataPlanePublicEndpoint", controlplaneurl + "/public");
inputData.put("dataPlanePublicEndpoint", dataPlanePublicEndpoint);

String dftAddress = dnsNameURLProtocol + "://" + dnsName + "/backend/api";
inputData.put("dftAddress", dftAddress);
Expand All @@ -83,6 +101,20 @@ public Map<String, String> prepareConnectorInput(String packageName, Map<String,

String edcDb = "jdbc:postgresql://" + packageName + "-postgresdb-postgresql:5432/postgres";
inputData.put("edcdatabaseurl", edcDb);

String bpnNumber = inputData.get("bpnNumber");
String lowercaseCompanyFormatedName = customerDetails.getOrganizationName().toLowerCase().replace(" ", "--");
String edcIatpStsOauthTokenUrlformated = edcIatpStsOauthTokenUrl.replace("bpnl", bpnNumber.toLowerCase());
edcIatpStsOauthTokenUrlformated = edcIatpStsOauthTokenUrlformated.replace("companyname",
lowercaseCompanyFormatedName);

inputData.put("iatp.id", edcIatpId + bpnNumber);
inputData.put("iatp.sts.dim.url", edcIatpStsDimUrl);
inputData.put("iatp.sts.oauth.client.id", inputData.get("dimClientId"));
inputData.put("iatp.sts.oauth.token_url", edcIatpStsOauthTokenUrlformated);
inputData.put("bdrs.server", edcBdrsServer);
inputData.put("edc.iam.trusted-issuer", edcIamTrustedIssuer);
inputData.put("dataplane.token.refresh.refresh_endpoint", dataPlanePublicEndpoint + "/token");

return inputData;
}
Expand Down
Loading

0 comments on commit 023bb30

Please sign in to comment.