Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 RBAC: List of plugins is empty in the 'Create Role' screen #2536

Open
2 tasks done
chriskilding-relx opened this issue Jan 16, 2025 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@chriskilding-relx
Copy link

Plugin Name

rbac

📜 Description

When I try to create a new RBAC role in the 'Create Role' screen (when running locally that's at http://localhost:3000/rbac/role/new),

And I use the Plugin dropdown in the 'Add permission policies' section,

Then the dropdown list is sometimes empty. (There are no plugins to choose from.)

This happens even though I have enabled some plugins (in particular catalog) for the permissions system in my app's index.ts:

apiRouter.use(
    '/permission',
    authMiddleware,
    await permissionRbac(permissionEnv, {
      getPluginIds: () => ['permission', 'catalog'],
    }),
  );

Note: the Backstage installation in my organisation uses an older Backstage version, so plugins are loaded in code, not the new config-based plugin loader.

👍 Expected behavior

The 'Add permission policies' section should let me add permissions to my policy from the enabled plugins (e.g. catalog.read, catalog.create).

👎 Actual Behavior with Screenshots

The 'plugins' dropdown is sometimes empty, so I cannot add any permissions. (See screenshot.)

Image

👟 Reproduction steps

  1. Create a Backstage app with the RBAC plugin in use.
  2. Enable some of your other plugins (which declare permissions) for permissions checking in the RBAC plugin configuration (i.e. in the awaitPermissionRbac callback, shown above)
  3. Start Backstage backend and frontend
  4. Create a new RBAC role by going to http://localhost:3000/rbac/role/new
  5. Add a test name and description. Add any user or group.
  6. In the 'Add permission policies' section, click the Plugins dropdown.
  7. The plugins dropdown might be empty.

📃 Provide the context for the Bug.

I am trying to create an RBAC role with the Backstage community RBAC plugin.

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

None

@chriskilding-relx chriskilding-relx added the bug Something isn't working label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant