feat(OIDC): API Access tab with trust relationships UI#8044
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Docker builds report
|
f52d48d to
897e6b5
Compare
a9bf1ff to
5478a2a
Compare
5478a2a to
b88bd0c
Compare
897e6b5 to
ac0eb55
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
Visual Regression19 screenshots compared. See report for details. |
ac0eb55 to
f3d09e9
Compare
b88bd0c to
b767571
Compare
c920f26 to
83c6bd9
Compare
11cd374 to
2d8d889
Compare
83c6bd9 to
8a8c79c
Compare
8a8c79c to
153457d
Compare
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
…s UI The organisation settings API Keys tab becomes API Access and gains a Trust Relationships section behind the trust_relationships feature flag: list, create, edit and delete, with a claim-rules editor and the same admin toggle and RBAC role assignment flow as master API keys, attached via the backing key. Also fixes two latent request types in the master API key role services. beep boop
The GitHub/Other provider cards were div+onClick only, so keyboard and screen-reader users could not start the create flow. Add role="button", tabIndex and an Enter/Space onKeyDown handler. beep boop
addRole/removeRole mutated local role state unconditionally and never inspected the request result, so a failed assignment left the UI showing a role the backend never stored, with no error surfaced. Update local state only on success and toast on failure; also flag when role assignment fails during creation instead of silently swallowing it. beep boop
Adopt the component-folder layout the frontend guideline expects: every new component now lives in its own directory with an index.ts barrel (ComponentName/ComponentName.tsx + index.ts). providers.ts and errors.ts stay as flat modules, being exempt constants/util. Cross-component imports use the components/ alias, as the import-alias lint rule requires for parent-traversal paths; APIKeysTab keeps importing the tab via the unchanged ./trust-relationships path. beep boop
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #18528 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-16 — run #18528 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-16 — run #18528 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #18528 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
|
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to #8040
In this PR, we add a Trust relationships management UI.
The organisation settings "API Keys" tab is renamed to "API Access" and gains a Trust Relationships section, gated by the
trust_relationshipsfeature flag.Tabs now pass their stable key as the slug, and the label-derived legacy slug
?tab=api-keysredirects, like?tab=samlalready did.Creation is preset-based: a provider chooser offers "GitHub Actions" or a freeform "Other OIDC provider", kept for other providers and self-hosted issuers. The GitHub form asks for a repository, picked from the org's GitHub integration if configured, or typed manually otherwise, plus an optional environment. The audience is auto-derived:
https://github.com/<owner>(GitHub's zero-config default) for the first trust relationship per owner, a repo-scoped value once the default is taken.A YAML snippet for
Flagsmith/setup-cliaction is presented in create/edit modals for GitHub trust relationships.The "Is Admin" toggle is now accompanied by "available in enterprise" banner both for Master API Keys and Trust relationships.
Built in the modern RTK style (new
useTrustRelationshipservice, typed requests/responses) rather than extending the legacyAdminAPIKeys.js. Also fixes two latent types surfaced by typed usage:createRoleMasterApiKeywas missing itsbody, and thedeleteMasterAPIKeyWithMasterAPIKeyRoleshelper was annotated with the wrong request type.How did you test this code?
Locally, by hand; no new E2E tests yet.
Screenshots
Trust relationships list:

New trust relationship provider chooser:

GitHub modal:

GitHub setup snippet:

Generic provider modal:
