Creating a new database secret is the beginning of a rotation—not the end.
The old credential may still be held by an MCP agent, connection pool, deployment revision, test client, or forgotten worker. A successful login with the new secret proves only that the new path works.
A safer runbook is:
- inventory every consumer and active session
- create a new version or replacement database role
- preserve or narrow the reviewed grants
- open a short, explicitly bounded overlap window
- canary the new credential through the real network path
- drain pools and stop old revisions from creating connections
- test positive and negative authorization cases
- revoke the old credential
- attempt a fresh login with the old secret and require failure
Track time to distribute, connect, drain, revoke, and prove revocation—not merely the secret's “updated at” timestamp.
And keep rollback narrow. Leaving both credentials valid indefinitely is not rollback; it is a second production access path.
Full runbook: MCP database credential rotation
Top comments (0)