The Simplest Way to Make Backstage and OAuth Work Like They Should
Using backstage and oauth together lets developers log into your portal with one identity. This setup checks who each user is before they run any internal tool. Teams use this portal to manage services, docs, and cloud resources in one place. Adding a login standard stops strangers from viewing your private service catalog. It also passes user identity to the backend apps that power your plugins. How backstage and oauth pass identity and permissions The login flow starts when an engineer ope
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Using backstage and oauth together lets developers log into your portal with one identity. This setup checks who each user is before they run any internal tool.
Teams use this portal to manage services, docs, and cloud resources in one place. Adding a login standard stops strangers from viewing your private service catalog. It also passes user identity to the backend apps that power your plugins.
How backstage and oauth pass identity and permissions
The login flow starts when an engineer opens the developer portal in a browser. The portal sends the user to an identity provider to sign in. Once the user logs in, the provider returns an identity token and an access token.
The portal reads the identity token to match the user to a catalog profile. This profile holds the user name, email, and team group memberships. Plugins then use the access token to talk to outside APIs and cloud tools.
Each request carries the user token so downstream systems know who asked for data. The backend checks the token signature and expiration time before it sends a reply. If the token is valid, the portal renders the data on the screen.
Some plugins need to call external services on behalf of the logged-in developer. In this flow, the portal exchanges its token for a new scoped token. That new token grants permissions only for the specific external tool.
Common token mistakes and how to scope roles
Many teams set up user login but fail to lock down plugin backend keys. They give the portal a single shared service account with broad admin rights. Every user who clicks a button in the portal then shares that giant role.
When a developer triggers an action, the backend runs it using the shared key. Downstream audit logs only show the portal service account name, not the real person. Security teams cannot tell which engineer changed a setting or read a table.
Broad tokens also create a huge risk if an attacker steals a session token. An overly wide scope lets a bad actor write data instead of just reading it. You must restrict token scopes to the smallest set of actions each plugin needs.
OAuth 2.0 + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Start by breaking apart shared backend accounts into small, task-specific roles. Map your identity provider groups directly to ownership groups inside the service catalog. Make sure the portal requests read-only scopes by default for all catalog views.
When a plugin needs write permissions, ask the user to approve that extra scope. Set short life spans on all access tokens so stolen keys expire in minutes. Refresh tokens should also rotate each time the portal asks for a new key.
Auditing portal actions and protecting sensitive data
Scoping tokens inside the portal is only half of the security puzzle. You also need clear logs when plugins query databases or run cloud commands. Standard web logs only show that the portal called an internal API endpoint.
They rarely record the actual database query or the returned rows of data. If a plugin pulls customer records, sensitive fields might show up on screen. Masking rules can rewrite matched fields like emails, phone numbers, and card numbers in results.
Network rules should also block the portal from reaching production systems without checks. Place strict firewall rules between the portal server and your private data stores. Require every request to carry user identity all the way to the target system.
Review your catalog groups every month to remove old users and stale permissions. When an engineer leaves a team, revoke their active tokens right away. Clear ownership records and short token lifetimes keep your developer portal safe.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Why do plugins still use shared keys after we set up login?
User login only checks who opens the front door of the portal. Many third-party plugins still rely on static backend keys to fetch external data. You must update those plugins to pass user tokens instead of static secrets.
How short should we make our portal access token lifetimes?
Keep access tokens short, ideally between fifteen minutes and one hour. Short lifetimes limit damage if a key leaks in a browser log. Use token refresh flows so engineers do not have to log in all day.
How do we stop plugins from showing private customer data?
Limit database roles so plugin queries only read non-sensitive columns and tables. You can also apply data masking to rewrite national IDs and emails in results. Always log which user triggered the plugin query for your audit trail.
Related guides
In this post