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

[janus-idp/backstage-plugins] RBAC: CSV repopulates database whenever there is a server restart

XMLWordPrintable

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

      None

      Show
      None
    • False
    • Release Note Not Required
    • RHDH Sprint 3252

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

      Describe the bug

      When there is a restart of the server and the policies-csv-file and database.enabled fields are set, the CSV policy will repopulate the database with the original permission policies.

      Expected Behavior

      This opens up a question on how we should handle cases where there is a CSV file included and the Database enabled.

      Should we only allow for one or the other to prevent the potential of the database being repopulated with the CSV file on restart

      or

      Should we save back into the CSV file if it is included (Personally, I like this approach as this can be useful whenever a database is not present)

      What are the steps to reproduce this bug?

      1. Create an RBAC policy CSV with the permission p, user:default/<YOUR_USERNAME>, catalog-entity, read, deny
      2. Set policies-csv-file and database.enabled fields in the app-config
      3. Start server
      4. Update the permission policy to p, user:default/<YOUR_USERNAME>, catalog-entity, read, allow
      5. Restart server
      6. Notice that there are now two permission policies in the database:
      p, user:default/<YOUR_USERNAME>, catalog-entity, read, allow # Updated permission policy
      p, user:default/<YOUR_USERNAME>, catalog-entity, read, deny # Permission policy from the CSV

      Versions of software used and environment


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

              rh-ee-pknight Patrick Knight
              upstream-sync Upstream Sync
              RHIDP - Dynamic Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: