From 1fb94ce63cd726eccb6de1f9b22a1485ef405e14 Mon Sep 17 00:00:00 2001 From: liuyuanmu Date: Wed, 10 Nov 2021 17:36:48 +0800 Subject: [PATCH] TLS for gateway --- core | 2 +- deploy/deploy-gateway/conf/application-gw.properties | 0 .../src/main/resources/config/application-gw.properties | 14 ++++++++++++++ .../deploy-gateway/src/main/resources/scripts/startup.sh | 5 ++++- framework | 2 +- libs/httpservice | 2 +- 6 files changed, 21 insertions(+), 4 deletions(-) delete mode 100644 deploy/deploy-gateway/conf/application-gw.properties create mode 100644 deploy/deploy-gateway/src/main/resources/config/application-gw.properties diff --git a/core b/core index 3b533cb9..11437fb1 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 3b533cb94bec300c6bc4935d3c0a2db0257c19a4 +Subproject commit 11437fb19cc5aa91a5d5484acbe130223b300bcb diff --git a/deploy/deploy-gateway/conf/application-gw.properties b/deploy/deploy-gateway/conf/application-gw.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/deploy/deploy-gateway/src/main/resources/config/application-gw.properties b/deploy/deploy-gateway/src/main/resources/config/application-gw.properties new file mode 100644 index 00000000..18a85177 --- /dev/null +++ b/deploy/deploy-gateway/src/main/resources/config/application-gw.properties @@ -0,0 +1,14 @@ +# gzip +server.compression.enabled=true +server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain + +# TLS +server.ssl.enabled=false +server.ssl.key-store= +server.ssl.key-store-type= +server.ssl.key-alias= +server.ssl.key-store-password= +server.ssl.client-auth= +server.ssl.trust-store= +server.ssl.trust-store-password= +server.ssl.trust-store-type= \ No newline at end of file diff --git a/deploy/deploy-gateway/src/main/resources/scripts/startup.sh b/deploy/deploy-gateway/src/main/resources/scripts/startup.sh index a38f2f62..e0a62da9 100644 --- a/deploy/deploy-gateway/src/main/resources/scripts/startup.sh +++ b/deploy/deploy-gateway/src/main/resources/scripts/startup.sh @@ -31,11 +31,14 @@ CONFIG_PATH=$APP_HOME/config #gateway.conf完整路径 GATEWAY_CONFIG=$CONFIG_PATH/gateway.conf +#application-gw.properties完整路径 +SPRING_CONFIG=$CONFIG_PATH/application-gw.properties + #定义程序启动的参数 JAVA_OPTS="-jar -server -Xms1024m -Xmx1024m -Djdchain.log=$APP_HOME/logs -Dlogging.config=file:$APP_HOME/config/log4j2-gw.xml" #APP具体相关命令 -APP_CMD=$APP_LIB_PATH/$APP_JAR" -c "$GATEWAY_CONFIG +APP_CMD=$APP_LIB_PATH/$APP_JAR" -c "$GATEWAY_CONFIG" -sp "$SPRING_CONFIG #APP_JAR的具体路径 APP_JAR_PATH=$APP_LIB_PATH/$APP_JAR diff --git a/framework b/framework index 95e75db7..a5bc3b94 160000 --- a/framework +++ b/framework @@ -1 +1 @@ -Subproject commit 95e75db78ab53e91d9ff93560e2318b0408e3d89 +Subproject commit a5bc3b94e6ef188098b535c06ebaf6bf56aea441 diff --git a/libs/httpservice b/libs/httpservice index a6cb4583..b2e879ce 160000 --- a/libs/httpservice +++ b/libs/httpservice @@ -1 +1 @@ -Subproject commit a6cb4583fc6271ce62e2b8b1d6273c3bdd03b810 +Subproject commit b2e879cecc14a0ddb895f9daa4fd0d398d81f6d4