0.1.0 • Published 7 months ago

@infisical/backstage-plugin-infisical v0.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

Backstage Infisical Plugin

Backstage Loves Infisical License

A plugin for Backstage that integrates with Infisical for secrets management. This plugin allows you to:

  • View, create, edit, and delete secrets in your Infisical projects
  • Navigate secrets across different folders and environments
  • Display secrets in a user-friendly table with access controls

Installation

For your Backstage app

# From your Backstage root directory
yarn add --cwd packages/app @infisical/backstage-plugin-infisical

Backend plugin

This frontend plugin requires the corresponding backend plugin to be installed. Please follow the instructions in the backend plugin repository.

Configuration

App Configuration

  1. Add the plugin to your Backstage application by modifying your packages/app/src/App.tsx:
import { infisicalPlugin } from '@infisical/backstage-plugin-infisical';

const app = createApp({
  // ... other configuration
  plugins: [
    // ... other plugins
    infisicalPlugin,
  ],
});
  1. Add the Infisical tab to your entity page in packages/app/src/components/catalog/EntityPage.tsx:
import { EntityInfisicalContent } from '@infisical/backstage-plugin-infisical';

// Add to the service entity page:
const serviceEntityPage = (
  <EntityLayout>
    {/* ...other tabs */}
    <EntityLayout.Route path="/infisical" title="Secrets">
      <EntityInfisicalContent />
    </EntityLayout.Route>
  </EntityLayout>
);

Entity Configuration

To connect an entity to its Infisical project, add the following annotation to your entities.yaml:

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: example-service
  annotations:
    infisical/projectId: <your-infisical-project-id>

Replace <your-infisical-project-id> with the ID of your Infisical project.

Features

Secret Management

  • View Secrets: Browse secrets in a table with support for hiding sensitive values
  • Create Secrets: Add new secrets with key, value, and optional comments
  • Update Secrets: Modify existing secret values and metadata
  • Delete Secrets: Remove secrets that are no longer needed

Folder Navigation

  • Folder Browsing: Navigate the folder structure of your Infisical project
  • Breadcrumb Navigation: Easily navigate up and down the folder hierarchy

Environment Support

  • Environment Selection: View and manage secrets across different environments (Development, Staging, Production, etc.)
  • Environment-specific Secrets: Each environment has its own set of secrets

Search and Filtering

  • Instant Filtering: Quickly find secrets by filtering the table by key, value, or comment

Development

Getting Started

  1. Clone the repository
  2. Install dependencies:
yarn install
  1. Run the plugin in isolation:
yarn start

Running Tests

Run all tests:

yarn test

Run tests with coverage:

yarn test:coverage

Building

yarn build