Skip to content

fix(platform): surface unreadable SSO configuration - #4264

Merged
yannickmonney merged 2 commits into
mainfrom
fix/malformed-sso-config
Oct 11, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
fix/malformed-sso-config

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What changed:

  • Preserve the missing-file state while distinguishing malformed or inaccessible SSO connection files.
  • Return the existing sso_config_unreadable 409 contract with a sanitized repair message.
  • Show a repair banner instead of the blank Enterprise SSO form and add backend/UI regressions.

How verified:

  • bunx oxfmt --check on all changed files
  • targeted bunx oxlint --type-aware on all changed files
  • commit hooks: conflict-marker check, formatter, and local OpenGrep passed
  • Vitest attempted for backend and UI regressions, but the checkout dependencies prevent startup (z.enum is undefined and Storybook file: preset resolution fails).

Closes #3670

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Independent review — ACCEPT at exact head 6e94b8e8e0097d3f852b98e0cbc223c3fd1e3d93

Evidence:

  • services/platform/backend/domains/sso/config.ts now preserves not_found as the unconfigured state and throws SsoConnectionReadError for malformed, inaccessible, oversized, symlinked, or otherwise unreadable saved configuration.
  • services/platform/backend/domains/sso/admin.ts maps that error to the existing sanitized sso_config_unreadable HTTP 409 contract; the response contains only the organization slug and repair guidance, not parser/file contents or secrets.
  • enterprise-sso-settings.tsx uses failureDetail(error) and renders the repair alert instead of the blank setup form.
  • The shared reader controls pass locally: bunx vitest run backend/core/lib/config_store/read_domain_file.test.ts --maxWorkers=1 — 8/8 passed, including absent-file not_found, malformed YAML, schema failure, symlink refusal, and JSON fallback controls.
  • Changed files pass bunx oxfmt --check and targeted bunx oxlint --type-aware; git diff --check is clean.

Unrun / blockers:

  • The focused backend SSO suite and UI regression suite could not collect in this checkout: Vitest reports z.enum/z.number undefined from the installed dependency graph; the server config also reports unresolved Storybook file: preset resolution. No assertion result is claimed for those suites.
  • Therefore the new admin regression, the UI repair-state regression, the valid-connection/unauthorized-write controls, and the same regression replayed on origin/main remain unrun here. CI was not rerun, cancelled, or awaited.
  • No code blocker found in the reviewed diff. No merge, push, or task/card move performed.

@yannickmonney
yannickmonney force-pushed the fix/malformed-sso-config branch from 6e94b8e to 7fdad8b Compare October 11, 2026 04:12
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
@yannickmonney
yannickmonney force-pushed the fix/malformed-sso-config branch from 32b4623 to a52fd68 Compare October 11, 2026 16:52
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit dcf4a6a Oct 11, 2026
@yannickmonney
yannickmonney deleted the fix/malformed-sso-config branch October 11, 2026 19:21
tale-review-bot pushed a commit that referenced this pull request Oct 30, 2026
Three settings pages lost a failed read. Teams kept its table skeleton
forever, Notifications showed every switch on, and Enterprise SSO
showed a blank form, or, since #4264, an English "needs repair" alert
for any failure, a 5xx included. None of them offered Try again.

Teams hands useOrgTeams' error and a retry to the list's data source,
so a failed first read is the table's error state with Try again, as
on the other collection screens (useListReadRecovery). Rows a failed
refresh left stay on screen, and settings.teams.refreshFailed names the
failure above them. useOrgTeams now also returns its error.

Notifications shows no switch until the read answers. It stays masked
while the read loads, or while an offline browser holds it back, which
isLoading missed. A failed read shows notificationPreferences.loadFailed
with Try again. A failed refresh keeps the switches under refreshFailed.

Enterprise SSO tells a failed read apart from loading with readStateOf.
A failed read shows settings.enterpriseSso.loadFailed, then what the
failure says about itself (an unreadable connection.yml's repair
sentence), with Try again and no form. A failed refresh keeps the form,
and any edit in it, under refreshFailed. The form takes a sectionRef
for the focus handoff.

Each notice is CatalogLoadError over readStateOf. It holds through a
retry and hands its focus to the section when it goes. The strings
ship in en, de and fr. The new specs drive the real hooks, adapter rows
and retry policy over a synthetic 503 or 409.

Task: TALE-106
Closes #4653
tale-code-bot added a commit that referenced this pull request Oct 30, 2026
Three settings pages lost a failed read. Teams kept its table skeleton
forever, Notifications showed every switch on, and Enterprise SSO
showed a blank form, or, since #4264, an English "needs repair" alert
for any failure, a 5xx included. None of them offered Try again.

Teams hands useOrgTeams' error and a retry to the list's data source,
so a failed first read is the table's error state with Try again, as
on the other collection screens (useListReadRecovery). Rows a failed
refresh left stay on screen, and settings.teams.refreshFailed names the
failure above them. useOrgTeams now also returns its error.

Notifications shows no switch until the read answers. It stays masked
while the read loads, or while an offline browser holds it back, which
isLoading missed. A failed read shows notificationPreferences.loadFailed
with Try again. A failed refresh keeps the switches under refreshFailed.

Enterprise SSO tells a failed read apart from loading with readStateOf.
A failed read shows settings.enterpriseSso.loadFailed, then what the
failure says about itself (an unreadable connection.yml's repair
sentence), with Try again and no form. A failed refresh keeps the form,
and any edit in it, under refreshFailed. The form takes a sectionRef
for the focus handoff.

Each notice is CatalogLoadError over readStateOf. It holds through a
retry and hands its focus to the section when it goes. The strings
ship in en, de and fr. The new specs drive the real hooks, adapter rows
and retry policy over a synthetic 503 or 409.

Task: TALE-106
Closes #4653
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.

bug(platform): malformed SSO configuration is shown as an unconfigured connection

1 participant