Logo

dev-resources.site

for different kinds of informations.

Using the Open Policy Agent with Backstage!

Published at
10/30/2024
Categories
opensource
opa
backstage
openpolicyagent
Author
parsifal-m
Author
10 person written this
parsifal-m
open
Using the Open Policy Agent with Backstage!

Hello! 👋

I'm Peter, a software engineer who's spent the last few years working with OPA (Open Policy Agent) and Backstage in my spare time (and now at work!).

Bringing the two together felt natural, as I have a deep appreciation for OPA—it was my first open-source project contribution, and the support from the maintainers was invaluable in building my confidence to continue contributing and building in Open Source.

The Need For Authorization

While many organizations treat everything within their Backstage application as 'public'—meaning accessible to anyone internally—the reality, especially in regulated industries, is that we may need to control visibility more selectively across the organization.

Backstage comes with an in-built permissions framework for cases like the above, for rarely changing, static authorization policy the built-in permissions framework might be enough.

So Why Use OPA With Backstage?

A key motivation for developing the plugins to integrate OPA with Backstage was to avoid the need to rebuild and redeploy the application for each permission change.

For instance, if a user needed to be added or removed, or a group updated, I wanted to eliminate those urgent "drop everything and edit this permission" moments.

And so, the OPA Permissions Wrapper Plugin was born! With the recent updates to the Backstage backend, this is technically an "extension" of the permissions framework. It forwards all authorization requests to OPA, where decisions are made based on defined policies—allowing for more dynamic control!

What Does This Solve?

  • Instead of coding policies directly into your Backstage instance with TypeScript, create, edit and manage your policies with OPA!
  • Manage your policies in a more flexible way, you can use OPA's Rego language to write your policies.
  • No need to redeploy your Backstage instance to update your permission policies, simply update your OPA policies and you are good to go!
  • Enable teams to manage their own policies, without needing to know TypeScript or the Backstage codebase!

Other Reading Material

To Be Continued?

This is an introduction to spread the word. If you're interested in a deeper, technical write-up of these plugins, let me know and I’ll continue!

I’m also working on an implementation that fully uses OPA, bypassing the permissions framework for custom Backstage plugins—and I am more than happy to write about it!

Thanks for reading!

Peter

backstage Article's
30 articles in total
Favicon
New Backstage Plugin: Manage and Deploy IaC from Your Internal Developer Portal
Favicon
Understanding the Backstage System Model
Favicon
Backstage Consulting & Enterprise Support
Favicon
Platform Engineering : découvrez la puissance de Backstage.io
Favicon
The New Way To Use OPA With Backstage
Favicon
Migrating to Backstage’s New Backend: A Step-By-Step Guide
Favicon
Update the Backstage catalog instantly without touching any YAML
Favicon
The Ultimate Guide to Backstage Software Catalog Completeness
Favicon
Easier Relationship Mapping in the Backstage Catalog
Favicon
Using the Open Policy Agent with Backstage!
Favicon
Adopting Backstage - Documentation and Support
Favicon
How to Define Engineering Standards (with Backstage)
Favicon
Improving Backstage performance (by up to 48x)
Favicon
Scaling Backstage
Favicon
🎵 Desplegando infraestructura en AWS desde Backstage 🎵
Favicon
The Lifecycle of a JavaScript File in the Browser: Request, Load, Execute1
Favicon
How to easily start Backstage
Favicon
APIMatic SDKs in Backstage Developer Portal
Favicon
Enable Developers on SAP BTP with Terraform, GitHub Actions and Backstage
Favicon
Kubernetes will rise, and Java will change – what else can we expect in 2024?
Favicon
Backstage, App template e Crossplane no Amazon EKS [Lab Session]
Favicon
Creating Infra Using Backstage Templates, Terraform and GitHub actions.
Favicon
Port vs Backstage - Choosing Your Internal Developer Portal
Favicon
PagerDuty Community Update, December 7 2023
Favicon
Introducing the Harness SRM Backstage Plugin
Favicon
Got Monorepos Instead of Microservices? This is How Harness IDP Has Got You Covered
Favicon
How to use Self-Service Onboarding in Harness Internal Developer Portal
Favicon
Road to BackstageCon 2023: A Sneak Peek into an Exciting Lineup & A Recap of 2022!
Favicon
PagerDuty Community Update, November 10 2023
Favicon
Starting Platform Engineering Journey with Backstage

Featured ones: