Skip to content

bug(platform): one organization's unreadable SSO connection.yml breaks SSO sign-in discovery for every organization (regression from #4264) #4826

Closed

Description

@yannickmonney

Problem

Since #4264 (dcf4a6ad9, merged 2026-10-11 17:02Z, not in any release yet), one organization's unreadable SSO configuration breaks SSO sign-in discovery for every organization on the deployment.

What changed: readSsoConnection (backend/domains/sso/config.ts:45-66) used to return null for any unreadable connection.yml (if (!result.ok) return null;). It now throws SsoConnectionReadError for every failure except not_found (:57-63). That suits the organization's own settings page, which admin.ts:477 maps to a 409. But three loops call it once per organization, with no catch:

Loop (config.ts) Caller Result when any one organization's file is unreadable
getSsoDiscoveryStatus :95-126 public GET /discovery/configured (admin-routes.ts:71-73) the request fails
listSelectableSsoConnections :130-156 public GET /discovery/selectable (admin-routes.ts:74-76) the request fails
loadSingleEnabled :73-87 resolveSignInConfig / resolveSamlConfig without an organization (:158-165, the single-org sign-in path) the sign-in config can't be resolved

On the login page (routes/_auth/log-in.tsx):

How a file becomes unreadable: a hand edit, a partial write, a file over MAX_FILE_SIZE_BYTES, or an upgrade whose validateSsoConnectionData refuses an older file. In each case the users of every other organization lose SSO sign-in, and nothing on their side explains why. Password sign-in is unaffected.

No test covers this. admin-routes.discovery.test.ts has no case for an unreadable file in another organization.

Expected

  • The all-organization loops skip, and log once, a connection that can't be read, as they did before fix(platform): surface unreadable SSO configuration #4264. Only that organization's own settings page reports it (the existing 409 sso_config_unreadable).

  • Regression: with two organizations, one healthy and one whose connection.yml fails validation:

    • /discovery/configured reports the healthy one as enabled;
    • /discovery/selectable lists it;
    • an org-less sign-in config still resolves for a single healthy connection.

    On aec031867 all three fail.

Severity and owner

Activity

  1. yannickmonney commented on Oct 12, 2026

    @yannickmonney
    ContributorAuthor

    Still on main before the next release (Review A, TALE-358, 2026-10-12 16:15 Zurich occurrence; read at 14:16–14:17Z).

    • Unchanged: backend/domains/sso/config.ts at main 4cde0834a is the same as when this issue was filed. The all-organization loops still don't catch SsoConnectionReadError, and no fix PR is linked.
    • Close to release: the v0.5.87 notes are merged (docs: publish Tale v0.5.87 release notes #4848, .github/release-notes/v0.5.87.md) and v0.5.87 isn't published yet. As things stand, v0.5.87 would be the first release to ship this regression from fix(platform): surface unreadable SSO configuration #4264. The notes don't mention it.
    • Ask: fix this before v0.5.87 is cut, or add a known-limitation line to its Upgrade notes saying that one unreadable SSO connection file hides SSO sign-in for every organization.
  2. yannickmonney commented on Oct 12, 2026

    @yannickmonney
    ContributorAuthor

    Review A recheck (TALE-358, 2026-10-12 20:15 Zurich occurrence): fixed on main c94f1fd84. I read the merged source statically and checked the CI run on that exact commit; no live stack was used.

    • All four cross-organization loops now skip an unreadable connection: otherOrgsHaveEnabledConnections (backend/domains/sso/admin.ts:459), loadSingleEnabled (config.ts:96), getSsoDiscoveryStatus (:122) and listSelectableSsoConnections (:159). Each calls readSsoConnectionForDiscovery, which swallows only SsoConnectionReadError (config.ts:71-81).
    • Single-organization reads stay strict, matching the new SSO-R18: config.ts:178, :226, admin.ts:476 and connectors/sso-reuse.ts:43. No other caller loops over organizations with the strict reader.
    • Regression proof: admin-routes.discovery.test.ts (35 tests) ran uncached and passed in main's Checks run 38287683781 (job "Unit (platform 2/2)", 114939862107, turbo MISS).
    • v0.5.87 notes, minor: they list this as a fix (.github/release-notes/v0.5.87.md:11). As this issue noted, the regression came with fix(platform): surface unreadable SSO configuration #4264 after the v0.5.86 tag, so people upgrading from v0.5.86 never saw it. Consider dropping the bullet or saying it fixes a regression in unreleased code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions