Skip to content

Add Infisical as secrets backend option#1387

Closed
albertobruin wants to merge 1 commit intomainfrom
infisical-secrets
Closed

Add Infisical as secrets backend option#1387
albertobruin wants to merge 1 commit intomainfrom
infisical-secrets

Conversation

@albertobruin
Copy link
Copy Markdown
Collaborator

Added Infisical as a fourth secrets backend option using the official Infisical Go SDK.

Implementation:

  • Created InfisicalClient in pkg/secrets/infisical.go

    • Uses Universal Auth (Machine Identities) with client ID + secret
    • Fetches secrets from Infisical API using official SDK
    • Environment variables: BRUIN_INFISICAL_CLIENT_ID, BRUIN_INFISICAL_CLIENT_SECRET, BRUIN_INFISICAL_PROJECT_ID, BRUIN_INFISICAL_ENVIRONMENT, BRUIN_INFISICAL_HOST (optional), BRUIN_INFISICAL_SECRET_PATH (optional)
    • Implements ConnectionAndDetailsGetter interface
    • In-memory caching (SDK caching disabled)
    • Auto token refresh enabled
  • Added tests in pkg/secrets/infisical_test.go

    • Tests for validation and caching behavior
    • All tests passing
  • Updated cmd/run.go

    • Added 'infisical' to --secrets-backend flag possible values
    • Added switch case for infisical backend selection
    • Follows same pattern as Vault implementation
  • Documentation

    • Created docs/secrets/infisical.md with comprehensive setup guide
    • Updated docs/secrets/overview.md to list Infisical
    • Added --secrets-backend flag docs to docs/commands/run.md
    • Added usage examples for Infisical and Vault
  • Dependencies

    • Added github.com/infisical/go-sdk v0.6.2

Usage:
bruin run --secrets-backend infisical
OR
export BRUIN_SECRETS_BACKEND=infisical && bruin run

Generated with Claude Code

Added Infisical as a fourth secrets backend option using the official Infisical Go SDK.

Implementation:
- Created InfisicalClient in pkg/secrets/infisical.go
  - Uses Universal Auth (Machine Identities) with client ID + secret
  - Fetches secrets from Infisical API using official SDK
  - Environment variables: BRUIN_INFISICAL_CLIENT_ID, BRUIN_INFISICAL_CLIENT_SECRET,
    BRUIN_INFISICAL_PROJECT_ID, BRUIN_INFISICAL_ENVIRONMENT, BRUIN_INFISICAL_HOST (optional),
    BRUIN_INFISICAL_SECRET_PATH (optional)
  - Implements ConnectionAndDetailsGetter interface
  - In-memory caching (SDK caching disabled)
  - Auto token refresh enabled

- Added tests in pkg/secrets/infisical_test.go
  - Tests for validation and caching behavior
  - All tests passing

- Updated cmd/run.go
  - Added 'infisical' to --secrets-backend flag possible values
  - Added switch case for infisical backend selection
  - Follows same pattern as Vault implementation

- Documentation
  - Created docs/secrets/infisical.md with comprehensive setup guide
  - Updated docs/secrets/overview.md to list Infisical
  - Added --secrets-backend flag docs to docs/commands/run.md
  - Added usage examples for Infisical and Vault

- Dependencies
  - Added github.com/infisical/go-sdk v0.6.2

Usage:
  bruin run --secrets-backend infisical
  OR
  export BRUIN_SECRETS_BACKEND=infisical && bruin run

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant