testutil: use RDS-managed password rotation in the Ministack harness - #29
Merged
Conversation
Replaces the hand-rolled ModifyDBCluster password seam with the real managed flow Ministack v1.4.15 supports: ManageMasterUserPassword at cluster creation, master-password resolution through Secrets Manager, and RotateMasterUserPassword for the rotation itself — the same control-plane path production credentials take. No fixture password remains in the source.
RDS-generated passwords are outside the harness's control and may carry URL-reserved characters, so connection URLs are now assembled with net/url instead of string interpolation. The cluster-delete cleanup registers before anything fallible touches the cluster, so a provisioning failure can no longer leak the sibling container, and secret resolution polls with the last error reported on deadline.
Kiran01bm
marked this pull request as ready for review
August 12, 2026 04:38
Kiran01bm
requested review from
JashLal,
aparajon,
eeSeeGee,
jayjanssen,
jemiahw and
morgo
as code owners
August 12, 2026 04:38
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
morgo
approved these changes
Aug 12, 2026
morgo
left a comment
Collaborator
There was a problem hiding this comment.
🤖 Approved by Morgan's AI agent (low-risk review pass): test-harness-only — switches the Ministack Aurora harness to RDS-managed password rotation with Secrets Manager resolution, and hardens connection-URL building with a round-trip escaping test. Only internal/testutil, docs, and go.mod (official AWS SDK secretsmanager module + patch bumps) are touched; CI green on PG 14–18.
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
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.
Summary
Replaces the AWS-boundary harness's hand-rolled password-change seam with the RDS-managed master-password flow Ministack v1.4.15 supports end to end. The rotation test now exercises the same control-plane path production credentials take: managed password generation at cluster creation, Secrets Manager resolution, and
RotateMasterUserPassword.Why
The previous seam pushed a caller-invented password through
ModifyDBCluster— a shape real operators using managed passwords never exercise. With Ministack v1.4.15 (pinned by the previous image bump), the emulator implements the managed flow faithfully, so the harness can prove the realistic contract: an in-flight session survives rotation, a stale password fails at the next connect, and the refreshed credentials come from Secrets Manager, not from the test.What
CreateDBClusternow setsManageMasterUserPassword: trueinstead of passing a fixture password; the harness resolves the generated password by discovering the cluster'sMasterUserSecretARN and reading it through a Secrets Manager client pointed at the same gateway.Rotatedrops its caller-chosen password parameter: it issuesModifyDBClusterwithRotateMasterUserPassword, then polls boundedly until the managed secret resolves to a password different from the pre-rotation one, then until the database accepts it.resolveManagedMasterPassword(returns errors so pollers can retry it) behind a bounded polling helper shared by provisioning and rotation, which reports the last resolution error when the deadline expires.net/url, so an RDS-generated password containing URL-reserved characters round-trips intact; the cluster-delete cleanup registers before anything fallible touches the cluster.aws-sdk-go-v2/service/secretsmanager;smithy-gomoves to indirect.This PR was authored by Amp (Claude Opus 4.6).