-
-
Notifications
You must be signed in to change notification settings - Fork 2
Release/2025 12 21 #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add VaultProvider for Vault client connection and authentication - Token, AppRole, and GCP IAM authentication methods - Automatic token renewal and expiry tracking - TLS enforcement with localhost exception for dev - Add VaultIntegration for high-level secrets management - Background refresh with synchronous cache pattern - TTL-based automatic secret refresh scheduling - Health monitoring and error tracking - Add composable decorators for Vault configuration - @VaultPath(path) - Vault secret path - @VaultEngine(type) - Secrets engine type (kv1, kv2, database, etc.) - @vaultkey(key) - Specific key within secret - @VaultRefreshBuffer(seconds) - Custom refresh timing - @VaultOptional() - Mark secret as optional - Add local testing infrastructure - Docker Compose setup for Vault + PostgreSQL - Automated setup script with GCP project creation - Cleanup script for GCP resources - Comprehensive test suites for all auth methods - Add security measures - Secret masking in logs and errors - Path sanitization - TLS requirement for non-localhost
- Implement two-phase initialization pattern: - Phase 1 (Constructor): Create VaultIntegration instance - Phase 2 (initializeVault): Async Vault init + secret loading - Phase 3 (Runtime): Synchronous config access - Add config getter with Vault initialization guard - Warns if Vault configured but not initialized - Ensures synchronous access after initialization - Add fallback.required support in initializeVault() - required=true (default): Fail fast on Vault errors - required=false: Log warning and continue - Fix critical bug in VaultCache.set() - nconf.overrides() now merges instead of replacing - Prevents secrets from overwriting each other - Add 21 new unit tests for Vault integration - Backward compatibility tests - Source hierarchy tests (Vault > env > file) - Error handling tests - Initialization flow tests Test Results: 50 passed, 0 failed
Demonstrates real-world Vault dynamic secret rotation: - NestJS application with Sequelize PostgreSQL connection - Database credentials from Vault (60s TTL, auto-refresh) - Sequelize auto-reconnect on authentication errors - Query retry after credential rotation Key features: - initializeConfigit() runs BEFORE NestJS to ensure credentials are ready - DatabaseModule wraps Sequelize query to detect auth errors - Automatic reconnection with fresh credentials from Configit - Test endpoints to verify rotation works Files: - examples/vault-nestjs-sequelize/src/config/*.ts - Configit setup - examples/vault-nestjs-sequelize/src/database/*.ts - Sequelize with rotation - examples/vault-nestjs-sequelize/DESIGN.md - Architecture documentation Usage: cd examples/vault-nestjs-sequelize npm install npm run start:dev curl http://localhost:3000/test/db
Comprehensive documentation covering: - Overview and prerequisites - Configuration options (IVaultConfigOptions) - Authentication methods (Token, AppRole, GCP IAM, AWS IAM) - Fallback chain configuration - TLS configuration - Vault decorators (@VaultPath, @VaultEngine, @vaultkey, etc.) - Usage examples (basic, GCP IAM, dynamic database credentials) - Source hierarchy (Vault → CLI → Env → Files) - Health monitoring (getVaultHealth()) - NestJS integration pattern - Troubleshooting guide
- actions/cache: v2/v3 → v4 - actions/checkout: v2/v3 → v4 - actions/setup-node: v1/v3 → v4 Fixes deprecated action errors in CI pipeline
- Extract release config from package.json to .releaserc.json - Add @semantic-release/exec for build step - Remove changelog generation - Add success comment with release links
Tests requiring a running Vault instance are now properly skipped unless VAULT_INTEGRATION_TESTS=true is set. This prevents CI failures while still allowing local testing with a real Vault server.
Feature/add vault agent like option
# [1.0.0-beta.27](v1.0.0-beta.26...v1.0.0-beta.27) (2025-12-21) ### Bug Fixes * **examples:** remove duplicate type in auth config ([3d3c162](3d3c162)) * **general:** small nits ([f521919](f521919)) * **release:** disable husky on pipelines ([8bab06b](8bab06b)) * **release:** missing steps and remove old bot token ([4e6fd12](4e6fd12)) * **release:** update semantic-release setup ([2ad30f1](2ad30f1)) ### Features * **examples:** add NestJS + Sequelize + Vault example ([1d3b40b](1d3b40b)) * **vault:** add HashiCorp Vault integration ([aa006c3](aa006c3)) * **vault:** integrate VaultIntegration into ConfigService ([6924ae5](6924ae5))
|
This PR is included in version 2.12.0 🎉 The release is available on: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
🚨 Review the guidelines for contributing to this repository. 🚨
Please explain the changes you made here.
You can explain individual changes as a list:
issue_number)Checklist
Please check if your PR fulfills the following requirements:
npm run build)