More screenshots

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 more

    Repair Secret Rotation Outages

    1

    Repair systems where rotating API keys, signing secrets, database credentials, or certificates causes outages because old and new credentials do not overlap.

    $8.99

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Secret Rotation Outages

    Repair Secret Rotation Outages

    Example session with this skill installed

    Our NestJS SaaS runs on Kubernetes and uses PostgreSQL credentials from Vault. When we rotate the database password, some API pods keep old pooled connections while new connections start failing, then revoking the old credential causes a partial outage.

    • Read your context and instructions
    • Compiled the repair secret rotation
    • Generated the document

    Project Detected
    NestJS TypeScript SaaS running on Kubernetes with PostgreSQL, TypeORM, Vault-backed database credentials, BullMQ workers, and multiple API replicas


    Rotation Failure Found

    • Credential distribution and application activation are treated as the same event, while existing TypeORM pools continue using old authenticated connections and replacement connections may load a different credential generation
    • Secret type: Database credential
    • Secret identity: PostgreSQL application principal
    • Current version: db-credential-v17
    • Next version: db-credential-v18
    • Failure result: Partial database authentication outage appears gradually as old pooled connections are replaced

    Secret Contract

    • Authoritative source: Vault database credential path used by the Kubernetes workloads
    • Issuer: Vault-backed database credential workflow
    • Active version: db-credential-v17 before cutover
    • Accepted versions: v17 and v18 during the disposable dual-principal test
    • Overlap support: Full in the tested dual-principal fixture; live Vault/PostgreSQL policy remains subject to staging verification
    • Reload mechanism: Controlled TypeORM datasource replacement plus rolling workload restart for startup-only consumers
    • Revocation authority: Existing credential-revocation workflow in the Vault/database integration

    Consumer Inventory

    • Producers: 6 API replicas opening PostgreSQL connections
    • Validators: PostgreSQL authentication layer
    • Workers and scheduled jobs: 8 BullMQ workers, 2 scheduled maintenance jobs, and 1 migration runner
    • Connection pools or cached clients: TypeORM pools in every API and worker process
    • Standby / DR consumers: 2 standby deployment manifests identified but not executed in the isolated test
    • Consumers still on old version: 0 after the completed test rollout

    Rotation Plan

    • Prepare: Issue v18 with equivalent required database privileges while v17 remains valid
    • Distribute: Publish v18 through the test Vault path and make workloads aware of the immutable credential version
    • Overlap: Verify new v18 connections while existing v17 pools remain available
    • Cutover: Replace datasource clients and roll startup-only consumers to v18 in bounded batches
    • Verification gate: Require every API, worker, scheduled-job fixture, and migration connection to establish a fresh v18 database connection
    • Old-version revocation gate: Zero required consumers report v17 and fresh v18 connections pass after pool churn
    • Rollback boundary: v17 remains available until the revocation gate passes

    Repair Applied

    • Secret version handling: Added immutable credential-generation metadata to the Vault loader and safe version reporting
    • Consumer reload behavior: Added controlled datasource replacement for reload-capable services and rolling restart hooks for startup-only workers
    • Dual-version or overlap handling: Added a staged dual-principal test path rather than replacing the active password in one step
    • Cutover and health gates: Added fresh-connection readiness checks instead of relying on already-authenticated pooled connections
    • Revocation and rollback protection: Old credential cannot enter revocation state until every required consumer generation is verified

    Files Modified

    • src/config/databaseSecret.loader.ts
    • src/database/datasourceManager.ts
    • src/database/databaseCredentialHealth.ts
    • src/workers/workerBootstrap.ts
    • src/rotation/databaseRotation.service.ts
    • k8s/api-deployment.yaml
    • k8s/worker-deployment.yaml
    • test/database-secret-rotation.spec.ts

    Commands Executed

    • npm run typecheck
    • npm test -- database-secret-rotation.spec.ts
    • npm run build

    Overlap Test

    • Consumers tested: 17 API, worker, scheduled-job, and migration-runner fixtures
    • Consumers accepting old version: 17 before migration
    • Consumers accepting new version: 17 after v18 distribution
    • Authentication failures during overlap: 0

    Cutover Test

    • Producers switched: 17
    • Consumers on new version: 17
    • New authentication failures: 0
    • Old-version operations after cutover: 0 after forced connection-pool churn

    Revocation Test

    • Old version revoked: Yes in the disposable database fixture
    • New version remained valid: Yes
    • Consumers still requiring old version: 0
    • Outages after revocation: 0

    Failure Recovery Test

    • Failure point: One worker rejected v18 during the readiness stage before fleet cutover
    • Last known good version: db-credential-v17
    • Rollback result: Rotation remained in overlap state, v17 stayed active, the faulty worker was restored, and revocation was blocked
    • Consumers left without usable credential: 0

    Validation Result
    Type checking, 34 secret-loading, fresh-connection, pool-churn, rolling-cutover, worker, scheduled-job, rollback, and revocation tests, and the production build completed successfully using isolated PostgreSQL, mocked Vault responses, and Kubernetes deployment fixtures.


    Remaining Risks

    • Live Vault lease semantics, PostgreSQL credential overlap, backup tooling, and production Kubernetes rollout timing require staging verification.

    Important Notes
    No production Vault credential or PostgreSQL user was changed or revoked. Existing pooled connections were not treated as proof that the new credential worked; every required path created fresh authenticated connections before the old generation became revocation-eligible.

    repair-secret-rotation-outages.pdf

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Identify consumers holding stale credentials in memory or connection pools.Implement dual-key validation to prevent signing failures during rotation.Coordinate zero-downtime cutovers for API keys and TLS certificates.Gate secret revocation based on verified fleet migration evidence.

    About this skill

    Repair Secret Rotation Outages is a bounded ToolForge Labs workflow. Repair systems where rotating API keys, signing secrets, database credentials, or certificates causes outages because old and new credentials do not overlap. This skill traces secret versions, rollout order, caches, reloads, and revocation. It adds staged rotation, dual-version validation, safe cutover, rollback, and expiry tests. ✔ Rotate without downtime ✔ Prevent stale secret use ✔ Verify every consumer ✔ Revoke old credentials safely Ideal for SaaS, APIs, workers, and distributed systems. The skill works from supplied repository files or partial evidence, separates verified facts from assumptions, avoids invented execution claims, and provides concrete next steps plus deterministic validation where possible.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 20 days ago

    • Passed all security checks, Safe to install

    Listed20 days ago

    What's inside

    Frequently Asked Questions