Skip to main content

Add OIDC on-behalf-of auth to the Backstage plugin

Problem

The Spacelift Backstage plugin authenticates to Spacelift with one API key ID and secret set in app-config.yaml. Every Backstage user reaches Spacelift through that shared identity, which means:

  • No per-user visibility. Users see every stack and run the shared key can see, not what they are authorized for in Spacelift.

  • Spacelift access control doesn't apply. Spaces, RBAC and login policies are evaluated against the API key, not the person. Admins have to rebuild access rules in the Backstage permission framework or fall back to readOnly mode.

  • Weak audit trail. Runs triggered from Backstage are attributed to the API key, so the Spacelift audit log loses who acted.

  • Secret management overhead. Admins have to create, store, rotate and distribute a long-lived, highly privileged credential.

Requested behavior

Support an OIDC on-behalf-of (token exchange) flow in the backend plugin:

  1. The user signs in to Backstage through the organization's identity provider.

  2. The backend plugin exchanges that user's token for a Spacelift token issued to that user.

  3. Every Spacelift API call carries the user's identity, so Spacelift applies its normal spaces, RBAC and login policies.

Expected outcome:

  • Users only see the stacks and runs they can access in Spacelift.

  • Actions such as triggering a run are allowed or denied by Spacelift and attributed to the user in the audit log.

  • No static API key and secret is required for interactive use. A service credential could remain optional for background jobs.

Who this is for

Organizations using Backstage as the front door to their internal developer platform, where many teams share one Backstage instance and should not all share one Spacelift identity.

Current workaround

A shared API key (ideally read-only) in app-config.yaml, plus Backstage permission rules restricting who can open the Spacelift pages. This scopes access to the plugin, not to individual stacks, and actions are attributed to the API key.

Sources

Log in to comment and vote

No comments yet

Be the first to share your thoughts.