Skip to content
Snippets Groups Projects
Unverified Commit ffcfaecc authored by Alexander Solovyov's avatar Alexander Solovyov Committed by GitHub
Browse files

env var MB_JETTY_SSL_INSECURE to disable SNI check (#37781)

Resolves #29660
parent e4e34df9
No related branches found
No related tags found
No related merge requests found
......@@ -22,13 +22,15 @@
(defn- jetty-ssl-config []
(m/filter-vals
some?
{:ssl-port (config/config-int :mb-jetty-ssl-port)
:keystore (config/config-str :mb-jetty-ssl-keystore)
:key-password (config/config-str :mb-jetty-ssl-keystore-password)
:truststore (config/config-str :mb-jetty-ssl-truststore)
:trust-password (config/config-str :mb-jetty-ssl-truststore-password)
:client-auth (when (config/config-bool :mb-jetty-ssl-client-auth)
:need)}))
{:ssl-port (config/config-int :mb-jetty-ssl-port)
:keystore (config/config-str :mb-jetty-ssl-keystore)
:key-password (config/config-str :mb-jetty-ssl-keystore-password)
:truststore (config/config-str :mb-jetty-ssl-truststore)
:trust-password (config/config-str :mb-jetty-ssl-truststore-password)
:client-auth (when (config/config-bool :mb-jetty-ssl-client-auth)
:need)
:sni-host-check? (when (config/config-str :mb-jetty-ssl-insecure)
false)}))
(defn- jetty-config []
(cond-> (m/filter-vals
......@@ -46,8 +48,7 @@
(merge (jetty-ssl-config)))))
(defn- log-config [jetty-config]
(log/info (trs "Launching Embedded Jetty Webserver with config:")
"\n"
(log/info "Launching Embedded Jetty Webserver with config:\n"
(u/pprint-to-str (m/filter-keys
#(not (str/includes? % "password"))
jetty-config))))
......
......@@ -7,18 +7,19 @@
(deftest config-test
(testing "Make sure our Jetty config functions work as expected/we don't accidentally break things (#9333)"
(with-redefs [config/config-str (constantly "10")]
(is (= {:keystore "10"
:max-queued 10
(is (= {:keystore "10"
:max-queued 10
:request-header-size 10
:port 10
:min-threads 10
:host "10"
:daemon? false
:ssl? true
:trust-password "10"
:key-password "10"
:truststore "10"
:max-threads 10
:max-idle-time 10
:ssl-port 10}
:port 10
:min-threads 10
:host "10"
:daemon? false
:ssl? true
:sni-host-check? false
:trust-password "10"
:key-password "10"
:truststore "10"
:max-threads 10
:max-idle-time 10
:ssl-port 10}
(#'server/jetty-config))))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment