Skip to content

[2.1] Report failed settings writes in update-security-config and translate the SAML settings form - #38486

Merged
manerow merged 8 commits into
2.1from
fix/sso-config-save-fixes-2.1
Nov 23, 2026
Merged

manerow merged 8 commits into
2.1from
fix/sso-config-save-fixes-2.1

Conversation

@manerow

@manerow manerow commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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-config reported success when a save failed

SystemRepository.createOrUpdate answered a failed write with a 500 Response instead of throwing. The command ignored it and printed "updated": an authorizer without enableSecureSocketConnection was never stored, yet the command exited 0.

  • createOrUpdate now throws the failure (400 when the value is refused, 500 otherwise). update-security-config catches it, logs the reason and that only settings logged as updated were stored, and exits 1.
  • The command still writes the authentication, then the authorizer, and stops at the write that fails.
  • Callers checked as on main. Only the startup merge of default search settings relied on the silent failure; it now catches it and keeps the stored settings, as before.

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_SCHEMA uses i18next.t through a getter, with a real translation in all 21 locales, and the self-signup field gets label.enable-self-signup. The SAML form and its translation keys are now identical to main.

Not here: the empty providerName problem. 2.1 already requires it for custom OIDC only (PR #34961).

Release note (next 2.1 patch): update-security-config now 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:

  • Bug fix

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.
  • 122 backend tests pass (OpenMetadataOperationsSecurityConfigTest, SystemRepository*, SettingsCache*, SamlIdpCertificateGateTest, SettingsWriteFunnelTest).
  • UI: Jest 18 suites, 294 tests (SettingsSso, constants). ESLint and Prettier clean; yarn i18n leaves the locales unchanged.

Backend integration tests

  • Not applicable: no API change.

Playwright (UI) tests

Not run locally; the merge queue runs them.

UI screen recording:

Not applicable: localization of existing labels.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation> (no issue)
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above. (no issue)
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md; no 🔴 finding.
  • Decision check: adds docs/decisions/2026-11-23-a-settings-write-that-fails-is-thrown.md.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with a non-blocking gap when a language file loads slowly.

Findings

  1. P2 SAML labels stay in English ▶

Summary

Makes failed settings writes throw instead of returning an error response that callers can ignore.

  • Failed security settings writes now stop the command with an error.
  • The SAML settings form shows labels and help text in the selected language.

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| G
Loading

Reviews (6) · Last reviewed commit: "Take main's settings write failure handl..." · Reviewed by Greptile

@manerow
manerow requested review from a team as code owners November 23, 2026 12:06
@manerow
manerow requested review from harshach and removed request for a team November 23, 2026 12:06
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Changing 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 update-security-config exits 1 and reports the failure rather than printing success. The SAML settings form is also translated across all 21 locales. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@manerow
manerow merged commit c22b64b into 2.1 Nov 23, 2026
53 of 56 checks passed
@manerow
manerow deleted the fix/sso-config-save-fixes-2.1 branch November 23, 2026 16:43
Comment on lines +309 to +318
// 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');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 SAML labels stay in English

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant