Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.2.4 #23

Merged
merged 19 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
- NA

## [1.2.4] - 2023-04-20

### Added
- Support Digital Twin registry in Autosetup

### Changed
- Arc 42 update for E2E Data exchange test service integration


## [1.2.3] - 2023-04-07

### Fixed
Expand Down
44 changes: 22 additions & 22 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,34 @@ maven/mavencentral/com.nimbusds/lang-tag/1.7, Apache-2.0, approved, clearlydefin
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.24.4, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.nimbusds/oauth2-oidc-sdk/9.43.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.sun.activation/jakarta.activation/2.0.1, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf
maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.1, BSD-3-Clause, approved, ee4j.jaxb-impl
maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.1, BSD-3-Clause, approved, #2590
maven/mavencentral/com.sun.mail/javax.mail/1.6.2, CDDL-1.0 AND Apache-2.0, approved, CQ18739
maven/mavencentral/com.vaadin.external.google/android-json/0.0.20131108.vaadin1, Apache-2.0, approved, CQ21310
maven/mavencentral/com.zaxxer/HikariCP/5.0.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/commons-codec/commons-codec/1.15, Apache-2.0 AND BSD-3-Clause AND LicenseRef-Public-Domain, approved, CQ22641
maven/mavencentral/commons-io/commons-io/2.7, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.github.classgraph/classgraph/4.8.138, MIT, approved, CQ22530
maven/mavencentral/io.github.classgraph/classgraph/4.8.149, MIT, approved, CQ22530
maven/mavencentral/io.github.openfeign.form/feign-form-spring/3.8.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.github.openfeign.form/feign-form/3.8.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.github.openfeign/feign-core/12.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.github.openfeign/feign-slf4j/12.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.micrometer/micrometer-commons/1.10.3, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #7333
maven/mavencentral/io.micrometer/micrometer-observation/1.10.3, Apache-2.0, approved, #7331
maven/mavencentral/io.swagger.core.v3/swagger-annotations/2.1.12, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger.core.v3/swagger-core/2.1.12, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger.core.v3/swagger-models/2.1.12, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.7, Apache-2.0, approved, #5947
maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.7, Apache-2.0, approved, #5929
maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.7, Apache-2.0, approved, #5919
maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.1, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf
maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.ca
maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.0, Apache-2.0, approved, ee4j.cdi
maven/mavencentral/jakarta.persistence/jakarta.persistence-api/3.1.0, EPL-2.0 OR BSD-3-Clause, approved, ee4j.jpa
maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jta
maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, ee4j.bean-validation
maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/jakarta.persistence/jakarta.persistence-api/3.1.0, EPL-2.0 OR BSD-3-Clause AND (EPL-2.0 OR BSD-3-Clause AND BSD-3-Clause), approved, #7696
maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.1, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7697
maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0, BSD-3-Clause, approved, ee4j.jaxb
maven/mavencentral/javax.activation/activation/1.1, CDDL-1.0, approved, CQ134
maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.12.22, Apache-2.0, approved, #1810
maven/mavencentral/net.bytebuddy/byte-buddy/1.12.22, Apache-2.0 AND BSD-3-Clause, approved, #1811
maven/mavencentral/net.minidev/accessors-smart/2.4.8, Apache-2.0, approved, clearlydefined
maven/mavencentral/net.minidev/json-smart/2.4.8, Apache-2.0, approved, #3288
maven/mavencentral/net.minidev/accessors-smart/2.4.9, Apache-2.0, approved, #7515
maven/mavencentral/net.minidev/json-smart/2.4.9, Apache-2.0, approved, #3288
maven/mavencentral/org.antlr/antlr4-runtime/4.10.1, BSD-3-Clause AND LicenseRef-Public-domain AND MIT AND LicenseRef-Unicode-TOU, approved, #7065
maven/mavencentral/org.apache.commons/commons-lang3/3.12.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.apache.commons/commons-text/1.10.0, Apache-2.0, approved, clearlydefined
Expand All @@ -64,9 +64,9 @@ maven/mavencentral/org.checkerframework/checker-qual/3.5.0, MIT, approved, clear
maven/mavencentral/org.eclipse.persistence/eclipselink/3.0.3, EPL-2.0 OR BSD-3-Clause, approved, ee4j.eclipselink
maven/mavencentral/org.flywaydb/flyway-core/9.5.1, Apache-2.0, approved, #7296
maven/mavencentral/org.freemarker/freemarker/2.3.32, Apache-2.0, approved, #6764
maven/mavencentral/org.glassfish.jaxb/jaxb-core/4.0.1, BSD-3-Clause, approved, ee4j.jaxb-impl
maven/mavencentral/org.glassfish.jaxb/jaxb-runtime/4.0.1, BSD-3-Clause, approved, ee4j.jaxb-impl
maven/mavencentral/org.glassfish.jaxb/txw2/4.0.1, BSD-3-Clause, approved, ee4j.jaxb-impl
maven/mavencentral/org.glassfish.jaxb/jaxb-core/4.0.1, BSD-3-Clause, approved, ee4j.jaxb
maven/mavencentral/org.glassfish.jaxb/jaxb-runtime/4.0.1, BSD-3-Clause, approved, ee4j.jaxb
maven/mavencentral/org.glassfish.jaxb/txw2/4.0.1, BSD-3-Clause, approved, ee4j.jaxb
maven/mavencentral/org.hamcrest/hamcrest/2.2, BSD-3-Clause, approved, clearlydefined
maven/mavencentral/org.hibernate.common/hibernate-commons-annotations/6.0.2.Final, LGPL-2.1-only, approved, #6962
maven/mavencentral/org.hibernate.orm/hibernate-core/6.1.6.Final, LGPL-2.1-or-later AND (Apache-2.0 AND LGPL-2.1-only) AND (CC-PDDC AND LGPL-2.1-only) AND (EPL-2.0 OR BSD-3-Clause), approved, #5939
Expand All @@ -84,15 +84,15 @@ maven/mavencentral/org.mockito/mockito-core/4.8.1, MIT, approved, clearlydefined
maven/mavencentral/org.mockito/mockito-junit-jupiter/4.8.1, MIT, approved, clearlydefined
maven/mavencentral/org.objenesis/objenesis/3.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.opentest4j/opentest4j/1.2.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.ow2.asm/asm/9.1, BSD-3-Clause, approved, CQ23029
maven/mavencentral/org.ow2.asm/asm/9.3, BSD-3-Clause, approved, clearlydefined
maven/mavencentral/org.postgresql/postgresql/42.5.1, BSD-2-Clause, approved, #3416
maven/mavencentral/org.projectlombok/lombok/1.18.24, MIT AND LicenseRef-Public-Domain, approved, CQ23907
maven/mavencentral/org.skyscreamer/jsonassert/1.5.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.slf4j/jul-to-slf4j/2.0.6, MIT, approved, clearlydefined
maven/mavencentral/org.slf4j/jul-to-slf4j/2.0.6, MIT, approved, #7698
maven/mavencentral/org.slf4j/slf4j-api/2.0.6, MIT, approved, #5915
maven/mavencentral/org.springdoc/springdoc-openapi-common/1.6.6, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.springdoc/springdoc-openapi-ui/1.6.6, Apache-2.0, approved, #4347
maven/mavencentral/org.springdoc/springdoc-openapi-webmvc-core/1.6.6, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.springdoc/springdoc-openapi-starter-common/2.0.2, Apache-2.0, approved, #5920
maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-api/2.0.2, Apache-2.0, approved, #5950
maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-ui/2.0.2, Apache-2.0, approved, #5923
maven/mavencentral/org.springframework.boot/spring-boot-autoconfigure/3.0.2, Apache-2.0, approved, #6981
maven/mavencentral/org.springframework.boot/spring-boot-configuration-processor/3.0.2, Apache-2.0, approved, #6973
maven/mavencentral/org.springframework.boot/spring-boot-devtools/3.0.2, Apache-2.0, approved, clearlydefined
Expand Down Expand Up @@ -135,7 +135,7 @@ maven/mavencentral/org.springframework/spring-aspects/6.0.4, Apache-2.0, approve
maven/mavencentral/org.springframework/spring-beans/6.0.4, Apache-2.0, approved, #5937
maven/mavencentral/org.springframework/spring-context-support/6.0.4, Apache-2.0, approved, #6960
maven/mavencentral/org.springframework/spring-context/6.0.4, Apache-2.0, approved, #5936
maven/mavencentral/org.springframework/spring-core/6.0.4, Apache-2.0 AND BSD-3-Clause, approved, #5948
maven/mavencentral/org.springframework/spring-core/6.0.7, Apache-2.0 AND BSD-3-Clause, approved, #5948
maven/mavencentral/org.springframework/spring-expression/6.0.4, Apache-2.0, approved, #3284
maven/mavencentral/org.springframework/spring-jcl/6.0.4, Apache-2.0, approved, #3283
maven/mavencentral/org.springframework/spring-jdbc/6.0.4, Apache-2.0, approved, #5924
Expand All @@ -144,7 +144,7 @@ maven/mavencentral/org.springframework/spring-test/6.0.4, Apache-2.0, approved,
maven/mavencentral/org.springframework/spring-tx/6.0.4, Apache-2.0, approved, #5926
maven/mavencentral/org.springframework/spring-web/6.0.4, Apache-2.0, approved, #5942
maven/mavencentral/org.springframework/spring-webmvc/6.0.4, Apache-2.0, approved, #5944
maven/mavencentral/org.webjars/swagger-ui/4.5.0, Apache-2.0, approved, #2379
maven/mavencentral/org.webjars/swagger-ui/4.15.5, Apache-2.0 AND MIT, approved, #5921
maven/mavencentral/org.webjars/webjars-locator-core/0.52, MIT, approved, clearlydefined
maven/mavencentral/org.xmlunit/xmlunit-core/2.9.1, Apache-2.0, approved, #6272
maven/mavencentral/org.yaml/snakeyaml/2.0, Apache-2.0 AND (Apache-2.0 AND BSD-3-Clause AND EPL-1.0 AND GPL-2.0-or-later AND LGPL-2.1-or-later), restricted, #7275
maven/mavencentral/org.yaml/snakeyaml/2.0, Apache-2.0 AND (Apache-2.0 OR BSD-3-Clause OR EPL-1.0 OR GPL-2.0-or-later OR LGPL-2.1-or-later), approved, #7275
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.2.3
Helm release version: 1.2.3
Application version: 1.2.4
Helm release version: 1.2.4
```


Expand Down
6 changes: 4 additions & 2 deletions charts/orchestrator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ 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.2.3
version: 1.2.4



# 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.2.3"
appVersion: "1.2.4"

dependencies:
- condition: postgresql.enabled
name: postgresql
Expand Down
4 changes: 3 additions & 1 deletion charts/orchestrator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# autosetup

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

![Version: 1.2.4](https://img.shields.io/badge/Version-1.2.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.2.4](https://img.shields.io/badge/AppVersion-1.2.4-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
1 change: 1 addition & 0 deletions docs/ARC42.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Auto-Setup:
5. configure SDEFrontend to be accessed via oidc token vom Portal
6. configure the SDEbackend to provide the correct link in Digital Twin Registry to its EDC instance
7. configure EDC to allow authorized requests to request data registered in Digital Twin Registry
8. test EDC connector as a consumer and provider using E2E-Data-Exchange-test-service


## Quality Goals
Expand Down
12 changes: 3 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>org.eclipse.tractusx</groupId>
<artifactId>auto-setup</artifactId>
<version>1.2.2</version>
<version>1.2.4</version>
<name>auto-setup</name>
<description>auto-setup</description>
<properties>
Expand Down Expand Up @@ -200,14 +200,8 @@
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.6</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@

package org.eclipse.tractusx.autosetup.config;

import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ public enum AppNameConstant {

DFT_BACKEND,

DT_REGISTRY,

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ public class SDEConfigurationProperty {
private String connectorDiscoveryTokenUrl;
private String connectorDiscoveryClientId;
private String connectorDiscoveryClientSecret;

private String dtregistryidpClientId;
private String dtregistrytenantId;
private String dtregistryUrlPrefix;

}
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ public Map<String, String> managePackage(Customer customerDetails, AppActions ac
inputData.put("sde.resourceServerIssuer", sDEConfigurationProperty.getResourceServerIssuer());
inputData.put("sde.keycloak.auth", sDEConfigurationProperty.getKeycloakAuth());
inputData.put("sde.keycloak.realm", sDEConfigurationProperty.getKeycloakRealm());
inputData.put("sde.digital-twins.hostname", sDEConfigurationProperty.getDigitalTwinsHostname());
inputData.put("sde.digital-twins.authentication.url", sDEConfigurationProperty.getDigitalTwinsAuthenticationUrl());
inputData.put("sde.partner.pool.hostname", sDEConfigurationProperty.getPartnerPoolHostname());
inputData.put("sde.portal.backend.hostname", sDEConfigurationProperty.getPortalBackendHostname());
inputData.put("sde.connector.discovery.token-url", sDEConfigurationProperty.getConnectorDiscoveryTokenUrl());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/********************************************************************************
* Copyright (c) 2023 T-Systems International GmbH
* Copyright (c) 2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* 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.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

package org.eclipse.tractusx.autosetup.manager;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import org.eclipse.tractusx.autosetup.constant.AppActions;
import org.eclipse.tractusx.autosetup.constant.SDEConfigurationProperty;
import org.eclipse.tractusx.autosetup.constant.TriggerStatusEnum;
import org.eclipse.tractusx.autosetup.entity.AutoSetupTriggerDetails;
import org.eclipse.tractusx.autosetup.entity.AutoSetupTriggerEntry;
import org.eclipse.tractusx.autosetup.exception.ServiceException;
import org.eclipse.tractusx.autosetup.model.Customer;
import org.eclipse.tractusx.autosetup.model.SelectedTools;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.retry.support.RetrySynchronizationManager;
import org.springframework.stereotype.Service;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import static org.eclipse.tractusx.autosetup.constant.AppNameConstant.DT_REGISTRY;

@Slf4j
@Service
@RequiredArgsConstructor
public class DTRegistryManager {

private final KubeAppsPackageManagement appManagement;
private final AutoSetupTriggerManager autoSetupTriggerManager;

private final SDEConfigurationProperty sDEConfigurationProperty;

@Retryable(value = {
ServiceException.class }, maxAttemptsExpression = "${retry.maxAttempts}", backoff = @Backoff(delayExpression = "${retry.backOffDelay}"))
public Map<String, String> managePackage(Customer customerDetails, AppActions action, SelectedTools tool,
Map<String, String> inputData, AutoSetupTriggerEntry triger) {

Map<String, String> outputData = new HashMap<>();
AutoSetupTriggerDetails autoSetupTriggerDetails = AutoSetupTriggerDetails.builder()
.id(UUID.randomUUID().toString()).step(DT_REGISTRY.name()).build();
try {
String packageName = tool.getLabel();

String dnsName = inputData.get("dnsName");
String dnsNameURLProtocol = inputData.get("dnsNameURLProtocol");

String dtregistryUrl = dnsNameURLProtocol + "://" + dnsName + "/"
+ sDEConfigurationProperty.getDtregistryUrlPrefix();

inputData.put("rgdatabase", "registry");
inputData.put("rgdbpass", "admin@123");
inputData.put("rgusername", "catenax");
inputData.put("idpClientId", sDEConfigurationProperty.getDtregistryidpClientId());
inputData.put("idpIssuerUri", sDEConfigurationProperty.getResourceServerIssuer());
inputData.put("tenantId", "bpn");
inputData.put("dtregistryUrlPrefix", sDEConfigurationProperty.getDtregistryUrlPrefix());

outputData.put("sde.digital-twins.hostname", dtregistryUrl);
outputData.put("sde.digital-twins.authentication.url",
sDEConfigurationProperty.getDigitalTwinsAuthenticationUrl());

if (AppActions.CREATE.equals(action))
appManagement.createPackage(DT_REGISTRY, packageName, inputData);
else
appManagement.updatePackage(DT_REGISTRY, packageName, inputData);

autoSetupTriggerDetails.setStatus(TriggerStatusEnum.SUCCESS.name());

} catch (Exception ex) {

log.error("DTRegistryManager failed retry attempt: : {}",
RetrySynchronizationManager.getContext().getRetryCount() + 1);

autoSetupTriggerDetails.setStatus(TriggerStatusEnum.FAILED.name());
autoSetupTriggerDetails.setRemark(ex.getMessage());
throw new ServiceException("DTRegistryManager Oops! We have an exception - " + ex.getMessage());
} finally {
autoSetupTriggerManager.saveTriggerDetails(autoSetupTriggerDetails, triger);
}

return outputData;
}

}
Loading