Skip to content

feat(orchestrator): improve permission denied error handling for workflow instances#2033

Merged
lokanandaprabhu merged 1 commit intoredhat-developer:mainfrom
lokanandaprabhu:feature/rbac-permission-denied-panel
Jan 19, 2026
Merged

feat(orchestrator): improve permission denied error handling for workflow instances#2033
lokanandaprabhu merged 1 commit intoredhat-developer:mainfrom
lokanandaprabhu:feature/rbac-permission-denied-panel

Conversation

@lokanandaprabhu
Copy link
Member

Hey, I just made a Pull Request!

This PR improves the user experience when a user lacks permission to view a workflow instance. Instead of showing a generic error, users now see a clean "Access Denied" panel with actionable information.

Problem

When RBAC is enabled and a user tries to view a workflow instance without the orchestrator.instanceAdminView permission, they would see a confusing generic error. This was particularly problematic for:

  • Workflow instances created externally (not through Backstage)
  • Legacy workflow instances created before the initiatorEntity feature was added
  • Instances created by other users

Solution:

Backend (orchestrator-backend):

  • Improved error messages when access is denied due to missing ownership info or different initiator
  • Error messages now explain:
    1. Which permission the user has (orchestrator.workflow or orchestrator.workflow.[workflowId])
    2. Why access is denied (missing ownership info or different initiator)
    3. What permission is needed (orchestrator.instanceAdminView)

Frontend (orchestrator):

  • Added new PermissionDeniedPanel component for clean access denied UI
  • Shows a lock icon, detailed description, required permission, and "Go back" button

Screenshot:

Access Denied (without instanceAdminView):

User has orchestrator.workflow.yamlgreet permission but lacks instanceAdminView. When accessing a workflow instance created externally (without initiatorEntity ownership info), the new PermissionDeniedPanel is displayed

Screenshot 2026-01-12 at 2 39 54 PM

After adding orchestrator.instanceAdminView permission to the user's role, they can now successfully view all workflow instance details - including those created externally or by other users.

Screenshot 2026-01-12 at 2 40 42 PM

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Jan 12, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-orchestrator-backend workspaces/orchestrator/plugins/orchestrator-backend patch v8.5.1
@red-hat-developer-hub/backstage-plugin-orchestrator workspaces/orchestrator/plugins/orchestrator patch v5.3.1

@lokanandaprabhu lokanandaprabhu force-pushed the feature/rbac-permission-denied-panel branch from 60cf03b to 081d056 Compare January 13, 2026 06:09
@lokanandaprabhu lokanandaprabhu force-pushed the feature/rbac-permission-denied-panel branch from 081d056 to 6775b2c Compare January 13, 2026 06:35
@sonarqubecloud
Copy link

@lokanandaprabhu lokanandaprabhu merged commit 0f60a00 into redhat-developer:main Jan 19, 2026
9 checks passed
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