Skip to content

Commit

Permalink
Revert "feat/Add cors (#23)"
Browse files Browse the repository at this point in the history
This reverts commit 76fb5a5.
  • Loading branch information
mschulte-tsi committed Jul 8, 2021
1 parent 76fb5a5 commit 181d9fa
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 206 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: ci-main
on:
workflow_dispatch:
push:
branches:
- main
Expand Down Expand Up @@ -49,23 +48,9 @@ jobs:
--password-stdin
docker build . \
--file ./Dockerfile \
--tag "${APP_PACKAGES_URL}:${APP_VERSION}" \
--tag "${TRUSTED_URL}/${TRUSTED_REPOSITORY}/cwa-dcc-rules:${APP_VERSION}"
--tag "${APP_PACKAGES_URL}:${APP_VERSION}"
docker push "${APP_PACKAGES_URL}:${APP_VERSION}"
env:
APP_PACKAGES_URL: docker.pkg.github.com/${{ github.repository }}/dgca-businessrule-service
APP_PACKAGES_USERNAME: ${{ github.actor }}
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
TRUSTED_URL: ${{ secrets.TRUSTED_URL }}
TRUSTED_REPOSITORY: ${{ secrets.TRUSTED_REPOSITORY }}
- name: docker push trusted
run: |
echo ${TRUSTED_TOKEN} | docker login ${TRUSTED_URL} -u ${TRUSTED_USER} --password-stdin
docker push ${TRUSTED_URL}/${TRUSTED_REPOSITORY}/cwa-dcc-rules:${APP_VERSION}
env:
TRUSTED_KEY: ${{ secrets.TRUSTED_KEY }}
TRUSTED_URL: ${{ secrets.TRUSTED_URL }}
TRUSTED_SERVER_URL: ${{ secrets.TRUSTED_SERVER_URL }}
TRUSTED_REPOSITORY: ${{ secrets.TRUSTED_REPOSITORY }}
TRUSTED_USER: ${{ secrets.TRUSTED_USER }}
TRUSTED_TOKEN: ${{ secrets.TRUSTED_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/ci-sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ci-sonar
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
sonar:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-java@v2
with:
java-version: 11
distribution: adopt
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v2
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
- name: mvn
run: |-
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
--batch-mode \
--file ./pom.xml \
--settings ./settings.xml \
--define app.packages.username="${APP_PACKAGES_USERNAME}" \
--define app.packages.password="${APP_PACKAGES_PASSWORD}"
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APP_PACKAGES_USERNAME: ${{ github.actor }}
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
15 changes: 1 addition & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<!-- dependencies -->
<owasp.version>6.1.1</owasp.version>
<spring.boot.version>2.4.4</spring.boot.version>
<spring.cloud.version>2020.0.1</spring.cloud.version>
<spring.cloud.version>2020.0.2</spring.cloud.version>
<spring.test.version>5.3.5</spring.test.version>
<spring.security.version>5.4.6</spring.security.version>
<lombok.version>1.18.20</lombok.version>
Expand Down Expand Up @@ -107,7 +107,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand Down Expand Up @@ -159,14 +158,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-vault-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
Expand Down Expand Up @@ -274,10 +265,6 @@
<artifactId>nimbus-jose-jwt</artifactId>
<version>9.9.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
28 changes: 0 additions & 28 deletions scripts/Readme.md

This file was deleted.

26 changes: 0 additions & 26 deletions scripts/sign-and-upload.bat

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/java/eu/europa/ec/dgc/businessrule/config/CorsConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public class DgcConfigProperties {

private final GatewayDownload countryListDownload = new GatewayDownload();

private String corsUrl;

@Getter
@Setter
public static class GatewayDownload {
Expand Down

This file was deleted.

31 changes: 6 additions & 25 deletions src/main/resources/application-cloud.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
spring:
h2:
console:
enabled: false
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://${POSTGRESQL_SERVICE_HOST}:${POSTGRESQL_SERVICE_PORT}/${POSTGRESQL_DATABASE}
username: ${POSTGRESQL_USER}
password: ${POSTGRESQL_PASSWORD}
url: jdbc:postgresql://localhost:5432/postgres
username: postgres
password: postgres
jpa:
database-platform: org.hibernate.dialect.PostgreSQLDialect
springdoc:
api-docs:
enabled: false
dgc:
corsUrl: ${DGC_CORS_ENABLED_URL}
gateway:
connector:
enabled: true
endpoint: ${DGC_GATEWAY_CONNECTOR_ENDPOINT}
proxy:
enabled: false
tls-trust-store:
password: ${DGC_GATEWAY_CONNECTOR_TLSTRUSTSTORE_PASSWORD}
path: ${DGC_GATEWAY_CONNECTOR_TLSTRUSTSTORE_PATH}
tls-key-store:
alias: ${DGC_GATEWAY_CONNECTOR_TLSKEYSTORE_ALIAS}
password: ${DGC_GATEWAY_CONNECTOR_TLSKEYSTORE_PASSWORD}
path: ${DGC_GATEWAY_CONNECTOR_TLSKEYSTORE_PATH}
trust-anchor:
alias: ${DGC_GATEWAY_CONNECTOR_TRUSTANCHOR_ALIAS}
password: ${DGC_GATEWAY_CONNECTOR_TRUSTANCHOR_PASSWORD}
path: ${DGC_GATEWAY_CONNECTOR_TRUSTANCHOR_PATH}
22 changes: 2 additions & 20 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,17 @@ spring:
pool:
size: 5
management:
server:
ssl:
enabled: false
port: 8081
endpoint:
info:
enabled: true
health:
enabled: true
metrics:
enabled: true
prometheus:
enabled: true
endpoints:
enabled-by-default: false
web:
base-path: /management
exposure:
include: info,health,metrics,prometheus
jmx:
exposure:
include: info,health,metrics,prometheus
health:
probes:
enabled: true
metrics:
export:
prometheus:
enabled: true
include: info,health
info:
name: ${spring.application.name}
profiles: ${spring.profiles.active}
Expand All @@ -63,7 +46,6 @@ springdoc:
swagger-ui:
path: /swagger
dgc:
corsUrl: https://dgc-gateway.example.com
businessRulesDownload:
timeInterval: 1800000
lockLimit: 3600000
Expand Down
30 changes: 0 additions & 30 deletions src/main/resources/bootstrap-cloud.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions src/main/resources/bootstrap.yaml

This file was deleted.

1 change: 0 additions & 1 deletion src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ spring:
main:
allow-bean-definition-overriding: true
dgc:
corsUrl: "localhost"
businessRulesDownload:
timeInterval: 1800000
lockLimit: 3600000
Expand Down

0 comments on commit 181d9fa

Please sign in to comment.