From 70fdcff2e614b20bb910a778333f7d5eae93d9b8 Mon Sep 17 00:00:00 2001 From: Kimiega Date: Mon, 27 Jan 2025 06:04:13 +0300 Subject: [PATCH 1/2] fix tls external for gateway --- .../src/main/resources/application-gateway-external-tls.yml | 4 ++++ backend/gateway/src/main/resources/application.yml | 6 +----- .../src/main/resources/application-service-discovery.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 backend/gateway/src/main/resources/application-gateway-external-tls.yml diff --git a/backend/gateway/src/main/resources/application-gateway-external-tls.yml b/backend/gateway/src/main/resources/application-gateway-external-tls.yml new file mode 100644 index 00000000..559cfe00 --- /dev/null +++ b/backend/gateway/src/main/resources/application-gateway-external-tls.yml @@ -0,0 +1,4 @@ +server: + ssl: + key-store: classpath:keystore/itmo-dating-external.p12 + key-store-password: ${ITMO_DATING_EXT_KEY_STORE_PASSWORD} \ No newline at end of file diff --git a/backend/gateway/src/main/resources/application.yml b/backend/gateway/src/main/resources/application.yml index ecf18086..701d212f 100644 --- a/backend/gateway/src/main/resources/application.yml +++ b/backend/gateway/src/main/resources/application.yml @@ -1,6 +1,6 @@ spring: config: - import: application-monitoring.yml,application-service-discovery.yml,application-tls.yml + import: application-monitoring.yml,application-service-discovery.yml,application-tls.yml,application-gateway-external-tls.yml application: name: gateway cloud: @@ -132,10 +132,6 @@ spring: predicates: - Method=GET - Path=/api/locations -server: - ssl: - key-store: classpath:keystore/itmo-dating-external.p12 - key-store-password: ${ITMO_DATING_EXT_KEY_STORE_PASSWORD} springdoc: swagger-ui: path: /swagger-ui.html diff --git a/backend/starter-service-discovery/src/main/resources/application-service-discovery.yml b/backend/starter-service-discovery/src/main/resources/application-service-discovery.yml index bac24e34..bfece753 100644 --- a/backend/starter-service-discovery/src/main/resources/application-service-discovery.yml +++ b/backend/starter-service-discovery/src/main/resources/application-service-discovery.yml @@ -9,9 +9,9 @@ spring: tls: key-store-instance-type: JKS certificate-path: keystore/itmo-dating-backend.jks - certificate-password: ${server.ssl.key-store-password} + certificate-password: ${client.ssl.key-store-password} key-store-path: keystore/itmo-dating-backend.jks - key-store-password: ${server.ssl.key-store-password} + key-store-password: ${client.ssl.key-store-password} discovery: enabled: true scheme: https From 1d3455a1828942b52a64ae492d4a24dc152cf55e Mon Sep 17 00:00:00 2001 From: Kimiega Date: Mon, 27 Jan 2025 06:08:58 +0300 Subject: [PATCH 2/2] small format fix --- .../src/main/resources/application-gateway-external-tls.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/gateway/src/main/resources/application-gateway-external-tls.yml b/backend/gateway/src/main/resources/application-gateway-external-tls.yml index 559cfe00..0c57f11b 100644 --- a/backend/gateway/src/main/resources/application-gateway-external-tls.yml +++ b/backend/gateway/src/main/resources/application-gateway-external-tls.yml @@ -1,4 +1,4 @@ server: ssl: key-store: classpath:keystore/itmo-dating-external.p12 - key-store-password: ${ITMO_DATING_EXT_KEY_STORE_PASSWORD} \ No newline at end of file + key-store-password: ${ITMO_DATING_EXT_KEY_STORE_PASSWORD}