diff --git a/.github/workflows/tagged_release.yaml b/.github/workflows/tagged_release.yaml index c3c9eda4..0247a545 100644 --- a/.github/workflows/tagged_release.yaml +++ b/.github/workflows/tagged_release.yaml @@ -33,9 +33,12 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} TESTCONTAINERS_RYUK_DISABLED: true - - name: shasum + - name: "Calculate shasum for SDK WS" run: shasum -a 256 dpppt-backend-sdk/dpppt-backend-sdk-ws/target/dpppt-backend-sdk-ws.jar > dpppt-backend-sdk/dpppt-backend-sdk-ws/target/dpppt-backend-sdk-ws.sha256 shell: bash + - name: "Calculate shasum for SDK Interops" + run: shasum -a 256 dpppt-backend-sdk/dpppt-backend-sdk-interops/target/dpppt-backend-sdk-interops.jar > dpppt-backend-sdk/dpppt-backend-sdk-interops/target/dpppt-backend-sdk-interops.sha256 + shell: bash - name: "Create new release" uses: "marvinpinto/action-automatic-releases@latest" with: @@ -45,4 +48,6 @@ jobs: dpppt-backend-sdk/dpppt-backend-sdk-ws/target/dpppt-backend-sdk-ws.jar dpppt-backend-sdk/dpppt-backend-sdk-ws/target/dpppt-backend-sdk-ws.sha256 dpppt-backend-sdk/dpppt-backend-sdk-ws/generated/swagger/swagger.yaml - + dpppt-backend-sdk/dpppt-backend-sdk-interops/target/dpppt-backend-sdk-interops.jar + dpppt-backend-sdk/dpppt-backend-sdk-interops/target/dpppt-backend-sdk-interops.sha256 + diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/pom.xml b/dpppt-backend-sdk/dpppt-backend-sdk-interops/pom.xml new file mode 100644 index 00000000..206c358f --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/pom.xml @@ -0,0 +1,110 @@ + + + + 4.0.0 + + org.dpppt + dpppt-backend-sdk + 1.0.0-SNAPSHOT + + dpppt-backend-sdk-interops + DP3T Backend SDK Interops Service + jar + + + org.dpppt.backend.sdk.interops.Application + DP-3T_dp3t-sdk-backend + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.dpppt + dpppt-backend-sdk-model + + + + org.dpppt + dpppt-backend-sdk-data + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.boot + spring-boot-starter-actuator + + + io.micrometer + micrometer-registry-prometheus + + + + org.springframework.security + spring-security-core + + + + + org.springframework.security + spring-security-config + + + + + org.springframework.security + spring-security-web + + + + + + + + + org.springframework.boot + spring-boot-dependencies + pom + ${spring-boot-version} + import + + + + + + + dpppt-backend-sdk-interops + + + + org.springframework.boot + spring-boot-maven-plugin + + org.dpppt.backend.sdk.interops.Application + + + + + repackage + + + + + + + diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/Application.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/Application.java new file mode 100644 index 00000000..a82bcd94 --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/Application.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.backend.sdk.interops; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; + +@Configuration +@ComponentScan(basePackages = {"org.dpppt.backend.sdk.interops.config"}) +@EnableAutoConfiguration( + exclude = {SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class}) +@EnableWebMvc +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class); + } +} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/ActuatorSecurity.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/ActuatorSecurity.java new file mode 100644 index 00000000..2dddf955 --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/ActuatorSecurity.java @@ -0,0 +1,118 @@ +package org.dpppt.backend.sdk.interops.config; + +import org.dpppt.backend.sdk.interops.config.configbeans.ActuatorSecurityConfig; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.actuate.health.HealthEndpoint; +import org.springframework.boot.actuate.info.InfoEndpoint; +import org.springframework.boot.actuate.logging.LoggersEndpoint; +import org.springframework.boot.actuate.metrics.export.prometheus.PrometheusScrapeEndpoint; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; +import org.springframework.core.env.Environment; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; + +@Configuration +@Order(Ordered.HIGHEST_PRECEDENCE + 9) +@Profile(value = "actuator-security") +@EnableWebSecurity +public class ActuatorSecurity extends WebSecurityConfigurerAdapter { + + private static final String PROMETHEUS_ROLE = "PROMETHEUS"; + + @Value("${ws.monitor.prometheus.user}") + private String user; + + @Autowired Environment environment; + // region Actuator Passwords + // ---------------------------------------------------------------------------------------------------------------------------------- + @Bean + @Profile("cloud-dev") + ActuatorSecurityConfig passwordCloudDev() { + return new ActuatorSecurityConfig( + user, environment.getProperty("vcap.services.ha_prometheus_dev.credentials.password")); + } + + @Bean + @Profile("cloud-test") + ActuatorSecurityConfig passwordCloudTest() { + return new ActuatorSecurityConfig( + user, environment.getProperty("vcap.services.ha_prometheus_test.credentials.password")); + } + + @Bean + @Profile("cloud-abn") + ActuatorSecurityConfig passwordCloudAbn() { + return new ActuatorSecurityConfig( + user, environment.getProperty("vcap.services.ha_prometheus_abn.credentials.password")); + } + + @Bean + @Profile("cloud-prod") + ActuatorSecurityConfig passwordProdAbn() { + return new ActuatorSecurityConfig( + user, environment.getProperty("vcap.services.ha_prometheus_prod.credentials.password")); + } + + @Bean + @ConditionalOnMissingBean + ActuatorSecurityConfig passwordDefault() { + return new ActuatorSecurityConfig( + user, environment.getProperty("ws.monitor.prometheus.password")); + } + // ---------------------------------------------------------------------------------------------------------------------------------- + // endregion + + @Override + protected void configure(HttpSecurity http) throws Exception { + http.requestMatcher( + org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest + .toAnyEndpoint()) + .authorizeRequests() + .requestMatchers( + org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest.to( + HealthEndpoint.class)) + .permitAll() + .requestMatchers( + org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest.to( + InfoEndpoint.class)) + .permitAll() + .requestMatchers( + org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest.to( + LoggersEndpoint.class)) + .hasRole(PROMETHEUS_ROLE) + .requestMatchers( + org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest.to( + PrometheusScrapeEndpoint.class)) + .hasRole(PROMETHEUS_ROLE) + .anyRequest() + .denyAll() + .and() + .httpBasic(); + + http.csrf().ignoringAntMatchers("/actuator/loggers/**"); + } + + @Autowired + protected void configureGlobal( + AuthenticationManagerBuilder auth, ActuatorSecurityConfig securityConfig) throws Exception { + auth.inMemoryAuthentication() + .withUser(securityConfig.getUsername()) + .password(passwordEncoder().encode(securityConfig.getPassword())) + .roles(PROMETHEUS_ROLE); + } + + @Bean + public PasswordEncoder passwordEncoder() { + return new BCryptPasswordEncoder(); + } +} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSBaseConfig.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSBaseConfig.java new file mode 100644 index 00000000..2d44c22f --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSBaseConfig.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.backend.sdk.interops.config; + +import javax.sql.DataSource; +import org.flywaydb.core.Flyway; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +@EnableScheduling +public abstract class WSBaseConfig implements SchedulingConfigurer, WebMvcConfigurer { + + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public abstract DataSource dataSource(); + + public abstract Flyway flyway(); + + public abstract String getDbType(); + + @Override + public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {} +} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudAbnConfig.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudAbnConfig.java new file mode 100644 index 00000000..1ee2755c --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudAbnConfig.java @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.backend.sdk.interops.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; + +@Configuration +@Profile("cloud-abn") +public class WSCloudAbnConfig extends WSCloudBaseConfig {} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudBaseConfig.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudBaseConfig.java new file mode 100644 index 00000000..69f3b647 --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudBaseConfig.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.backend.sdk.interops.config; + +import javax.sql.DataSource; +import org.flywaydb.core.Flyway; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; + +@Configuration +public abstract class WSCloudBaseConfig extends WSBaseConfig { + + @Autowired @Lazy private DataSource dataSource; + + @Override + public DataSource dataSource() { + return dataSource; + } + + @Bean + @Override + public Flyway flyway() { + Flyway flyWay = + Flyway.configure() + .dataSource(dataSource()) + .locations("classpath:/db/migration/pgsql_cluster") + .load(); + flyWay.migrate(); + return flyWay; + } + + @Override + public String getDbType() { + return "pgsql"; + } +} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudDevConfig.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudDevConfig.java new file mode 100644 index 00000000..38aad9ed --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudDevConfig.java @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.backend.sdk.interops.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; + +@Configuration +@Profile("cloud-dev") +public class WSCloudDevConfig extends WSCloudBaseConfig {} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudProdConfig.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudProdConfig.java new file mode 100644 index 00000000..7d690a2a --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudProdConfig.java @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.backend.sdk.interops.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; + +@Configuration +@Profile("cloud-prod") +public class WSCloudProdConfig extends WSCloudBaseConfig {} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudTestConfig.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudTestConfig.java new file mode 100644 index 00000000..7934108d --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSCloudTestConfig.java @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.backend.sdk.interops.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; + +@Configuration +@Profile("cloud-test") +public class WSCloudTestConfig extends WSCloudBaseConfig {} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSDevConfig.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSDevConfig.java new file mode 100644 index 00000000..33ea2e12 --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSDevConfig.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.backend.sdk.interops.config; + +import javax.sql.DataSource; +import org.flywaydb.core.Flyway; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; + +@Configuration +@Profile("dev") +public class WSDevConfig extends WSBaseConfig { + + @Bean + @Override + public DataSource dataSource() { + return new EmbeddedDatabaseBuilder() + .generateUniqueName(true) + .setType(EmbeddedDatabaseType.HSQL) + .build(); + } + + @Bean + @Override + public Flyway flyway() { + Flyway flyWay = + Flyway.configure() + .dataSource(dataSource()) + .locations("classpath:/db/migration/hsqldb") + .load(); + flyWay.migrate(); + return flyWay; + } + + @Override + public String getDbType() { + return "hsqldb"; + } +} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSProdConfig.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSProdConfig.java new file mode 100644 index 00000000..a960222d --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/WSProdConfig.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2020 Ubique Innovation AG + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + * + * SPDX-License-Identifier: MPL-2.0 + */ + +package org.dpppt.backend.sdk.interops.config; + +import com.zaxxer.hikari.HikariConfig; +import com.zaxxer.hikari.HikariDataSource; +import java.util.Properties; +import javax.sql.DataSource; +import org.flywaydb.core.Flyway; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; + +@Configuration +@Profile("prod") +public class WSProdConfig extends WSBaseConfig { + + @Value("${datasource.username}") + String dataSourceUser; + + @Value("${datasource.password}") + String dataSourcePassword; + + @Value("${datasource.url}") + String dataSourceUrl; + + @Value("${datasource.driverClassName}") + String dataSourceDriver; + + @Value("${datasource.failFast}") + String dataSourceFailFast; + + @Value("${datasource.maximumPoolSize}") + String dataSourceMaximumPoolSize; + + @Value("${datasource.maxLifetime}") + String dataSourceMaxLifetime; + + @Value("${datasource.idleTimeout}") + String dataSourceIdleTimeout; + + @Value("${datasource.connectionTimeout}") + String dataSourceConnectionTimeout; + + @Value("${ws.ecdsa.credentials.privateKey:}") + private String privateKey; + + @Value("${ws.ecdsa.credentials.publicKey:}") + public String publicKey; + + @Bean(destroyMethod = "close") + public DataSource dataSource() { + HikariConfig config = new HikariConfig(); + Properties props = new Properties(); + props.put("url", dataSourceUrl); + props.put("user", dataSourceUser); + props.put("password", dataSourcePassword); + config.setDataSourceProperties(props); + config.setDataSourceClassName(dataSourceDriver); + config.setMaximumPoolSize(Integer.parseInt(dataSourceMaximumPoolSize)); + config.setMaxLifetime(Integer.parseInt(dataSourceMaxLifetime)); + config.setIdleTimeout(Integer.parseInt(dataSourceIdleTimeout)); + config.setConnectionTimeout(Integer.parseInt(dataSourceConnectionTimeout)); + return new HikariDataSource(config); + } + + @Bean + @Override + public Flyway flyway() { + Flyway flyWay = + Flyway.configure() + .dataSource(dataSource()) + .locations("classpath:/db/migration/pgsql") + .load(); + flyWay.migrate(); + return flyWay; + } + + @Override + public String getDbType() { + return "pgsql"; + } +} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/configbeans/ActuatorSecurityConfig.java b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/configbeans/ActuatorSecurityConfig.java new file mode 100644 index 00000000..72101661 --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/java/org/dpppt/backend/sdk/interops/config/configbeans/ActuatorSecurityConfig.java @@ -0,0 +1,19 @@ +package org.dpppt.backend.sdk.interops.config.configbeans; + +public class ActuatorSecurityConfig { + private final String username; + private final String password; + + public String getUsername() { + return username; + } + + public String getPassword() { + return password; + } + + public ActuatorSecurityConfig(String username, String password) { + this.username = username; + this.password = password; + } +} diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/resources/application.properties b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/resources/application.properties new file mode 100644 index 00000000..be4d8078 --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/resources/application.properties @@ -0,0 +1,25 @@ +# +# Copyright (c) 2020 Ubique Innovation AG +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. +# +# SPDX-License-Identifier: MPL-2.0 +# +spring.profiles.active=dev +management.endpoints.enabled-by-default=false +server.error.whitelabel.enabled=true +#------------------------------------------------------------------------------- +# JDBC Config +#------------------------------------------------------------------------------- +# local + datasource.url=jdbc:postgresql://localhost:5432/dpppt + datasource.username=dpppt + datasource.password=dpppt + datasource.driverClassName=org.postgresql.ds.PGSimpleDataSource + datasource.failFast=true + datasource.maximumPoolSize=5 + datasource.maxLifetime=1700000 + datasource.idleTimeout=600000 + datasource.connectionTimeout=30000 diff --git a/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/resources/banner.txt b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/resources/banner.txt new file mode 100644 index 00000000..6cb0241b --- /dev/null +++ b/dpppt-backend-sdk/dpppt-backend-sdk-interops/src/main/resources/banner.txt @@ -0,0 +1,44 @@ + ,itffti, + ,C@@@@@@@@C, + .8@@@@@@@@@@8. + 1@@@@@@@@@@@@1 + ,8@@@@@@@@@@8, + :tCG0GL1. :C@@@@@@@@C: ,tCG0GCt, + .C@@@@@@@@8t .t@@@@@@t. .L@@@@@@@@@L. + G@@@@@@@@@@@1 ,itC08@@@@@@@@@@8GCti, L@@@@@@@@@@@L + .@@@@@@@@@@@@G .;L0@@@@@@@@@@@@@@@@@@@@@@0Li. 0@@@@@@@@@@@8 + f@@@@@@@@@@@@0t, :L8@@@@@@@@@@@888888@@@@@@@@@@@8L:.t8@@@@@@@@@@@1 + 10@@@@@@@@@@@@@CC@@@@@@@@0Cti:,......,:itC0@@@@@@@@8@@@@@@@@@@@Gi + :1tf1if8@@@@@@@@@@@@0t: :t0@@@@@@@@@@@Ltfti, + .iC@@@@@@@@C; ;C@@@@@@@0, + t@@@@@@0; ;0@@@@@8i + t@@@@@@L. :;:. .L@@@@@@1, + :@@@@@@L :0@@@0i L@@@@@@@0t. + G@@@@@G t@@@@@G 0@@@@@@@@0, + :@@@@@@; tG0Gf, .,, ;@@@@@@@@@L + 1@@@@@8. iC0@@@8C1. .8@@@@@@@@f + :itt1;f@@@@@0 ,G@@@@@@@@@0: 0@@@@@@@C. + i0@@@@@@@@@@@@8. C@@@@@@@@@@@G .8@@@@@G; + f@@@@@@@@@@@@@@@; G@@@@@@@@@@@0 ;@@@@@@, + .@@@@@@@@@@@@@@@@G :;;, :8@@@@@@@@@@; 0@@@@@0,. ,:;;:. + G@@@@@@@@@@@@@@@@L ,G@@@8t .t0@@@@@0f: L@@@@@@@@0CG@@@@@8C; + ,G@@@@@@@@@C@@@@@@L. i@@@@@8. ,:;:,. .L@@@@@@@@@@@@@@@@@@@@f + ;fCGGGC1, 1@@@@@@0; iCGGL, ;0@@@@@@G0@@@@@@@@@@@@@@, + i0@@@@@@C; ;C@@@@@@8i .,1@@@@@@@@@@@@, + L@@@@@@@@0t:. .:t0@@@@@@@L, f@@@@@@@@@8i + . ,f8@@@@@@@@@@@@8Cti:,......,:itC8@@@@@@@@C; :fG8@@8Gt. + ;fG080@@@@@@@8L8@@@@@@@@@@@888888@@@@@@@@@@@@C, .... + .C@@@@@@@@@@@8t. .;f0@@@@@@@@@@@@@@@@@@@@@@@@@@8i + L@@@@@@@@@@@0, ,;t@@@@@@@@@@@@@8GCtiG@@@@@@L. + 0@@@@@@@@@@@0 .G@@@@@@@@@@C,, f@@@@@@0GLt; + i@@@@@@@@@@@i f@@@@@@@@@@@@, i8@@@@@@@@@0; + :C8@@@@@8C: 1@@@@@@@@@@@@, 0@@@@@@@@@@@: + .;1t1;. f@@@@@@@@@8; :@@@@@@@@@@@@t + :fG8@80C1. .G@@@@@@@@@@@, + ... .L8@@@@@@@C: + ,itfff1, + ___ ___ _________ ___ ___ _ __ ___ _ + | \| _ \__ /_ _| / __| \| |/ / |_ _|_ _| |_ ___ _ _ ___ _ __ ___ + | |) | _/|_ \ | | \__ \ |) | ' < | || ' \ _/ -_) '_/ _ \ '_ (_-< + |___/|_| |___/ |_| |___/___/|_|\_\ |___|_||_\__\___|_| \___/ .__/__/ + |_| \ No newline at end of file diff --git a/dpppt-backend-sdk/pom.xml b/dpppt-backend-sdk/pom.xml index a474aa43..ebd4023a 100644 --- a/dpppt-backend-sdk/pom.xml +++ b/dpppt-backend-sdk/pom.xml @@ -47,6 +47,7 @@ dpppt-backend-sdk-data dpppt-backend-sdk-ws dpppt-backend-sdk-report + dpppt-backend-sdk-interops