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

Java packages refactored to tng.trustnetwork.keydistribution #1

Merged
merged 7 commits into from
Oct 5, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
cf push ${APP_NAME} --docker-image ${APP_IMAGE}:${APP_VERSION} --docker-username ${CF_DOCKER_USERNAME}
env:
APP_NAME: dgca-verifier-service-eu-test
APP_IMAGE: docker.pkg.github.com/${{ github.repository }}/dgca-verifier-service
APP_IMAGE: docker.pkg.github.com/${{ github.repository }}/tng-key-distribution
CF_API: ${{ secrets.CF_API }}
CF_ORG: ${{ secrets.CF_ORG }}
CF_SPACE: ${{ secrets.CF_SPACE }}
Expand Down
2 changes: 1 addition & 1 deletion certs/PlaceYourGatewayAccessKeysHere.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Note:

If you want to run the verifier service via the given docker-compose file, place your keys to access the
If you want to run the key distribution service via the given docker-compose file, place your keys to access the
[DGCG](https://github.com/eu-digital-green-certificates/dgc-gateway) in this folder and adjust the file names
in the [docker-compose.yml](../docker-compose.yml) file.

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3'
services:
postgres:
image: library/postgres:9.6
container_name: dgc-verifier-service-postgres
container_name: tng-key-distribution-postgres
ports:
- 5432:5432
environment:
Expand All @@ -17,7 +17,7 @@ services:
backend:
build: .
image: eu-digital-green-certificates/dgc-verifier-service
container_name: dgc-verifier-service
container_name: tng-key-distribution
ports:
- 8080:8080
volumes:
Expand Down
4 changes: 2 additions & 2 deletions docs/dgca-verifier-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ for the actual trust list.

In the git repository you will find two implementations of that download functionality:

- The first one ([SignerCertificateDownloadServiceImpl](../src/main/java/eu/europa/ec/dgc/verifier/service/SignerCertificateDownloadServiceImpl.java)) implements the common access two the Digital Green Certificate Gateway via the [DGC-lib](https://github.com/eu-digital-green-certificates/dgc-lib).
- The first one ([SignerCertificateDownloadServiceImpl](../src/main/java/tng/trustnetwork/keydistribution/service/SignerCertificateDownloadServiceImpl.java)) implements the common access two the Digital Green Certificate Gateway via the [DGC-lib](https://github.com/eu-digital-green-certificates/dgc-lib).
The DGC-lib provides a download connector, which handles the download and check of the certificates from the Digital Green Certificate Gateway.


- The second one ([SignerCertificateDownloadBtpServiceImpl](../src/main/java/eu/europa/ec/dgc/verifier/service/SignerCertificateDownloadBtpServiceImpl.java)) is a demo implementation to connect to the Digital Green Certificate Gateway on SAP's Business Technology Plattform.
- The second one ([SignerCertificateDownloadBtpServiceImpl](../src/main/java/tng/trustnetwork/keydistribution/service/SignerCertificateDownloadBtpServiceImpl.java)) is a demo implementation to connect to the Digital Green Certificate Gateway on SAP's Business Technology Plattform.
This implementation serves as a reference where you already have an endpoint to the gateway provided by your runtime environment and using the connector from the dgc-lib on top would be superfluous. In this case the endpoint is fully configured via the destination API
available on BTP and the checks of the downloaded certificates must be done by the service.

Expand Down
49 changes: 28 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<modelVersion>4.0.0</modelVersion>

<groupId>eu.europa.ec.dgc</groupId>
<artifactId>dgca-verifier-service</artifactId>
<groupId>tng.trustnetwork.keydistribution</groupId>
<artifactId>tng-key-distribution</artifactId>
<version>latest</version>
<packaging>jar</packaging>

<name>dgca-verifier-service</name>
<description>European Digital Green Certificate Verifier Service project.</description>
<name>tng-key-distribution</name>
<description>GDHCN Key Distribution Service project.</description>
<organization>
<name>T-Systems International GmbH</name>
</organization>
Expand All @@ -36,29 +36,29 @@
<mapstruct.version>1.5.5.Final</mapstruct.version>
<okhttp.version>5.0.0-alpha.11</okhttp.version>
<shedlock.version>5.4.0</shedlock.version>
<dgc.lib.version>2.0.2</dgc.lib.version>
<h2.version>2.2.220</h2.version>
<sap.cloud.sdk.version>4.15.0</sap.cloud.sdk.version>
<sap.cloud.logging.version>3.7.0</sap.cloud.logging.version>
<commons-fileupload.version>1.5</commons-fileupload.version>
<!-- plugins -->
<plugin.checkstyle.version>3.3.0</plugin.checkstyle.version>
<plugin.sonar.version>3.9.1.2184</plugin.sonar.version>
<plugin.jacoco.version>0.8.10</plugin.jacoco.version>
<plugin.os-maven.version>1.7.0</plugin.os-maven.version>
<plugin.surefire.version>3.1.2</plugin.surefire.version>
<!-- license -->
<license.projectName>EU Digital Green Certificate Verifier Service / dgca-verifier-service</license.projectName>
<license.projectName>Key Distribution Service / tng-key-distribution</license.projectName>
<license.inceptionYear>2021</license.inceptionYear>
<license.licenseName>apache_v2</license.licenseName>
<!-- github -->
<github.organization>eu-digital-green-certificates</github.organization>
<github.project>dgca-verifier-service</github.project>
<github.organization>WorldHealthOrganization</github.organization>
<github.project>tng-key-distribution</github.project>
<!-- sonar -->
<sonar.organization>eu-digital-green-certificates</sonar.organization>
<sonar.organization>WorldHealthOrganization</sonar.organization>
<sonar.projectKey>${sonar.organization}_${project.artifactId}</sonar.projectKey>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.coverage.exclusions>
**/DgcVerifierServiceApplication.java,
**/KeyDistributionServiceApplication.java,
**/model/*,
**/mapper/*,
**/entity/*,
Expand All @@ -67,27 +67,27 @@
</sonar.coverage.exclusions>
</properties>

<url>https://github.com/eu-digital-green-certificates/dgca-verifier-service</url>
<url>https://github.com/WorldHealthOrganization/tng-key-distribution</url>
<ciManagement>
<url>https://github.com/eu-digital-green-certificates/dgca-verifier-service/actions</url>
<url>https://github.com/WorldHealthOrganization/tng-key-distribution/actions</url>
</ciManagement>
<issueManagement>
<url>https://github.com/eu-digital-green-certificates/dgca-verifier-service/issues</url>
<url>https://github.com/WorldHealthOrganization/tng-key-distribution/issues</url>
</issueManagement>
<scm>
<url>https://github.com/eu-digital-green-certificates/dgca-verifier-service</url>
<url>https://github.com/WorldHealthOrganization/tng-key-distribution</url>
</scm>

<repositories>
<repository>
<id>dgc-github</id>
<id>who-github</id>
<url>https://maven.pkg.github.com/${github.organization}/*</url>
</repository>
</repositories>

<distributionManagement>
<repository>
<id>dgc-github</id>
<id>who-github</id>
<url>https://maven.pkg.github.com/${github.organization}/${github.project}</url>
</repository>
</distributionManagement>
Expand Down Expand Up @@ -151,7 +151,6 @@
<artifactId>guava</artifactId>
<version>32.0.1-jre</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
Expand Down Expand Up @@ -188,8 +187,8 @@
<dependencies>
<dependency>
<groupId>eu.europa.ec.dgc</groupId>
<artifactId>dgc-lib</artifactId>
<version>${dgc.lib.version}</version>
<artifactId>ddcc-gateway-lib</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -295,6 +294,11 @@
<version>0.14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fileupload.version}</version>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -346,6 +350,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand All @@ -356,7 +363,8 @@
<version>${owasp.version}</version>
<configuration>
<suppressionFile>./owasp/suppressions.xml</suppressionFile>
<failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
<failBuildOnCVSS>8</failBuildOnCVSS>
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
</configuration>
</plugin>
<plugin>
Expand All @@ -381,7 +389,6 @@
<configuration>
<configLocation>./codestyle/checkstyle.xml</configLocation>
<excludes>./target/**/*</excludes>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<violationSeverity>warning</violationSeverity>
Expand Down
2 changes: 1 addition & 1 deletion settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<interactiveMode>false</interactiveMode>
<servers>
<server>
<id>dgc-github</id>
<id>who-github</id>
<username>${app.packages.username}</username>
<password>${app.packages.password}</password>
</server>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-verifier-service
* WorldHealthOrganization / tng-key-distribution
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* ---
Expand All @@ -18,27 +18,27 @@
* ---license-end
*/

package eu.europa.ec.dgc.verifier;
package tng.trustnetwork.keydistribution;

import eu.europa.ec.dgc.verifier.config.DgcConfigProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import tng.trustnetwork.keydistribution.config.KdsConfigProperties;

/**
* The Application class.
*/
@SpringBootApplication
@EnableConfigurationProperties(DgcConfigProperties.class)
public class DgcVerifierServiceApplication extends SpringBootServletInitializer {
@EnableConfigurationProperties(KdsConfigProperties.class)
public class KeyDistributionServiceApplication extends SpringBootServletInitializer {

/**
* The main Method.
*
* @param args the args for the main method
*/
public static void main(String[] args) {
SpringApplication.run(DgcVerifierServiceApplication.class, args);
SpringApplication.run(KeyDistributionServiceApplication.class, args);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-verifier-service
* WorldHealthOrganization / tng-key-distribution
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* ---
Expand All @@ -18,10 +18,8 @@
* ---license-end
*/

package eu.europa.ec.dgc.verifier.config;
package tng.trustnetwork.keydistribution.config;

import eu.europa.ec.dgc.verifier.exception.BadRequestException;
import eu.europa.ec.dgc.verifier.restapi.dto.ProblemReportDto;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
Expand All @@ -32,6 +30,8 @@
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.server.ResponseStatusException;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
import tng.trustnetwork.keydistribution.exception.BadRequestException;
import tng.trustnetwork.keydistribution.restapi.dto.ProblemReportDto;

@ControllerAdvice
@Configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-verifier-service
* WorldHealthOrganization / tng-key-distribution
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* ---
Expand All @@ -18,7 +18,7 @@
* ---license-end
*/

package eu.europa.ec.dgc.verifier.config;
package tng.trustnetwork.keydistribution.config;

import lombok.Getter;
import lombok.Setter;
Expand All @@ -27,7 +27,7 @@
@Getter
@Setter
@ConfigurationProperties("dgc")
public class DgcConfigProperties {
public class KdsConfigProperties {

private final CertificatesDownloader certificatesDownloader = new CertificatesDownloader();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.europa.ec.dgc.verifier.config;
package tng.trustnetwork.keydistribution.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-verifier-service
* WorldHealthOrganization / tng-key-distribution
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* ---
Expand All @@ -18,7 +18,7 @@
* ---license-end
*/

package eu.europa.ec.dgc.verifier.config;
package tng.trustnetwork.keydistribution.config;

import net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-verifier-service
* WorldHealthOrganization / tng-key-distribution
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* ---
Expand All @@ -18,7 +18,7 @@
* ---license-end
*/

package eu.europa.ec.dgc.verifier.config;
package tng.trustnetwork.keydistribution.config;

import static net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider.Configuration.builder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* ---license-end
*/

package eu.europa.ec.dgc.verifier.dto;
package tng.trustnetwork.keydistribution.dto;

import java.time.ZonedDateTime;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-revocation-distribution-service
* WorldHealthOrganization / tng-key-distribution
* ---
* Copyright (C) 2022 T-Systems International GmbH and all other contributors
* ---
Expand All @@ -18,7 +18,7 @@
* ---license-end
*/

package eu.europa.ec.dgc.verifier.entity;
package tng.trustnetwork.keydistribution.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-verifier-service
* WorldHealthOrganization / tng-key-distribution
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* ---
Expand All @@ -18,7 +18,7 @@
* ---license-end
*/

package eu.europa.ec.dgc.verifier.entity;
package tng.trustnetwork.keydistribution.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
Expand Down
Loading