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

TechDocs returning 404 with RBAC

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2
    • None
    • RBAC Plugin
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      Recent updates to Backstage makes it so that plugins that utilize service to service authentication needed to be updated to use the new `httpAuth` and `auth` services. This update now allows the RBAC Backend plugin to be able to query information from other plugins without breaking.
      Show
      Recent updates to Backstage makes it so that plugins that utilize service to service authentication needed to be updated to use the new `httpAuth` and `auth` services. This update now allows the RBAC Backend plugin to be able to query information from other plugins without breaking.
    • Bug Fix
    • RHDH Core Team 3256

      Description of problem:

      With RBAC and local builder settings enabled, the TechDocs do get generated but give 404 when trying to access them.

      Deloitte also faced the same issue in their environment and they are using the Operator config.

      Prerequisites (if any, like setup, operators/versions):

      I tested it with Helm charts but will also try it in the Operator version and update this Jira once I have the results from the Operator config.

      Steps to Reproduce

      • Enable RBAC dynamic plugin
      • Create a config map for the RBAC policy using the rbac-policy.yml configMap
      • Create another config map using the rbac.yml configMap (this configMap references the rbac policy)
      • Configure RBAC using the steps given in the RHDH documentation
        • Use the yml files mentioned above for policy (rbac-policy.yml) and reference (rbac.yml)
      • Add the following to the global config for enabling RBAC dynamic plugin:
        global:
          dynamic:
            includes:
              - dynamic-plugins.default.yaml
            plugins:
              - disabled: false
                package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-rbac

       

      • Add GitHub authentication
      • Upgrade the Helm release to use the new config with RBAC
      • Login to Backstage using the GitHub auth
      • Go to Catalog and click on Backstage Showcase entry
      • Goto Docs tab

      Actual results:

      The TechDocs should be visible

      Expected results:

      Bring up Developer Tools to see the 404 error. The TechDocs never show up as shown in the attached TechDocs-404.mp4 clip.

      Reproducibility (Always/Intermittent/Only Once):

      I've only tried it once and then disabled RBAC to see if it works or not. It does work without any errors when RBAC is disabled. I'll try again to enable RBAC and comment here if the issue is still there.

      Build Details:

      Tested using Helm Chart config. The Chart version is provided in the attached Chart-version.png screenshot

      Additional info (Such as Logs, Screenshots, etc):

      If the RBAC is disabled then the TechDocs do show up without any errors.{}

       

      The following attachments are added to this Jira:

      1. TechDocs-404.mp4: video recording showing the error. I tried to log off and sign back in case the error is due to some permission issue from backstage auth but got the same error result
      2. RHDH-TechDocs-error-404.png: screenshot showing the error
      3. RHDH-rbac-policies.png: screenshot showing the RBAC policies configMap
      4. RHDH-TechDocs-success.png:  screenshot showing success in retrieving TechDocs when RBAC is disabled
      5. rbac-policy.yml: rbac policy configMap
      6. rbac-yml: rbac configMap that references the policy file
      7. main-config.yml: configMap for GitHub auth
      8. Chart-version.png: Chart version

       

        1. Chart-version.png
          Chart-version.png
          17 kB
        2. rabc-policy.yml
          0.8 kB
        3. rbac.yml
          0.3 kB
        4. RHDH-rbac-policies.png
          RHDH-rbac-policies.png
          70 kB
        5. RHDH-TechDocs-error-404.png
          RHDH-TechDocs-error-404.png
          458 kB
        6. RHDH-TechDocs-success.png
          RHDH-TechDocs-success.png
          556 kB
        7. TechDocs-404.mp4
          6.45 MB
        8. TechDocs-404-after-re-enabling_rbac.png
          TechDocs-404-after-re-enabling_rbac.png
          358 kB

              rh-ee-pknight Patrick Knight
              sgahlot@redhat.com Sandip Gahlot
              RHIDP - Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: