Skip to content

Commit

Permalink
Merge pull request #7 from eu-digital-green-certificates/improvements
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
slaurenz authored Feb 21, 2022
2 parents 894ef64 + 568270a commit 4a52789
Show file tree
Hide file tree
Showing 112 changed files with 1,956 additions and 1,289 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">
EU Digital COVID Certificate Revocation Distribution Service

</h1>
<p align="center">
<a href="/../../commits/" title="Last Commit"><img src="https://img.shields.io/github/last-commit/eu-digital-green-certificates/dgca-revocation-distribution-service?style=flat"></a>
<a href="/../../issues" title="Open Issues"><img src="https://img.shields.io/github/issues/eu-digital-green-certificates/dgca-revocation-distribution-service?style=flat"></a>
Expand Down
10 changes: 0 additions & 10 deletions local_postgres/scripts/create_last_updated_trigger.sql

This file was deleted.

32 changes: 25 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>europa.ec.dgc</groupId>
<groupId>eu.europa.ec.dgc</groupId>
<artifactId>dgca-revocation-distribution-service</artifactId>
<version>latest</version>
<name>dgca-revocation-distribution-service</name>
Expand Down Expand Up @@ -41,12 +41,13 @@
<okhttp.version>4.9.1</okhttp.version>
<shedlock.version>4.30.0</shedlock.version>
<nimbusds.version>9.9.2</nimbusds.version>
<dgc.lib.version>1.1.12</dgc.lib.version>
<dgc.lib.version>1.1.13</dgc.lib.version>
<dgc.bloomfilter.version>0.0.0-09cb38e</dgc.bloomfilter.version>
<sap.cloud.sdk.version>3.57.0</sap.cloud.sdk.version>
<h2.version>2.1.210</h2.version>
<slf4j.version>1.7.32</slf4j.version>
<log4j2.version>2.17.1</log4j2.version>
<jjwt.version>0.9.1</jjwt.version>
<jjwt.version>0.11.2</jjwt.version>
<!-- plugins -->
<plugin.checkstyle.version>3.1.2</plugin.checkstyle.version>
<plugin.sonar.version>3.9.0.2155</plugin.sonar.version>
Expand Down Expand Up @@ -170,6 +171,11 @@
<artifactId>dgc-lib</artifactId>
<version>${dgc.lib.version}</version>
</dependency>
<dependency>
<groupId>eu.europa.ec.dgc</groupId>
<artifactId>bloomfilter</artifactId>
<version>${dgc.bloomfilter.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
Expand Down Expand Up @@ -299,8 +305,20 @@
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
<artifactId>jjwt-api</artifactId>
<version>0.11.2</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId> <!-- or jjwt-gson if Gson is preferred -->
<version>0.11.2</version>
<scope>runtime</scope>
</dependency>
</dependencies>

Expand Down Expand Up @@ -382,7 +400,7 @@
</execution>
</executions>
</plugin>
<!--
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand All @@ -406,7 +424,7 @@
</execution>
</executions>
</plugin>
-->
-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
* ---license-end
*/

package europa.ec.dgc.revocationdistribution;
package eu.europa.ec.dgc.revocationdistribution;

import europa.ec.dgc.revocationdistribution.config.DgcConfigProperties;
import eu.europa.ec.dgc.revocationdistribution.config.DgcConfigProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication
@EnableFeignClients
@EnableConfigurationProperties({DgcConfigProperties.class})
public class DgcaRevocationDistributionServiceApplication {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-validation-service
* eu-digital-green-certificates / dgca-revocation-distribution-service
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* Copyright (C) 2022 T-Systems International GmbH and all other contributors
* ---
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,17 +18,17 @@
* ---license-end
*/

package europa.ec.dgc.revocationdistribution.client;
package eu.europa.ec.dgc.revocationdistribution.client;

import europa.ec.dgc.revocationdistribution.dto.DidDocument;
import eu.europa.ec.dgc.revocationdistribution.dto.DidDocument;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(
name = "business-download-client",
name = "issuance-download-client",
url = "${dgc.issuance.dgci.endpoint}",
configuration = IssuanceDgciRestClientConfig.class
)
Expand All @@ -38,7 +38,7 @@ public interface IssuanceDgciRestClient {
/**
* Gets the the dgci for a given hash value.
*
* @param hash The hash value of the dgci
* @param hash The hash value of the dgci
* @return dgci values as DidDocument.
*/
@GetMapping(value = "/dgci/{hash}", produces = MediaType.APPLICATION_JSON_VALUE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-validation-service
* eu-digital-green-certificates / dgca-revocation-distribution-service
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* Copyright (C) 2022 T-Systems International GmbH and all other contributors
* ---
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,8 +18,7 @@
* ---license-end
*/


package europa.ec.dgc.revocationdistribution.client;
package eu.europa.ec.dgc.revocationdistribution.client;

import feign.Client;
import feign.Logger;
Expand All @@ -32,14 +31,10 @@
import java.security.cert.CertificateException;
import lombok.RequiredArgsConstructor;
import org.apache.http.impl.client.HttpClientBuilder;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Configuration

@RequiredArgsConstructor
@EnableFeignClients
public class IssuanceDgciRestClientConfig {


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-validation-service
* eu-digital-green-certificates / dgca-revocation-distribution-service
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* Copyright (C) 2022 T-Systems International GmbH and all other contributors
* ---
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,11 +18,10 @@
* ---license-end
*/

package europa.ec.dgc.revocationdistribution.config;
package eu.europa.ec.dgc.revocationdistribution.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Getter
Expand All @@ -32,7 +31,7 @@ public class DgcConfigProperties {

private final GatewayDownload revocationListDownload = new GatewayDownload();
private final BloomFilterConfig bloomFilter = new BloomFilterConfig();

private final HashListConfig hashList = new HashListConfig();


@Getter
Expand All @@ -46,8 +45,16 @@ public static class GatewayDownload {
@Setter
public static class BloomFilterConfig {
private boolean enabled;
private String type;
private String type = "bloom_filter";
private String version;
private float probRate;
}

@Getter
@Setter
public static class HashListConfig {
private boolean enabled;
private String type = "hash_list";
private String version;
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*-
* ---license-start
* EU Digital Green Certificate Gateway Service / dgc-gateway
* eu-digital-green-certificates / dgca-revocation-distribution-service
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* Copyright (C) 2022 T-Systems International GmbH and all other contributors
* ---
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,11 +18,11 @@
* ---license-end
*/

package europa.ec.dgc.revocationdistribution.config;
package eu.europa.ec.dgc.revocationdistribution.config;

import europa.ec.dgc.revocationdistribution.exception.DataNotFoundException;
import europa.ec.dgc.revocationdistribution.exception.PreconditionFailedException;
import europa.ec.dgc.revocationdistribution.exception.TokenValidationException;
import eu.europa.ec.dgc.revocationdistribution.exception.DataNotFoundException;
import eu.europa.ec.dgc.revocationdistribution.exception.PreconditionFailedException;
import eu.europa.ec.dgc.revocationdistribution.exception.TokenValidationException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*-
* ---license-start
* European Digital COVID Certificate Booking Demo / dgca-booking-demo-backend
* eu-digital-green-certificates / dgca-revocation-distribution-service
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* Copyright (C) 2022 T-Systems International GmbH and all other contributors
* ---
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@
* ---license-end
*/

package europa.ec.dgc.revocationdistribution.config;
package eu.europa.ec.dgc.revocationdistribution.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
Expand Down Expand Up @@ -56,12 +56,12 @@ public OpenAPI openApi() {
version = "dev";
}
return new OpenAPI()
.info(new Info()
.title("EU Digital COVID Certificate Revocation Distribution Service")
.description("The API provides the endpoints for retrieving the revocation list")
.version(version)
.license(new License()
.name("Apache 2.0")
.url("https://www.apache.org/licenses/LICENSE-2.0")));
.info(new Info()
.title("EU Digital COVID Certificate Revocation Distribution Service")
.description("The API provides the endpoints for retrieving the revocation list")
.version(version)
.license(new License()
.name("Apache 2.0")
.url("https://www.apache.org/licenses/LICENSE-2.0")));
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-validation-service
* eu-digital-green-certificates / dgca-revocation-distribution-service
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* Copyright (C) 2022 T-Systems International GmbH and all other contributors
* ---
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@
* ---license-end
*/

package europa.ec.dgc.revocationdistribution.config;
package eu.europa.ec.dgc.revocationdistribution.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,8 +1,8 @@
/*-
* ---license-start
* eu-digital-green-certificates / dgca-validation-service
* eu-digital-green-certificates / dgca-revocation-distribution-service
* ---
* Copyright (C) 2021 T-Systems International GmbH and all other contributors
* Copyright (C) 2022 T-Systems International GmbH and all other contributors
* ---
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,9 +18,7 @@
* ---license-end
*/

package europa.ec.dgc.revocationdistribution.config;

import static net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider.Configuration.builder;
package eu.europa.ec.dgc.revocationdistribution.config;

import javax.sql.DataSource;
import net.javacrumbs.shedlock.core.LockProvider;
Expand All @@ -29,6 +27,8 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;

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

@Configuration
public class ShedLockConfig {

Expand Down
Loading

0 comments on commit 4a52789

Please sign in to comment.