-
Bug
-
Resolution: Done
-
Minor
-
1.1.1
-
None
Description of problem:
Recently, we introduced the ability to reduce the number of permissions that are enforcer checks against during enforcement. It seems like this lead to an error whenever we attempt to filter for a permission that is not defined through the REST API or the CSV file.
error: Policy check failed with Error: Entity reference must not be empty {"plugin":"permission","service":"backstage","timestamp":"2024-04-23 13:08:41"}
This error is happening because the enforcer is being loaded with no permissions at all, which results in it being unable to perform any checks.
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- Create a CSV file with the following
g, user:default/<YOUR_USERNAME>, role:default/policy-error p, role:default/policy-error, catalog-entity, read, allow
- Enable the RBAC Backend plugin using the following
permission: enabled: true rbac: policies-csv-file: ../<PATH>/<TO>/<CSV-FILE>.csv
- Attempt to navigate to the home page of the catalog
Actual results:
Throws an error for the permission `catalog.entity.create` and denies the request.
Expected results:
It should just deny the request without throwing an error