Skip to content

Conversation

@chadcrum
Copy link
Contributor

@chadcrum chadcrum commented Jan 15, 2026

Summary

Add comprehensive RBAC e2e tests for the Orchestrator plugin covering workflow and instance access control.

Changes

New: orchestrator-rbac.spec.ts (28 tests)

  • Global workflow permissions - read-write, read-only, and denied access
  • Individual workflow permissions - workflow-specific access controls
  • Instance access isolation - users see only their own workflow instances
  • Admin override - instanceAdminView grants access to all instances

Modified: rbac.spec.ts

  • Re-enabled RBAC API validation test (previously test.fixme)
  • Added filtering for dynamically created workflow roles to prevent test interference

Modified: orchestrator.ts (support page)

  • Added timeout parameters for RBAC permission propagation delay

Permissions Tested

Permission Description
orchestrator.workflow View all workflows
orchestrator.workflow.use Execute all workflows
orchestrator.workflow.<id> View specific workflow
orchestrator.workflow.use.<id> Execute specific workflow
orchestrator.instanceAdminView View all workflow instances (admin)

Testing

  • Validated on OCP Helm nightly jobs (28/28 tests passing)
  • Validated on OCP Operator nightly jobs
  • Tests skip appropriately on OSD-GCP and GKE (orchestrator not deployed)

Note

#4140 fixes the pre-existing flaky rbac tests, so there should be no issue re-enabling them.


Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

@chadcrum
Copy link
Contributor Author

/ok-to-test

@chadcrum
Copy link
Contributor Author

/test e2e-ocp-helm

@github-actions
Copy link
Contributor

The image is available at:

/test e2e-ocp-helm

@chadcrum
Copy link
Contributor Author

/test e2e-ocp-operator-nightly

@chadcrum chadcrum changed the title test: add e2e orchestrator rbac tests test(e2e): add orchestrator RBAC e2e tests Jan 15, 2026
@chadcrum
Copy link
Contributor Author

/test e2e-ocp-operator-nightly

@chadcrum
Copy link
Contributor Author

/retest-required

@github-actions
Copy link
Contributor

The image is available at:

/test e2e-ocp-helm

@github-actions
Copy link
Contributor

This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 21 days.

@github-actions github-actions bot added the Stale label Jan 23, 2026
@chadcrum chadcrum force-pushed the add-e2e-orchestrator-rbac-tests-rhdh-1-9 branch from aee3607 to bc99305 Compare January 30, 2026 01:10
@chadcrum
Copy link
Contributor Author

/test e2e-ocp-helm-nightly

@qodo-code-review
Copy link

ⓘ Your monthly quota for Qodo has expired. Upgrade your plan
ⓘ Paying users. Check that your Qodo account is linked with this Git user account

1 similar comment
@rhdh-qodo-merge
Copy link

ⓘ Your monthly quota for Qodo has expired. Upgrade your plan
ⓘ Paying users. Check that your Qodo account is linked with this Git user account

@github-actions
Copy link
Contributor

@github-actions github-actions bot removed the Stale label Jan 30, 2026
@chadcrum
Copy link
Contributor Author

/test e2e-ocp-helm-nightly

@rhdh-qodo-merge
Copy link

ⓘ Your monthly quota for Qodo has expired. Upgrade your plan
ⓘ Paying users. Check that your Qodo account is linked with this Git user account

@github-actions
Copy link
Contributor

@chadcrum
Copy link
Contributor Author

/test e2e-ocp-helm-nightly

@rhdh-qodo-merge
Copy link

ⓘ Your monthly quota for Qodo has expired. Upgrade your plan
ⓘ Paying users. Check that your Qodo account is linked with this Git user account

@github-actions
Copy link
Contributor

@chadcrum
Copy link
Contributor Author

/test e2e-ocp-helm-nightly

@rhdh-qodo-merge
Copy link

ⓘ Your monthly quota for Qodo has expired. Upgrade your plan
ⓘ Paying users. Check that your Qodo account is linked with this Git user account

@github-actions
Copy link
Contributor

@chadcrum
Copy link
Contributor Author

/test e2e-ocp-helm-nightly

@rhdh-qodo-merge
Copy link

ⓘ Your monthly quota for Qodo has expired. Upgrade your plan
ⓘ Paying users. Check that your Qodo account is linked with this Git user account

@github-actions
Copy link
Contributor

🚫 Image Push Skipped.

The container image push was skipped because the build was skipped (either due to [skip-build] tag or no relevant changes with existing image)

@chadcrum chadcrum force-pushed the add-e2e-orchestrator-rbac-tests-rhdh-1-9 branch from 51bc2cb to de7c0bb Compare February 1, 2026 20:39
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2026

🚫 Image Push Skipped.

The container image push was skipped because the build was skipped (either due to [skip-build] tag or no relevant changes with existing image)

@chadcrum
Copy link
Contributor Author

chadcrum commented Feb 1, 2026

@gustavolira this is has been tested against helm and operator nightly jobs and the rbac tests succeed consistently.

Ready for review / merge

@chadcrum chadcrum force-pushed the add-e2e-orchestrator-rbac-tests-rhdh-1-9 branch from de7c0bb to f2a475f Compare February 3, 2026 00:51
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

@openshift-ci openshift-ci bot added the approved label Feb 3, 2026
@gustavolira
Copy link
Member

/lgtm

@chadcrum
Copy link
Contributor Author

chadcrum commented Feb 3, 2026

/retest

2 similar comments
@chadcrum
Copy link
Contributor Author

chadcrum commented Feb 4, 2026

/retest

@chadcrum
Copy link
Contributor Author

chadcrum commented Feb 4, 2026

/retest

chadcrum and others added 2 commits February 3, 2026 19:58
Add comprehensive RBAC end-to-end tests for the Orchestrator plugin
covering workflow and instance access control:

## New Test File: orchestrator-rbac.spec.ts (28 tests)

### Global Workflow Permissions (9 tests)
- Read-write access: users can view and execute all workflows
- Read-only access: users can view but not execute workflows
- Denied access: users cannot see any workflows

### Individual Workflow Permissions (9 tests)
- Workflow-specific read-write: access only to specific workflow
- Workflow-specific read-only: view only specific workflow
- Workflow-specific denied: hide specific workflow

### Workflow Instance Access (10 tests)
- Initiator-based access: users can only see their own instances
- Admin override: instanceAdminView grants access to all instances
- Cross-user isolation verification

## Changes to Existing Files

### rbac.spec.ts
- Re-enable RBAC API validation test (previously test.fixme)
- Add filtering for dynamically created workflow roles/policies
- Prevents test interference during parallel execution

### orchestrator.ts (support page)
- Add waitForWorkflowVisible() helper with configurable timeout
- Add timeout parameter to selectGreetingWorkflowItem()
- Add timeout parameter to selectFailSwitchWorkflowItem()
- Handles RBAC permission propagation delay

## Permissions Tested
- orchestrator.workflow / orchestrator.workflow.<id> (read)
- orchestrator.workflow.use / orchestrator.workflow.use.<id> (update)
- orchestrator.instanceAdminView (read) - admin access to all instances

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add testIgnore to SHOWCASE_RBAC, SHOWCASE_RBAC_K8S, and SHOWCASE_OPERATOR_RBAC
projects to prevent orchestrator-rbac.spec.ts from running on PR jobs and K8s
environments where orchestrator is not deployed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@chadcrum chadcrum force-pushed the add-e2e-orchestrator-rbac-tests-rhdh-1-9 branch from 63dacb9 to ddde1be Compare February 4, 2026 00:58
@openshift-ci openshift-ci bot removed the lgtm label Feb 4, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 4, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

@openshift-ci
Copy link

openshift-ci bot commented Feb 4, 2026

@chadcrum: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-ocp-helm-nightly 1bc4809 link false /test e2e-ocp-helm-nightly
ci/prow/e2e-ocp-operator-nightly af54422 link false /test e2e-ocp-operator-nightly

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@chadcrum
Copy link
Contributor Author

chadcrum commented Feb 4, 2026

/retest

@christoph-jerolimov
Copy link
Member

This pr had lgtm from others before and was just rebased. Reapply lgtm to merge it.

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Feb 4, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christoph-jerolimov, gustavolira

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:

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 1e75c20 into redhat-developer:main Feb 4, 2026
16 checks passed
chadcrum added a commit to chadcrum/rhdh that referenced this pull request Feb 4, 2026
* test(e2e): add orchestrator RBAC e2e test suite

Add comprehensive RBAC end-to-end tests for the Orchestrator plugin
covering workflow and instance access control:

- Read-write access: users can view and execute all workflows
- Read-only access: users can view but not execute workflows
- Denied access: users cannot see any workflows

- Workflow-specific read-write: access only to specific workflow
- Workflow-specific read-only: view only specific workflow
- Workflow-specific denied: hide specific workflow

- Initiator-based access: users can only see their own instances
- Admin override: instanceAdminView grants access to all instances
- Cross-user isolation verification

- Re-enable RBAC API validation test (previously test.fixme)
- Add filtering for dynamically created workflow roles/policies
- Prevents test interference during parallel execution

- Add waitForWorkflowVisible() helper with configurable timeout
- Add timeout parameter to selectGreetingWorkflowItem()
- Add timeout parameter to selectFailSwitchWorkflowItem()
- Handles RBAC permission propagation delay

- orchestrator.workflow / orchestrator.workflow.<id> (read)
- orchestrator.workflow.use / orchestrator.workflow.use.<id> (update)
- orchestrator.instanceAdminView (read) - admin access to all instances

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(e2e): skip orchestrator RBAC tests when orchestrator not deployed

Add testIgnore to SHOWCASE_RBAC, SHOWCASE_RBAC_K8S, and SHOWCASE_OPERATOR_RBAC
projects to prevent orchestrator-rbac.spec.ts from running on PR jobs and K8s
environments where orchestrator is not deployed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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.

3 participants