Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-4770

[janus-idp/backstage-plugins] Plugin rbac-backend Fails to Initialize after upgrading to version > 5.0.0

Prepare for Y ReleasePrepare for Z ReleaseRemove QuarterXMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      [2624007263] Upstream Reporter: Rodrigo Willians
      Upstream issue status: Closed
      Upstream description:

      Issue: Plugin rbac-backend Fails to Initialize after upgrading to version > 5.0.0

      Description: When attempting to initialize the rbac-backend plugin in Backstage, an error is encountered, preventing the plugin from starting properly. This issue occurs consistently, but only after the second execution of the Backstage.

      Steps to Reproduce:

      1. Set up a fresh instance of Backstage with a local PostgreSQL database.
      2. Install the rbac-backend plugin following the official installation guidelines.
      3. Start Backstage backend for the first time (no errors occur).
      4. Stop the Backstage backend service.
      5. Start Backstage backend for the second time.

      Expected Behavior: The rbac-backend plugin should initialize without errors in all executions, allowing it to function as intended within Backstage.

      Actual Behavior: An error is thrown during the initialization process, preventing the rbac-backend plugin from starting. The following error message is displayed:

      backstage error Plugin 'permission' thew an error during startup type=initialization
      .backstagenode_modules@backstagebackend-app-apisrcwiringBackendInitializer.ts:334
                    throw new ForwardedError(
                          ^
      
      
      ForwardedError: Plugin 'permission' startup failed; caused by Error: Failed to store policies [[role:default/rbac_admin, policy-entity, read, allow],[role:default/rbac_admin, policy-entity, create, allow],[role:default/rbac_admin, policy-entity, delete, allow],[role:default/rbac_admin, policy-entity, update, allow],[role:default/rbac_admin, catalog-entity, read, allow]]
          at <anonymous> (.backstagenode_modules@backstagebackend-app-apisrcwiringBackendInitializer.ts:334:21)
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
          at async <anonymous> (.backstagenode_modules@backstagebackend-app-apisrcwiringBackendInitializer.ts:333:13)
          ... 3 lines matching cause stack trace ...
          at async BackstageBackend.start (.backstagenode_modules@backstagebackend-app-apisrcwiringBackstageBackend.ts:38:11) {
        cause: Error: Failed to store policies [[role:default/rbac_admin, policy-entity, read, allow],[role:default/rbac_admin, policy-entity, create, allow],[role:default/rbac_admin, policy-entity, delete, allow],[role:default/rbac_admin, policy-entity, update, allow],[role:default/rbac_admin, catalog-entity, read, allow]]
            at EnforcerDelegate.addPolicies (.backstagenode_modules@janus-idpbackstage-plugin-rbac-backendsrcserviceenforcer-delegate.ts:109:15)
            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
            at async addAdminPermissions (.backstagenode_modules@janus-idpbackstage-plugin-rbac-backendsrcadmin-permissionsadmin-creation.ts:125:9)
            at async setAdminPermissions (.backstagenode_modules@janus-idpbackstage-plugin-rbac-backendsrcadmin-permissionsadmin-creation.ts:149:9)
            at async Function.build (.backstagenode_modules@janus-idpbackstage-plugin-rbac-backendsrcpoliciespermission-policy.ts:108:11)
            at async Function.build (.backstagenode_modules@janus-idpbackstage-plugin-rbac-backendsrcservicepolicy-builder.ts:152:16)
            at async Object.init (.backstagenode_modules@janus-idpbackstage-plugin-rbac-backendsrcplugin.ts:71:11)
            at async <anonymous> (.backstagenode_modules@backstagebackend-app-apisrcwiringBackendInitializer.ts:333:13)
            at async Promise.allSettled (index 6)
            at async BackendInitializer.#doStart (.backstagenode_modules@backstagebackend-app-apisrcwiringBackendInitializer.ts:278:21)
            at async BackendInitializer.start (.backstagenode_modules@backstagebackend-app-apisrcwiringBackendInitializer.ts:187:5)
            at async BackstageBackend.start (.backstagenode_modules@backstagebackend-app-apisrcwiringBackstageBackend.ts:38:11)
      }

      Versions of software used and environment Backstage v1.32.4 Node v20.18.0 @janus-idp/backstage-plugin-rbac-backend: "^5.1.2",


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

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

                Created:
                Updated:
                Resolved: