Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
ffcfaecc
Unverified
Commit
ffcfaecc
authored
1 year ago
by
Alexander Solovyov
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/metabase/server.clj
+10
-9
10 additions, 9 deletions
src/metabase/server.clj
test/metabase/server_test.clj
+14
-13
14 additions, 13 deletions
test/metabase/server_test.clj
with
24 additions
and
22 deletions
src/metabase/server.clj
+
10
−
9
View file @
ffcfaecc
...
...
@@ -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
))))
...
...
This diff is collapsed.
Click to expand it.
test/metabase/server_test.clj
+
14
−
13
View file @
ffcfaecc
...
...
@@ -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
))))))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment