From 478b08f247787c0681308e6a8099126f4314d57d Mon Sep 17 00:00:00 2001 From: Markus Strehle <11627201+strehle@users.noreply.github.com> Date: Wed, 14 Jul 2021 12:25:32 +0200 Subject: [PATCH 1/4] Revert "Add property option for mail.smtp.ssl.protocols (#1604)" This reverts commit 9725f0bd5bede44855293c1a3af764782a35f347. --- server/src/main/resources/spring/login-ui.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/server/src/main/resources/spring/login-ui.xml b/server/src/main/resources/spring/login-ui.xml index aa7fb73989a..c57c57f39e6 100644 --- a/server/src/main/resources/spring/login-ui.xml +++ b/server/src/main/resources/spring/login-ui.xml @@ -452,7 +452,6 @@ ${smtp.auth:false} ${smtp.starttls:false} - ${smtp.protocols:TLSv1.2 TLSv1.4} From f5afc5ec9d2c161d729392c0a7983ea2afd95f93 Mon Sep 17 00:00:00 2001 From: Markus Strehle <11627201+strehle@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:23:49 +0200 Subject: [PATCH 2/4] Update login-ui.xml --- server/src/main/resources/spring/login-ui.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/main/resources/spring/login-ui.xml b/server/src/main/resources/spring/login-ui.xml index c57c57f39e6..b29ac98cca7 100644 --- a/server/src/main/resources/spring/login-ui.xml +++ b/server/src/main/resources/spring/login-ui.xml @@ -452,6 +452,7 @@ ${smtp.auth:false} ${smtp.starttls:false} + ${smtp.sslprotocols:TLSv1.2} From b9d82ee5dc0d5158120516ac03a076207713720d Mon Sep 17 00:00:00 2001 From: Markus Strehle Date: Wed, 14 Jul 2021 23:05:20 +0200 Subject: [PATCH 3/4] add sslprotocols in all config files --- k8s/matchers/uaa_config_structs.go | 9 +++++---- k8s/templates/uaa.lib.yml | 1 + k8s/templates/values/_values.yml | 1 + k8s/test/config_map_test.go | 10 ++++++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/k8s/matchers/uaa_config_structs.go b/k8s/matchers/uaa_config_structs.go index f8ba7e1c369..9f439b0638c 100644 --- a/k8s/matchers/uaa_config_structs.go +++ b/k8s/matchers/uaa_config_structs.go @@ -61,10 +61,11 @@ type Database struct { } type Smtp struct { - Host string `yaml:"host"` - Port string `yaml:"port"` - Starttls string `yaml:"starttls"` - FromAddress string `yaml:"from_address"` + Host string `yaml:"host"` + Port string `yaml:"port"` + Starttls string `yaml:"starttls"` + FromAddress string `yaml:"from_address"` + Sslprotocols string `yaml:"sslprotocols"` } type OauthClient struct { diff --git a/k8s/templates/uaa.lib.yml b/k8s/templates/uaa.lib.yml index 019ac2f4f1c..b0de9966a49 100644 --- a/k8s/templates/uaa.lib.yml +++ b/k8s/templates/uaa.lib.yml @@ -23,6 +23,7 @@ smtp: port: #@ data.values.smtp.port starttls: #@ data.values.smtp.starttls from_address: #@ data.values.smtp.from_address + sslprotocols: #@ data.values.smtp.sslprotocols oauth: client: diff --git a/k8s/templates/values/_values.yml b/k8s/templates/values/_values.yml index e4e04fe5cbd..ee2e9c3ae5e 100644 --- a/k8s/templates/values/_values.yml +++ b/k8s/templates/values/_values.yml @@ -64,6 +64,7 @@ smtp: password: ~ starttls: ~ from_address: ~ + sslprotocols: ~ admin: client_secret: ~ diff --git a/k8s/test/config_map_test.go b/k8s/test/config_map_test.go index 14f254d99ba..38e27b0cd2e 100644 --- a/k8s/test/config_map_test.go +++ b/k8s/test/config_map_test.go @@ -130,6 +130,7 @@ logger.cfIdentity.appenderRef.uaaDefaultAppender.ref = UaaDefaultAppender` "smtp.port": "smtp port", "smtp.starttls": "smtp starttls", "smtp.from_address": "smtp from_address", + "smtp.sslprotocols": "smtp sslprotocols", "issuer.uri": "http://some.example.com/with/path", }) @@ -145,10 +146,11 @@ logger.cfIdentity.appenderRef.uaaDefaultAppender.ref = UaaDefaultAppender` "Url": Equal("any other database connection string"), }), "Smtp": MatchFields(IgnoreExtras, Fields{ - "Host": Equal("smtp host"), - "Port": Equal("smtp port"), - "Starttls": Equal("smtp starttls"), - "FromAddress": Equal("smtp from_address"), + "Host": Equal("smtp host"), + "Port": Equal("smtp port"), + "Starttls": Equal("smtp starttls"), + "Sslprotocols": Equal("smtp sslprotocols"), + "FromAddress": Equal("smtp from_address"), }), }) }), From d26f3e29b706bb7fc20dcafa70a264000c8513c4 Mon Sep 17 00:00:00 2001 From: Markus Strehle Date: Wed, 14 Jul 2021 23:09:23 +0200 Subject: [PATCH 4/4] tabs --- k8s/matchers/uaa_config_structs.go | 2 +- k8s/test/config_map_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/matchers/uaa_config_structs.go b/k8s/matchers/uaa_config_structs.go index 9f439b0638c..303f6262c26 100644 --- a/k8s/matchers/uaa_config_structs.go +++ b/k8s/matchers/uaa_config_structs.go @@ -65,7 +65,7 @@ type Smtp struct { Port string `yaml:"port"` Starttls string `yaml:"starttls"` FromAddress string `yaml:"from_address"` - Sslprotocols string `yaml:"sslprotocols"` + Sslprotocols string `yaml:"sslprotocols"` } type OauthClient struct { diff --git a/k8s/test/config_map_test.go b/k8s/test/config_map_test.go index 38e27b0cd2e..17c188c5f7e 100644 --- a/k8s/test/config_map_test.go +++ b/k8s/test/config_map_test.go @@ -130,7 +130,7 @@ logger.cfIdentity.appenderRef.uaaDefaultAppender.ref = UaaDefaultAppender` "smtp.port": "smtp port", "smtp.starttls": "smtp starttls", "smtp.from_address": "smtp from_address", - "smtp.sslprotocols": "smtp sslprotocols", + "smtp.sslprotocols": "smtp sslprotocols", "issuer.uri": "http://some.example.com/with/path", }) @@ -149,7 +149,7 @@ logger.cfIdentity.appenderRef.uaaDefaultAppender.ref = UaaDefaultAppender` "Host": Equal("smtp host"), "Port": Equal("smtp port"), "Starttls": Equal("smtp starttls"), - "Sslprotocols": Equal("smtp sslprotocols"), + "Sslprotocols": Equal("smtp sslprotocols"), "FromAddress": Equal("smtp from_address"), }), })