Skip to content

OSAC-3382: add identity provider list page - #117

Merged
openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
rawagner:OSAC-3382
Aug 4, 2026
Merged

OSAC-3382: add identity provider list page#117
openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
rawagner:OSAC-3382

Conversation

@rawagner

@rawagner rawagner commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Wire the IdP list page using the public IdentityProviders service with status labels, type column, search filtering, and empty states. Export public IdP types from @osac/types barrel. Make TenantIdFromToken deterministic by sorting org IDs and fix TenantDeleteConfirmModal formatting.

Assisted-by: Claude Code noreply@anthropic.com

Screenshot From 2026-08-03 17-08-43

Summary by CodeRabbit

  • New Features

    • Added an identity provider management page with search, status, type, and creation details.
    • Added navigation and routing for identity provider managers.
    • Added localized labels, messages, and empty states for identity provider management.
  • Bug Fixes

    • Restricted tenant administration navigation to the appropriate role.
    • Updated the default landing page for identity provider managers.

@openshift-ci-robot

openshift-ci-robot commented Aug 3, 2026

Copy link
Copy Markdown

@rawagner: This pull request references OSAC-3382 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Wire the IdP list page using the public IdentityProviders service with status labels, type column, search filtering, and empty states. Export public IdP types from @osac/types barrel. Make TenantIdFromToken deterministic by sorting org IDs and fix TenantDeleteConfirmModal formatting.

Assisted-by: Claude Code noreply@anthropic.com

Screenshot From 2026-08-03 17-08-43

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@rawagner, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 34 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3b81d885-ef23-48f7-a47a-150560e550f8

📥 Commits

Reviewing files that changed from the base of the PR and between 1e920da and 8483111.

📒 Files selected for processing (14)
  • apps/app-frontend/src/shell/AppShell.tsx
  • apps/app-frontend/src/shell/shellNav.test.ts
  • apps/app-frontend/src/shell/shellNav.ts
  • apps/app-frontend/src/shell/shellRoutes.test.ts
  • apps/app-frontend/src/shell/shellRoutes.ts
  • libs/i18n/locales/en/translation.json
  • libs/types/src/index.ts
  • libs/ui-components/src/api/types.ts
  • libs/ui-components/src/api/v1/identity-provider.test.ts
  • libs/ui-components/src/api/v1/identity-provider.ts
  • libs/ui-components/src/components/IdentityProvider/IdentityProviderListPage.test.tsx
  • libs/ui-components/src/components/IdentityProvider/IdentityProviderListPage.tsx
  • libs/ui-components/src/components/IdentityProvider/IdentityProviderStatusLabel.tsx
  • libs/ui-components/src/test-utils/createMockConnectTransport.ts

Walkthrough

Adds identity provider listing, localized status and search UI, mock API support, and tenant role routing to /tenant/identity-provider.

Changes

Identity provider management

Layer / File(s) Summary
Identity provider API and test transport
libs/types/src/index.ts, libs/ui-components/src/api/..., libs/ui-components/src/test-utils/...
Adds identity provider protobuf exports, the v1/identity_providers route, useIdentityProviders, fixtures, and mock service methods.
Identity provider list page
libs/ui-components/src/components/IdentityProvider/..., libs/i18n/locales/en/translation.json, libs/ui-components/src/api/v1/identity-provider.test.ts
Adds the localized list page, status mapping, search filtering, loading and empty states, table rendering, and tests.
Tenant shell integration
apps/app-frontend/src/shell/...
Adds the tenant route and navigation for tenant-idp-manager and updates default-route and navigation tests.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TenantUser
  participant AppShell
  participant IdentityProviderListPage
  participant useIdentityProviders
  participant IdentityProvidersAPI
  TenantUser->>AppShell: open /tenant/identity-provider
  AppShell->>IdentityProviderListPage: render page
  IdentityProviderListPage->>useIdentityProviders: request providers
  useIdentityProviders->>IdentityProvidersAPI: list providers
  IdentityProvidersAPI-->>useIdentityProviders: return provider items
  useIdentityProviders-->>IdentityProviderListPage: provide items
  IdentityProviderListPage-->>TenantUser: render searchable provider table
Loading

Possibly related PRs

Suggested reviewers: alosadagrande, batzionb

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the identity provider list page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Hardcoded-Secrets ✅ Passed Comprehensive inspection of 14 modified files reveals no hardcoded API keys, tokens, passwords, private keys, embedded credentials in URLs, or suspicious base64 strings. Test files contain only pro...
No-Weak-Crypto ✅ Passed The 14-file patch contains no MD5, SHA1, DES, RC4, Blowfish, ECB, crypto APIs, custom crypto, or secret/token comparisons; it only fetches and renders identity-provider data.
No-Injection-Vectors ✅ Passed No injection vectors detected. Code uses safe filtering via .includes(), type-safe API routing, and no dangerous patterns (SQL concat, eval, pickle, yaml.load, dangerouslySetInnerHTML, shell=True...
Container-Privileges ✅ Passed The PR changes no container or Kubernetes privilege settings. No added privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation entries are present.
No-Sensitive-Data-In-Logs ✅ Passed No logging statements found in any modified files. Identity provider data is handled safely, displaying only metadata (name, status, type, creation timestamp). No passwords, tokens, API keys, PII,...
Ai-Attribution ✅ Passed The PR head commit includes Assisted-by: Claude Code <noreply@anthropic.com> and has no AI Co-Authored-By trailer.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rawagner
rawagner force-pushed the OSAC-3382 branch 2 times, most recently from 9175458 to 09db0a3 Compare August 4, 2026 06:45
description={t('Manage identity providers for your tenant.')}
error={error}
actions={
<Button variant="primary" isDisabled>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is always disabled by purpose? will be implemented in another pr?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the create flow will be implemented in separate PR and that is when the button gets enabled :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this page is under components/IdentityProvider/ instead of pages/tenant/ ?

@rawagner rawagner Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually i would like to go away from this page/<role> pattern. There will be pages that are not role specific (or shared among X roles).

i'd much rather go with components/<resource> where you would have all list/create/other pages related to that resource.

const resolveIdpType = (configCase: string | undefined): string => {
switch (configCase) {
case 'oidc':
return 'OIDC';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to use t() functions here maybe?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, added t.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@libs/ui-components/src/api/v1/identity-provider.ts`:
- Around line 7-12: Update libs/ui-components/src/api/v1/identity-provider.ts
(lines 7-12) in the useIdentityProviders hook to extract the active tenant
context and pass a tenant-scoped filter in the params before calling
client.list(params), ensuring IdentityProviders.List receives the
metadata.tenant constraint (unless public.v1.IdentityProviders already derives
scope from authentication context). Then update
libs/ui-components/src/test-utils/createMockConnectTransport.ts (lines 212-217)
to apply the same req.filter tenant-scope validation to the fixture results so
tests verify tenant-scope filtering is working correctly.

In
`@libs/ui-components/src/components/IdentityProvider/IdentityProviderListPage.tsx`:
- Around line 41-43: Update IdentityProviderListPage’s provider-name handling so
filtering and table rendering use the same shared display-name helper, falling
back to idp.metadata?.name consistently instead of idp.id when spec.title is
absent. Add a test fixture lacking spec.title but containing metadata.name, and
verify searching by that displayed name returns the provider.

In
`@libs/ui-components/src/components/IdentityProvider/IdentityProviderStatusLabel.tsx`:
- Around line 15-42: Replace identityProviderPhaseMap and its phaseMap lookup in
IdentityProviderStatusLabel with a switch on phase that returns the
corresponding StatusLabelProps for READY, ERROR, UNKNOWN, and UNSPECIFIED; use
the unspecified label in the default branch, including undefined or unmapped
values, and invoke translations only for the selected case.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ab66338d-cafa-4c9f-a8f8-8f9c81dd7c56

📥 Commits

Reviewing files that changed from the base of the PR and between dc72483 and 1e920da.

📒 Files selected for processing (14)
  • apps/app-frontend/src/shell/AppShell.tsx
  • apps/app-frontend/src/shell/shellNav.test.ts
  • apps/app-frontend/src/shell/shellNav.ts
  • apps/app-frontend/src/shell/shellRoutes.test.ts
  • apps/app-frontend/src/shell/shellRoutes.ts
  • libs/i18n/locales/en/translation.json
  • libs/types/src/index.ts
  • libs/ui-components/src/api/types.ts
  • libs/ui-components/src/api/v1/identity-provider.test.ts
  • libs/ui-components/src/api/v1/identity-provider.ts
  • libs/ui-components/src/components/IdentityProvider/IdentityProviderListPage.test.tsx
  • libs/ui-components/src/components/IdentityProvider/IdentityProviderListPage.tsx
  • libs/ui-components/src/components/IdentityProvider/IdentityProviderStatusLabel.tsx
  • libs/ui-components/src/test-utils/createMockConnectTransport.ts

Comment on lines +7 to +12
export const useIdentityProviders = (params: ListParams = {}) => {
const client = useApiFetch(IdentityProviders);
return useApiQuery({
queryKey: apiQueryKey('v1/identity_providers', undefined, params),
queryFn: () => client.list(params),
select: (data) => data.items,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 4 'export type ListParams|useIdentityProviders\s*\(' libs apps
rg -n -C 4 'IdentityProviders.*list|metadata\.tenant|IdentityProvidersList' libs

Repository: osac-project/osac-ui

Length of output: 17403


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## Candidate files"
git ls-files | rg 'libs/ui-components/src/(api/v1/identity-provider|api/types|components/IdentityProvider/IdentityProviderListPage|test-utils/createMockConnectTransport).*\.(ts|tsx)$' || true

echo "## identity-provider.ts"
cat -n libs/ui-components/src/api/v1/identity-provider.ts

echo "## api/types relevant"
cat -n libs/ui-components/src/api/types.ts | sed -n '70,115p'

echo "## IdentityProviderListPage"
cat -n libs/ui-components/src/components/IdentityProvider/IdentityProviderListPage.tsx

echo "## createMockConnectTransport relevant"
cat -n libs/ui-components/src/test-utils/createMockConnectTransport.ts | sed -n '190,230p'

echo "## identity-provider tests relevant"
cat -n libs/ui-components/src/api/v1/identity-provider.test.ts | sed -n '1,90p'

Repository: osac-project/osac-ui

Length of output: 10281


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## IdentityProviders usage across ui-components"
rg -n -C 3 'IdentityProviders|identityProviders|metadata\.tenant|useActive|activeTenant|useTenant|tenant' libs/ui-components/src --glob '*.ts' --glob '*.tsx' || true

echo "## createMockConnectTransport setup"
cat -n libs/ui-components/src/test-utils/createMockConnectTransport.ts | sed -n '1,140p'
cat -n libs/ui-components/src/test-utils/createMockConnectTransport.ts | sed -n '230,340p'

Repository: osac-project/osac-ui

Length of output: 50376


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## IdentityProviderListPage.test.tsx"
cat -n libs/ui-components/src/components/IdentityProvider/IdentityProviderListPage.test.tsx | sed -n '1,120p'

echo "## createMockConnectTransport header/defaults"
cat -n libs/ui-components/src/test-utils/createMockConnectTransport.ts | sed -n '1,90p'

Repository: osac-project/osac-ui

Length of output: 7376


Preserve tenant scope for identity-provider lists.

IdentityProviders.List uses metadata.tenant to scope identity providers, but IdentityProviderListPage calls useIdentityProviders() with no filters, so the hook sends an unscoped list request.

  • libs/ui-components/src/api/v1/identity-provider.ts#L7-L12: pass filter: 'metadata.tenant == "<tenant>"' from the active tenant context before calling client.list(params), unless public.v1.IdentityProviders already derives scope from authentication context and always returns only the caller’s tenant.
  • libs/ui-components/src/test-utils/createMockConnectTransport.ts#L212-L217: apply the same req.filter/tenant scope to fixture results so tests catch tenant-scope regressions.
📍 Affects 2 files
  • libs/ui-components/src/api/v1/identity-provider.ts#L7-L12 (this comment)
  • libs/ui-components/src/test-utils/createMockConnectTransport.ts#L212-L217
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@libs/ui-components/src/api/v1/identity-provider.ts` around lines 7 - 12,
Update libs/ui-components/src/api/v1/identity-provider.ts (lines 7-12) in the
useIdentityProviders hook to extract the active tenant context and pass a
tenant-scoped filter in the params before calling client.list(params), ensuring
IdentityProviders.List receives the metadata.tenant constraint (unless
public.v1.IdentityProviders already derives scope from authentication context).
Then update libs/ui-components/src/test-utils/createMockConnectTransport.ts
(lines 212-217) to apply the same req.filter tenant-scope validation to the
fixture results so tests verify tenant-scope filtering is working correctly.

Comment on lines +41 to +43
return identityProviders.filter((idp) => {
const title = idp.spec?.title ?? idp.id;
return title.toLowerCase().includes(lowerSearch);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Filter by the displayed provider name.

The table falls back to idp.metadata?.name on Line 93, but the filter falls back directly to idp.id. A provider without spec.title is visible by metadata.name but a search for that name returns no result.

Use one shared display-name helper for filtering and rendering. Add a test fixture with no spec.title and a populated metadata.name.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@libs/ui-components/src/components/IdentityProvider/IdentityProviderListPage.tsx`
around lines 41 - 43, Update IdentityProviderListPage’s provider-name handling
so filtering and table rendering use the same shared display-name helper,
falling back to idp.metadata?.name consistently instead of idp.id when
spec.title is absent. Add a test fixture lacking spec.title but containing
metadata.name, and verify searching by that displayed name returns the provider.

Wire the IdP list page using the public IdentityProviders service with
status labels, type column, search filtering, and empty states. Export
public IdP types from @osac/types barrel. Make TenantIdFromToken
deterministic by sorting org IDs and fix TenantDeleteConfirmModal
formatting.

Assisted-by: Claude Code <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added the lgtm label Aug 4, 2026
@openshift-ci

openshift-ci Bot commented Aug 4, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ElayAharoni, rawagner

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [ElayAharoni,rawagner]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 1a35ae9 into osac-project:main Aug 4, 2026
7 checks passed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, new persona should not be added at this stage (avoid complexity at init point)
please use tenant admin

@liatb-rh liatb-rh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid adding new persona to ui, use tenant admin. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants