Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-2516

[DOC] orchestrator.workflow.[workflowId] permission description missing instance access behavior

XMLWordPrintable

    • RHDH Documentation 3287
    • Important

      Summary

      The Permissions.md documentation for the orchestrator.workflow.[workflowId] permission is incomplete. It only mentions workflow definition access, but the code shows this permission also grants access to workflow instances (filtered by initiator).

      Current Documentation

      File: Permissions.md

      The current description for orchestrator.workflow.[workflowId] states:

      Allows the user to list and read the details of a single workflow definition

      Actual Code Behavior

      In router.ts (lines 904-909), the specific permission IS used to authorize instance access via getInstanceById:

      Unable to find source-code formatter for language: typescript. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      const decision = await authorize(
        request,
        [
          orchestratorWorkflowPermission,
          orchestratorWorkflowSpecificPermission(workflowId),  // Used for instance access
        ],
        permissions,
        httpAuth,
      );
      

      The initiatorEntity filter (lines 846-867) is then applied, meaning users only see instances they created (unless they have instanceAdminView).

      Inconsistency

      The generic permission orchestrator.workflow correctly documents instance access:

      Allows the user to list and read any workflow definition and their instances that they created

      But the specific permission orchestrator.workflow.[workflowId] omits this, even though both permissions grant the same instance visibility behavior.

      Recommended Fix

      Update the orchestrator.workflow.[workflowId] description to:

      Allows the user to list and read a single workflow definition and its instances that they created

      References

              rhn-support-jmagak Judith Amondi Magak
              chadcrum Chad Crum
              RHDH Documentation
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: