Repository navigation
[2.1] Report failed settings writes in update-security-config and translate the SAML settings form - #38486
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🟡 Medium riskChanging shared settings writes to throw on failure could affect callers that relied on returned error responses; update-security-config now reports failed writes. Failed settings writes now throw instead of returning a 500 response that was silently ignored, so VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
| // SAML Configuration UI Schema. Titles and help texts are getters so the language is read when | ||
| // the form schema is built, not when this module loads (locales are loaded after startup). | ||
| export const SAML_UI_SCHEMA = { | ||
| samlConfiguration: { | ||
| 'ui:title': 'SAML Configuration', | ||
| debugMode: { 'ui:title': 'Debug Mode' }, | ||
| get 'ui:title'() { | ||
| return i18next.t('label.entity-configuration', { entity: 'SAML' }); | ||
| }, | ||
| debugMode: { | ||
| get 'ui:title'() { | ||
| return i18next.t('label.debug-mode'); |
There was a problem hiding this comment.
If the selected language file loads slowly during a direct visit to settings, these getters can still leave the form in English. applyManagedPathsToUiSchema uses cloneDeep to copy their current values, and neither providerUiSchema nor uiSchema rebuilds when translations become available. The labels and help text then stay in English until the form is rebuilt.
Wait for the language file before building the form, or rebuild both schemas when translations are ready.
Describe your changes:
Backport of PR #38484 to 2.1. No issue for this PR. 2.0 backport: PR #38487. Related: PR #38315 (main) and its 2.1 backport PR #38318.
1.
update-security-configreported success when a save failedSystemRepository.createOrUpdateanswered a failed write with a 500Responseinstead of throwing. The command ignored it and printed "updated": an authorizer withoutenableSecureSocketConnectionwas never stored, yet the command exited 0.createOrUpdatenow throws the failure (400 when the value is refused, 500 otherwise).update-security-configcatches it, logs the reason and that only settings logged as updated were stored, and exits 1.PR #38318 is merged and this branch includes it, so the backend files, the test and the decision record are identical to main.
2. Translate the whole SAML settings form
Same change as on main: every title and help text in
SAML_UI_SCHEMAusesi18next.tthrough a getter, with a real translation in all 21 locales, and the self-signup field getslabel.enable-self-signup. The SAML form and its translation keys are now identical to main.Not here: the empty
providerNameproblem. 2.1 already requires it for custom OIDC only (PR #34961).Release note (next 2.1 patch):
update-security-confignow logs the reason and exits with code 1 when a setting cannot be saved; before, it reported success. The SAML settings form is now translated.Type of change:
High-level design:
N/A, small changes.
Tests:
Unit tests
OpenMetadataOperationsSecurityConfigTest, real repository over stored rows: a valid file is stored and exits 0; a refused certificate exits 1 and changes nothing; an authorizer that cannot be stored exits 1 and keeps the stored authorizer.OpenMetadataOperationsSecurityConfigTest,SystemRepository*,SettingsCache*,SamlIdpCertificateGateTest,SettingsWriteFunnelTest).SettingsSso,constants). ESLint and Prettier clean;yarn i18nleaves the locales unchanged.Backend integration tests
Playwright (UI) tests
Not run locally; the merge queue runs them.
UI screen recording:
Not applicable: localization of existing labels.
Checklist:
Fixes <issue-number>: <short explanation>(no issue)Fixes #<issue-number>above. (no issue)REVIEW.md; no 🔴 finding.docs/decisions/2026-11-23-a-settings-write-that-fails-is-thrown.md.

Confidence Score: 5/5
The PR appears safe to merge, with a non-blocking gap when a language file loads slowly.Findings
Summary
Makes failed settings writes throw instead of returning an error response that callers can ignore.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Read security configuration] --> B[Write authentication settings] B -->|Success| C[Log authentication updated] C --> D[Write authorizer settings] D -->|Success| E[Log authorizer updated] E --> F[Exit 0 and request restart] B -->|Failure| G[Log failure and exit 1] D -->|Failure| GReviews (6) · Last reviewed commit: "Take main's settings write failure handl..." · Reviewed by Greptile