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

[janus-idp/backstage-plugins] [RBAC Plugin] Validation is not working for Create Role API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      [1996857545] Upstream Reporter: Patrick Knight
      Upstream issue status: Closed
      Upstream description:

      Describe the bug

      Validation is not working working for the Create Role API and allows for the creation of roles that do not match our format of role:default/<ROLE_NAME>. This means that we can create roles like this xyzzy or x:default/my-roles.

      However, we do have validation on the other Role APIs. This means that we end up with errors when calling those APIs

      Unsupported kind x. List supported values ["user", "group", "role"]"?name?: ?"InputError"?stack?: ?"InputError: Unsupported kind x. List supported values ["user", "group", "role"]n at PolicesServer.getEntityReference (/Users/dsantra/Downloads/backstage-plugins/plugins/rbac-backend/src/service/policies-rest-api.ts:619:13)n at <anonymous> (/Users/dsantra/Downloads/backstage-plugins/plugins/rbac-backend/src/service/policies-rest-api.ts:458:36)n at process.processTicksAndRej

      Expected Behavior

      Validation should be the same across all APIs

      What are the steps to reproduce this bug?

      1. Set up RBAC backend plugin
      2. Assign yourself as an admin
      3. Create the role x:default/my-roles
      4. Attempt to delete the role x:default/my-roles

      Versions of software used and environment


      Upstream URL: https://github.com/janus-idp/backstage-plugins/issues/943

              Unassigned Unassigned
              upstream-sync Upstream Sync
              RHIDP - Dynamic Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: