Skip to content

Report failed settings writes in update-security-config and translate the SAML settings form - #38484

Merged
manerow merged 4 commits into
mainfrom
fix/sso-config-save-fixes
Nov 23, 2026
Merged

manerow merged 4 commits into
mainfrom
fix/sso-config-save-fixes

Conversation

@manerow

@manerow manerow commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

No issue for this PR: two fixes found while testing PR #38315 end to end. Backports: PR #38486 (2.1), PR #38487 (2.0).

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).
  • The command exits 1 with the reason. It still writes the authentication, then the authorizer, and stops at the write that fails.
  • I checked every caller. REST endpoints answer a thrown 500 as before; the Collate admin jobs and the Slack and Teams installs already catch exceptions. Only the startup merge of default search settings relied on the silent failure; it now catches it and keeps the stored settings, as before.

2. Translate the whole SAML settings form

About 20 titles and help texts in SAML_UI_SCHEMA were English only. Each now uses i18next.t through a getter, like wantAssertionEncrypted, so the language is read when the form is built.

  • Reused label.entity-configuration. New keys (such as label.provider-entity-id, {{provider}} Entity ID for IdP and SP) have a real translation in all 21 locales.
  • The self-signup field gets a new label.enable-self-signup: the existing label.enable-sso reads "Enable SSO" in most locales.

Not here: an empty providerName blocking every security PATCH. Main and 2.1 already require it for custom OIDC only (PR #34961); the 2.0 backport carries that fix.

Release note: 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 exits 0 and stores both settings; a refused certificate exits 1 and changes nothing; an authorizer that cannot be stored exits 1 and keeps the stored one (this case exits 0 without the fix).
  • 209 backend tests pass (CLI, SystemRepository*, SettingsCache*, SystemResource*, SettingsWriteFunnelTest, SAML certificate tests).
  • UI: Jest 19 suites, 500 tests, with updated useSsoConfiguration.test.ts and SSOConfigurationForm.test.tsx. ESLint and Prettier clean; yarn i18n leaves the locales unchanged.

Backend integration tests

  • None changed. SystemResourceIT (64) and SsoSamlIdpCertificateIT (8) pass locally.

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; no actionable issues were found in this review.

Summary

The PR makes failed settings writes throw instead of returning an ignored error response.

  • Failed settings writes now reach callers instead of looking successful.
  • SAML form labels and help text follow the active language.

The change since the previous review only clarifies why the old exception handling missed failed writes. That explanation matches the code. No new actionable issues or repository-rule violations were found. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "Name why a failed settings write reached..." · Reviewed by Greptile

@manerow
manerow requested review from a team as code owners November 23, 2026 12:05
@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 1 closed / 1 findings

Changing failed settings writes to exceptions alters callers: security-config now exits nonzero instead of false success, while startup search merges catch failures and continue.

Makes update-security-config report failed settings writes as errors instead of printing success, and translates the SAML settings form labels and help text. No open issues found; the one dismissed backend claim is excluded as the author's explanation shows the fix addresses a real exception-type mismatch.

✅ 1 closed
Closed: Bug: Backend fix is a no-op: the base already threw; startup now swallows errors

📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/SystemRepository.java:552-563 📄 openmetadata-service/src/main/java/org/openmetadata/service/resources/settings/SettingsCache.java:831-843 📄 docs/decisions/2026-11-23-a-settings-write-that-fails-is-thrown.md:9-21 📄 openmetadata-service/src/test/java/org/openmetadata/service/util/OpenMetadataOperationsSecurityConfigTest.java:129-143
Before this PR, createOrUpdate could not return the 500 Response. updateSetting (SystemRepository.java:758-772) turns every non-WebApplicationException into a CustomExceptionMessage. That class extends WebServiceException, which extends WebApplicationException, so the old catch (... | WebApplicationException ex) { throw ex; } rethrew it and the catch (Exception) branch never ran. The old update-security-config also ended in catch (Exception e) { ... return 1; }, so a failed authorizer write already exited 1. So the claim that "this case exits 0 without the fix" is wrong, the new test is not a regression guard, and the Context section of the new ADR describes a bug that did not exist.

The one real behavior change is in SettingsCache.storeMergedSearchSettings. A failed write of the merged default search settings used to propagate and stop startup. Now it is logged and ignored. The ADR and the description call this keeping things "as before", which they are not. Either revert the SettingsCache catch, or keep it on purpose and correct the ADR to say startup now continues with the stored search settings. Also fix the ADR Context and the test Javadoc so they no longer claim the base returned 500 or exited 0.

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

@github-actions

Copy link
Copy Markdown
Contributor

UI browser tests

Ran: all test files (no impact map from main yet)

Result: ✅ 1070 passed · 154 skipped

Changed code executed by these browser tests: 1 / 22 lines (5%)

File Changed lines Executed %
src/constants/SSO.constant.ts 22 1 5%

@manerow
manerow merged commit 7f95b8c into main Nov 23, 2026
73 of 75 checks passed
@manerow
manerow deleted the fix/sso-config-save-fixes branch November 23, 2026 14:28
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.

3 participants