Features
- Secrets management: View, create, update, and delete secrets in Infisical
- Folder navigation: Browse the folder structure of your Infisical projects
- Multiple environments: Switch between the environments of a project
- Search: Find secrets by key, value, or comment
- Entity linking: Link Backstage entities to Infisical projects with annotations
- Access control: Control who can view and change secrets with the Backstage permission framework
- Multiple machine identities: Give each entity or environment its own Infisical machine identity
Access control, RBAC plugin support, and multiple machine identities need version 1.0.0 or later of the frontend and backend plugins. Earlier versions don’t check permissions, so any user who can see an entity can read and change its secrets. To upgrade, see Upgrade from version 0.1.1 or earlier.
Prerequisites
- An Infisical account on Infisical Cloud or a self-hosted instance
- An Infisical project with the secrets you want to show in Backstage
- A Backstage app on version 1.36 or later that uses the new backend system and has the software catalog installed
Step 1: Create a machine identity
The plugin authenticates to Infisical with a machine identity that has access to your project.1
Create a machine identity that uses Universal Auth, and copy its Client ID and a Client Secret.
2
In your Infisical project, go to Access Control > Machine Identities and add the identity with the Viewer role. If Backstage users should create, update, or delete secrets, use the Member role instead.
3
In the project sidebar, select Settings > General, and copy the Project ID.
Step 2: Install the plugins
From the root of your Backstage app, install the frontend plugin, the backend plugin, and the common package that defines the plugin’s permissions:Step 3: Configure the backend
Add the machine identity’s credentials toapp-config.yaml, and turn on the permission framework:
Authenticate with an access token instead
Authenticate with an access token instead
To use an existing access token, such as one from Token Auth, replace the
universalAuth block with auth_token. The plugin doesn’t renew the token, so the plugin stops working when the token expires.packages/backend/src/index.ts:
Step 4: Add the tab to entity pages
Add the plugin to your app inpackages/app/src/App.tsx:
packages/app/src/components/catalog/EntityPage.tsx. This example adds the tab to the page for services:
Step 5: Link an entity to a project
Add theinfisical/projectId annotation to the entity’s catalog-info.yaml, with the project ID from Step 1:
To check the setup, open the entity in Backstage and select the Secrets tab.
The Secrets tab shows the secrets in your Infisical project.
Control access with permissions
The plugin checks each request against five permissions, with the entity as the resource. Because the resource is a catalog entity, your permission policy can use catalog rules such asisEntityOwner. The Secrets tab hides the buttons for actions the user isn’t allowed to take.
Whatever your policy allows, the plugin only gives access to the project, environment, and folder that the entity’s annotations allow.
Limit changes to the entity's owners
Limit changes to the entity's owners
To let every user list secrets but let only the entity’s owners reveal and change them, return a conditional decision with
catalogConditions.isEntityOwner for the other four permissions. The plugin’s README has an example policy that you can copy.Grant permissions with the RBAC plugin
Grant permissions with the RBAC plugin
If you manage permissions with the RBAC plugin, add Grant catalog access with the The built-in RBAC admin role has
infisical-backend to pluginsWithPermission, so that the five permissions appear in the role editor:catalog.entity.read permission, not with the catalog-entity resource type. The Infisical permissions also use the catalog-entity resource type, so a role with catalog-entity and the read action can also list secrets and reveal their values. For example:catalog-entity with the read action, so RBAC admins can always reveal secret values.Use a different machine identity per entity or environment
By default, every entity uses the machine identity underinfisical.authentication. To give a team or an environment its own access in Infisical, add more identities under infisical.identities. Each identity appears as a separate actor in Infisical audit logs.
infisical/identity.<environment>, if the request is for that environmentinfisical/identityinfisical.authentication
- Add each identity to the entity’s Infisical project, as in Step 1
- Name each identity with letters and digits, optionally separated by
-or_, with each part starting with a letter (payments-devworks,team-1doesn’t) - Set
allowedEntityRefson identities with broad access, because anyone who can edit an entity’scatalog-info.yamlcan name any identity
To list a project’s environments, the plugin uses the identity from
infisical/identity or infisical.authentication, unless infisical/environment locks the entity to one environment. Give that identity access to the project too.Upgrade from version 0.1.1 or earlier
When you upgrade:- Install
@infisical/backstage-plugin-infisical-common, as in Step 2 - Install the software catalog backend if your app doesn’t have it, because the plugin reads entity annotations from the catalog
- If your permission policy denies permissions by default, or you use the RBAC plugin, grant the
infisical.secret.*permissions so users keep access to the Secrets tab - If your permission policy allows every permission, nothing changes for users, and you can now restrict access to secrets
Troubleshooting
The Secrets tab shows No Infisical project configured
The Secrets tab shows No Infisical project configured
The entity doesn’t have an
infisical/projectId annotation. Add the annotation as in Step 5.Secret values are empty and can't be revealed
Secret values are empty and can't be revealed
The user doesn’t have the
infisical.secret.value.read permission. Grant the permission in your permission policy.Requests fail with a 403 error
Requests fail with a 403 error
The plugin rejects a request with a 403 error if:
- The user doesn’t have the permission for the action
- The entity has an
infisical/environmentannotation, and the request is for a different environment - The request is for a folder outside the entity’s
infisical/secretPath - The entity isn’t in the
allowedEntityRefsof the identity it names
Requests fail with a 404 error
Requests fail with a 404 error
The plugin rejects a request with a 404 error if:
- The entity doesn’t exist, or doesn’t have an
infisical/projectIdannotation - The entity names an identity that isn’t under
infisical.identities - The entity doesn’t name an identity, and
infisical.authenticationisn’t set
How do I see which Backstage user made a change in Infisical?
How do I see which Backstage user made a change in Infisical?
The plugin sends the Backstage user and entity in the user agent of each request to Infisical, for example:In Infisical audit logs, select an event to see its
userAgent. If another Backstage backend plugin made the request, the user shows as service:<subject>. Your Backstage backend sets this value, so use it to trace requests, not as proof of who made them.Next steps
Plugin repository
Read the full configuration reference and an example permission policy.
Machine identities
Learn how machine identities authenticate to Infisical.