Certified Backstage Associate (CBA)
Production Backstage
Authentication
In this lesson, you’ll learn how to secure your Backstage instance by integrating with external identity providers. By default, Backstage allows guest access, but you can restrict sign-in to authorized users only.
Default Guest Access
Warning
Out of the box, Backstage permits anyone to sign in as a guest. To prevent unauthorized access, configure an external identity provider before deploying to production.
Supported Identity Providers
Backstage natively supports multiple OAuth and SAML providers. After configuration, users will see additional Sign in buttons on the login page.
Identity Provider | Protocol | Documentation |
---|---|---|
GitHub | OAuth 2.0 | GitHub Setup |
Auth0 | OAuth 2.0 | Auth0 Plugin |
OAuth 2.0 | Google Auth | |
OneLogin | SAML | OneLogin SAML |
Authentication Workflow Overview
Below is a high-level OAuth 2.0 flow using GitHub as an example:
- The user is already logged into GitHub (e.g., john) in their browser.
- They visit Backstage and click Sign in with GitHub.
- Backstage requests the GitHub username and receives john.
- Backstage checks its catalog for a
User
entity named john. - If found, the login succeeds; otherwise, it fails.
When no matching entity exists, you’ll encounter:
Error: login failed, no user named john
Defining a Matching User Entity
To allow john to authenticate, add a User
entity in your catalog with matching metadata:
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: john
spec:
profile:
displayName: John Doe
email: [email protected]
memberOf:
- team-b
- employees
Note
Ensure the metadata.name
exactly matches the username returned by your OAuth provider.
Once imported, john can sign in with GitHub without errors.
Automating User Import
Maintaining user entities by hand doesn’t scale. Backstage can synchronize users from:
- GitHub organizations
- LDAP directories
- Enterprise identity platforms (Okta, Azure AD)
Automated import ensures that your catalog always includes up-to-date user entries before any login attempts occur.
Links and References
Watch Video
Watch video content