Skip to content

fix(platform): preserve OIDC claim mappings on save - #4212

Merged
yannickmonney merged 2 commits into
mainfrom
fix/preserve-oidc-claim-mappings
Oct 13, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
fix/preserve-oidc-claim-mappings

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What changed

  • Seed existing OIDC claim mappings into the Enterprise SSO form state.
  • Include those mappings in OIDC upsert payloads so unrelated edits do not erase them.
  • Add a regression test for renaming a Generic OIDC connection.

Verification

  • Targeted Oxlint passed.
  • Formatting and conflict-marker checks passed via commit hooks.
  • Focused Vitest is blocked before collection by the environment dependency runtime error: z.number is undefined in packages/shared/src/schemas/epoch-ms.ts.

Closes #3669

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Independent verdict: request changes (recorded as comment because this credential cannot formally review its own PR).\n\nExact head reviewed: . The implementation source path is directionally correct: it seeds and includes in the OIDC upsert, while the backend still distinguishes omitted mappings from an explicit empty object.\n\nBlocking finding: the new Generic OIDC regression test itself fails under installed Node. The connected fixture omits from the read view and defaults to , so Save stays disabled and is called 0 times. Evidence: at this head: 1 failed, 39 passed, failure at . On , the same full SSO form file passed 39/39 (the new regression is absent). Targeted Oxlint and pass.\n\nCI was read fresh: all five checks remain pending; no rerun or cancellation. Please seed the revealed client ID in the new test (or otherwise make the connected fixture saveable) and rerun the focused suite. No secret was exposed; no IdP, browser, E2E, stack, container, or production test was run.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Correction to the immediately preceding comment: shell quoting mangled inline backticks in that comment. The authoritative verdict is below.

Independent verdict: request changes (recorded as a comment because this credential cannot formally review its own PR).

Exact head reviewed: c4e074d79d4e14d7f2cc824ae6883fd0da64e8b2. The implementation source path is directionally correct: it seeds config.oidc.claimMappings and includes values.claimMappings in the OIDC upsert, while the backend still distinguishes omitted mappings from an explicit empty object.

Blocking finding: the new Generic OIDC regression test itself fails under installed Node. The connected fixture omits clientId from the read view and revealClientIdMock defaults to null, so Save stays disabled and upsertOidcMock is called 0 times. Evidence: /opt/node/bin/node node_modules/vitest/vitest.mjs run --config vitest.ui.config.ts app/features/settings/enterprise-sso/components/enterprise-sso-form.test.tsx --maxWorkers=1 --reporter=verbose at this head: 1 failed, 39 passed, failure at enterprise-sso-form.test.tsx:284. On origin/main, the same full SSO form file passed 39/39 (the new regression is absent). Targeted Oxlint and git diff --check pass.

CI was read fresh: all five checks remain pending; no rerun or cancellation. Please seed the revealed client ID in the new test (or otherwise make the connected fixture saveable) and rerun the focused suite. No secret was exposed; no IdP, browser, E2E, stack, container, or production test was run.

Tale Bot and others added 2 commits October 13, 2026 12:28
A stored connection's view omits the client id and the form requires it,
so Save stayed disabled and the save never reached upsertOidc. Seed the
reveal and wait for Save to enable, as the sibling save tests do.
@yannickmonney
yannickmonney force-pushed the fix/preserve-oidc-claim-mappings branch from c4e074d to bf1d158 Compare October 13, 2026 10:34
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 13, 2026
@yannickmonney
yannickmonney removed this pull request from the merge queue due to a manual request Oct 13, 2026
@yannickmonney
yannickmonney merged commit d9e57c9 into main Oct 13, 2026
@yannickmonney
yannickmonney deleted the fix/preserve-oidc-claim-mappings branch October 13, 2026 12:16
tale-review-bot pushed a commit that referenced this pull request Oct 30, 2026
The v0.5.89 notes said the upgrade needs no database migration or
manual configuration change and described only the native CLI fix.
The release adds migration 0204_usage_ledger_provider.sql, moves the
API contract from 3.43.0 to 3.44.0, and turns coding-agent sign-in on
by default, although the v0.5.88 notes said it stays off unless an
operator turns it on.

The Upgrade notes now name the migration, applied at boot, and the
contract version. They say that sign-in is on by default, which public
surfaces that opens, what it needs, and the two switches that keep
agents on API keys, with a pointer to the v0.5.90 notes that repeat
it. They also name what else asks something of an operator: the two
sandbox settings of #4169 that behave differently, the model-access
rules without a target that block model-access changes since #4216,
and the OIDC claim mappings that form saves before #4212 removed.

The Highlights add agent sign-in, the Connected agents settings page,
trigger readiness in the automations list and agent runs in a task's
activity. A last bullet says the notes were corrected after
publication. The published Release body is not changed by this
commit; a person edits it.

Closes #4970
Task: TALE-199
tale-code-bot added a commit that referenced this pull request Oct 31, 2026
The v0.5.89 notes said the upgrade needs no database migration or
manual configuration change and described only the native CLI fix.
The release adds migration 0204_usage_ledger_provider.sql, moves the
API contract from 3.43.0 to 3.44.0, and turns coding-agent sign-in on
by default, although the v0.5.88 notes said it stays off unless an
operator turns it on.

The Upgrade notes now name the migration, applied at boot, and the
contract version. They say that sign-in is on by default, which public
surfaces that opens, what it needs, and the two switches that keep
agents on API keys, with a pointer to the v0.5.90 notes that repeat
it. They also name what else asks something of an operator: the two
sandbox settings of #4169 that behave differently, the model-access
rules without a target that block model-access changes since #4216,
and the OIDC claim mappings that form saves before #4212 removed.

The Highlights add agent sign-in, the Connected agents settings page,
trigger readiness in the automations list and agent runs in a task's
activity. A last bullet says the notes were corrected after
publication. The published Release body is not changed by this
commit; a person edits it.

Closes #4970
Task: TALE-199
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): saving OIDC SSO settings erases stored claim mappings

1 participant