metabase
metabase copied to clipboard
Add `saml-configured`, `jwt-configured` and `google-auth-configured` settings, and some general setting refactor
This PR contains some refactor of various SSO settings to support FE changes being done by @ranquild in #26040 and #26064. This is a replacement for #25869 which was the wrong approach.
The end state of this PR is: For JWT and SAML, there is both a jwt/saml-configured
setting and a jwt/saml-enabled
setting. The -configured
settings just check that a couple of the required settings are set for each SSO method. The -enabled
settings are simple booleans controlled by toggles on the UI, but only returns true
if the configured
setting is also true
, and these are the settings that should be used when determining whether a given SSO method should be allowed for logins. I've also added google-auth-configured
which just checks for the presence of the client ID, as a convenience for the frontend.
Codecov Report
Base: 64.25% // Head: 64.25% // Increases project coverage by +0.00%
:tada:
Coverage data is based on head (
48e013c
) compared to base (d1c6127
). Patch coverage: 73.68% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## master #26045 +/- ##
=======================================
Coverage 64.25% 64.25%
=======================================
Files 3087 3087
Lines 91307 91316 +9
Branches 11490 11491 +1
=======================================
+ Hits 58667 58676 +9
+ Misses 28028 28027 -1
- Partials 4612 4613 +1
Flag | Coverage Δ | |
---|---|---|
back-end | 85.55% <77.77%> (+<0.01%) |
:arrow_up: |
front-end | 44.89% <0.00%> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
...kend/src/metabase_enterprise/sso/api/interface.clj | 62.50% <0.00%> (ø) |
|
...ise/frontend/src/metabase-enterprise/auth/index.js | 25.80% <0.00%> (ø) |
|
frontend/src/metabase/lib/settings.ts | 47.61% <0.00%> (ø) |
|
.../src/metabase_enterprise/sso/integrations/saml.clj | 76.06% <20.00%> (ø) |
|
...d/src/metabase_enterprise/sso/integrations/jwt.clj | 93.84% <66.66%> (ø) |
|
...abase_enterprise/sso/integrations/sso_settings.clj | 95.29% <95.45%> (+0.35%) |
:arrow_up: |
src/metabase/integrations/google.clj | 94.59% <100.00%> (+0.22%) |
:arrow_up: |
src/metabase/public_settings.clj | 94.55% <100.00%> (ø) |
|
src/metabase/models/query.clj | 92.30% <0.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.