← 输入框|github.com|刷新
Skip to content

[web-console] Fix duplicate key crash in the admin page owner lists - #7939

Merged
Karakatiza666 merged 1 commit into
mainfrom
fix-admin-owner-duplicates
Nov 11, 2026
Merged

Karakatiza666 merged 1 commit into
mainfrom
fix-admin-owner-duplicates

Conversation

@Karakatiza666

@Karakatiza666 Karakatiza666 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

The "Platform owners" section of the admin page crashed with each_key_duplicate on a deployment that has two owner trusts with the same issuer and subject. They differ only in audience values, and both are intended.

The owner and owner trust lists come from deploy-time config (--owners, --owner-trusts). The manager returns them as-is, without a duplicate check. The page keyed them as follows:

List Old key Problem
Owners owner An owner listed twice in config crashes the page.
Owner trusts issuer + subject Trusts that differ only by audience, or exact duplicate trusts, crash the page. String concatenation can also collide across different issuer and subject pairs.

The page now drops repeated entries before it renders the lists. The trust key is JSON.stringify([issuer, subject, audience]), so trusts that differ only by audience each get their own row.

Testing

A new test in AdminPage.svelte.spec.ts mounts the page with a repeated owner, two trusts that differ only by audience, and an exact repeat of one of those trusts. It checks that each distinct entry shows once.

  • Without the fix, the test fails with each_key_duplicate.
  • With only the old issuer + subject key put back, it also fails, so the test covers the audience case by itself.

@mythical-fred-oss

Copy link
Copy Markdown
Contributor

LGTM

Check Result
vitest --project client AdminPage.svelte.spec.ts 6/6 pass
Same spec with the .svelte fix reverted fails with each_key_duplicate, so the test catches the regression
svelte-check 0 errors
pre-commit run --files <changed> pass

feldera-pr-checks gates: test added for the changed behaviour, the test isn't flaky (it uses expect.poll with no sleeps), no deps/docs/API impact. The commit message is fine.

Deploy-time config can list the same owner or owner trust more than once,
and trusts that differ only by audience are valid. The keyed lists used
`issuer + subject` as the trust key, so such config crashed the page with
each_key_duplicate. Drop repeated entries and include the audience in the
trust key.

Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
@Karakatiza666
Karakatiza666 force-pushed the fix-admin-owner-duplicates branch from 98cc216 to 33fb2d7 Compare November 11, 2026 11:33
@Karakatiza666
Karakatiza666 added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit f938671 Nov 11, 2026
1 check passed
@Karakatiza666
Karakatiza666 deleted the fix-admin-owner-duplicates branch November 11, 2026 20:11
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.

2 participants