Skip to content

feat: vaults v2 enhanced secret management#246

Merged
jahvon merged 15 commits into
mainfrom
vaultsv2
Jul 4, 2025
Merged

feat: vaults v2 enhanced secret management#246
jahvon merged 15 commits into
mainfrom
vaultsv2

Conversation

@jahvon

@jahvon jahvon commented Jun 27, 2025

Copy link
Copy Markdown
Member

Complete overhaul of the vault system introducing named vaults, multiple encryption backends, and improved workflows for managing secrets across different vaults.

New Features

Named Vault System

  • Multiple Vaults: Create and manage multiple named vaults instead of a single global vault
  • Vault Switching: Switch between vaults using flow vault switch <name>
  • Vault Management: Full lifecycle management with create, list, get, remove, and switch commands
  • Cross-Vault Access: Retrieve secrets from specific vaults without switching using vault/secret-name syntax

Multiple Encryption Backends

  • AES256 (Default): Symmetric encryption with auto-generated 256-bit keys
  • Age Support: Asymmetric encryption using https://github.com/FiloSottile/age with recipient keys for team collaboration
  • Key Sharing: Share encryption keys across multiple AES256 vaults for related vaults

Enhanced Authentication

  • Flexible Key Storage: Configure keys via environment variables or files during vault creation
  • Custom Environment Variables: Specify custom env vars for vault keys (--key-env, --identity-env)
  • Identity Files: Support for Age identity files and AES256 key files

Advanced Configuration

  • Custom Storage Paths: Specify custom storage locations for vault data (--path flag)
  • Provider Architecture: Extensible provider system for different vault backends
  • Migration Support: Migrate pre-v1 legacy vaults to the new named system

Secret Management

  • Context-Aware: Secrets are managed within the currently active vault
  • Isolated Storage: Each vault maintains its own encrypted secret store
  • Backward Compatibility: Existing secret commands work with the legacy vault system

@jahvon jahvon linked an issue Jun 27, 2025 that may be closed by this pull request
@jahvon jahvon changed the title wip: vaults v2 feat: vaults v2 enhanced secret management Jul 3, 2025
@jahvon
jahvon marked this pull request as ready for review July 3, 2025 20:55
@codecov

codecov Bot commented Jul 3, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 3.06886% with 1295 lines in your changes missing coverage. Please review.

Project coverage is 18.82%. Comparing base (ed36313) to head (f12851b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/internal/vault.go 0.00% 345 Missing ⚠️
internal/vault/v2/secret.go 0.00% 210 Missing ⚠️
internal/vault/v2/vault.go 0.00% 139 Missing ⚠️
internal/io/secret/v2/views.go 0.00% 138 Missing ⚠️
cmd/internal/secret.go 0.00% 119 Missing ⚠️
internal/io/vault/view.go 0.00% 109 Missing ⚠️
internal/vault/v2/demo.go 0.00% 89 Missing ⚠️
internal/io/vault/output.go 0.00% 48 Missing ⚠️
internal/runner/env.go 12.12% 29 Missing ⚠️
internal/io/secret/v2/output.go 0.00% 25 Missing ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #246      +/-   ##
==========================================
- Coverage   21.86%   18.82%   -3.05%     
==========================================
  Files          84       91       +7     
  Lines        7106     8339    +1233     
==========================================
+ Hits         1554     1570      +16     
- Misses       5269     6478    +1209     
- Partials      283      291       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jahvon
jahvon merged commit a1b175f into main Jul 4, 2025
10 checks passed
@jahvon
jahvon deleted the vaultsv2 branch July 4, 2025 00:00
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.

CLI commands for managing vault data

1 participant