-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
False
-
-
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?
- Set up RBAC backend plugin
- Assign yourself as an admin
- Create the role x:default/my-roles
- 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
- links to