Repository navigation
feat(admin): P2-1d upstream identity-provider registry console - #354
Conversation
- UpstreamProvidersPage: registry table (type badges: oidc vs the three config-seeded social rows), row enable/disable toggle, create modal (provider_key pattern-validated, advanced claims-mapping/endpoint- overrides JSON textareas with local validation), edit modal (key immutable, empty client_secret keeps the current one), delete with the shared confirm dialog spelling the link-survival semantics - write-only secret honored end to end (no secret text anywhere in the DOM; reserved-key CREATE rejection surfaces the server catalog 400 instead of a silent client-side guard) - router + nav (Upstream Providers) + en/zh-CN i18n - e2e: 6 specs (listing/badges/no-secret-in-DOM, exact create contract, reserved-key 400, edit keep-secret full-replace, toggle PUT body, confirm-then-delete) over an in-memory mock mirroring the server contract; full admin e2e suite 213 passed / 6 skipped; size gate OK
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bbd17a62c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| claims_mapping: claims, | ||
| endpoint_overrides: overrides, |
There was a problem hiding this comment.
Encode cleared advanced fields as empty JSON objects
When an administrator removes an existing claims mapping or endpoint override by clearing its textarea, parseOptionalJson() produces an empty string and this PUT reports success without removing the configuration. PostgresUpstreamProviderRepository::updateRecord() only updates those columns when the supplied strings are nonempty, so the old mappings or pinned endpoints remain active and reappear after refresh. Send '{}' for cleared advanced fields on update, or otherwise explicitly implement clearing, so removing an override actually restores discovery/default claim behavior.
Useful? React with 👍 / 👎.
Purpose
P2-1 batch D (final): the admin console UI for the OIDC-in upstream registry — the management surface P2-1a's CRUD shipped without.
What lands
UpstreamProvidersPage(/admin/upstream-providers, nav "Upstream Providers", en/zh-CN):oidcvssocialfor the three config-seeded legacy rows) / issuer / row-level enable toggle / edit & delete.openid profile email, advanced JSON textareas (claims mapping, endpoint overrides) with local object validation so a typo gets an inline message instead of the server's 400 envelope.Tests
6 new e2e specs over an in-memory mock that mirrors the server contract (write-only secret, reserved-key 400, 404 on unknown PUT): listing + type badges + no-secret-in-DOM, exact create request body, reserved-key error surfacing, edit keep-secret full-replace body, toggle PUT body, confirm-then-delete. Full admin e2e suite: 213 passed / 6 skipped; admin size gate OK (488.2/501.6 KB).
With this, P2-1 (OIDC-in 通用上游联邦) is fully delivered: registry + protocol (#347), real-upstream Keycloak E2E (#349), legacy-social migration onto the registry (#352), and the admin console (this PR).