Parsifal-M / backstage-opa-plugins

Open Policy Agent (OPA) Plugins for Backstage
https://parsifal-m.github.io/backstage-opa-plugins/
Apache License 2.0
46 stars 6 forks source link
backstage backstage-opa-backend backstage-plugin opa open-source permissions plugins rbac

Welcome to the OPA Plugins Repository for Backstage

This repository contains a collection of plugins for Backstage that integrate with Open Policy Agent.

Blogs

Talks

Plugins

Policies

Additional Documentation

Each Plugin has its own documentation in the Plugins Folder, I am however, slowly moving things to Github pages. Feel free to help out!

Local Development

Step by step guide to developing locally:

  1. Clone this repository
  2. Create an app-config.local.yaml file in the root of the repository copying the contents from app-config.yaml
  3. Create a PAT (Personal Access Token) for your GitHub account with these scopes: read:org, read:user, user:email. This token should be placed under integrations.github.token in the app-config.local.yaml file.
  4. Run yarn install --immutable in the root of the repository
  5. Use docker-compose up -d to start the OPA server and postgres database (this will also load the two policies in the example-opa-policies folder automatically)
  6. Update the OPA rbac policy in here rbac_policy.rego, or use your own! If you want to use the default policy, you'll have to update is_admin if "group:twocodersbrewing/maintainers" in claims to what ever your user entity claims are.
  7. Run yarn dev or yarn debug in the root of the repository to start the Backstage app (use debug if you want to see what is happening in the OPA plugin)

Contributing

Contributions are welcome! However, still figuring out the best approach as this does require user and group entities to be in the system.

Please open an issue or a pull request. You can also contact me on mastodon at @parcifal.

Please remember to sign your commits with git commit -s so that your commits are signed!