feat: AWS Secrets Manager provider (Plan 8)#210
Merged
Conversation
Add internal/proxy/secrets/awssm package with Config, Provider, smClient interface, New constructor, Fetch, Close, and error mapping. Uses AWS SDK for Go v2 with ambient credentials. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace GetSecretValue probe with STS GetCallerIdentity — works in least-privilege IAM setups. Expand mapAWSError to cover common AWS auth error codes beyond AccessDeniedException. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mock-based tests for Fetch (string, binary, JSON field extraction, auto-resolve, error mapping), Close lifecycle, concurrency (test hooks for TOCTOU race), and ProviderContract compliance. Co-Authored-By: Claude <noreply@anthropic.com>
- Extract isAuthError helper for reuse in constructor and Fetch. - Map STS probe auth failures to ErrUnauthorized (not generic error). - Remove InvalidRequestException → ErrInvalidURI mapping: that AWS error signals resource state (pending deletion, managed by another service), not a malformed URI. It now falls through to the generic aws-sm wrapper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n 8) Add aws-sm to knownProviderTypes, YAML decoder, and DefaultConstructors. Services can now reference aws-sm:// URIs and the resolver builds awssm.Config from policy YAML. Co-Authored-By: Claude <noreply@anthropic.com>
…oborev) - Make non-auth STS probe failures non-fatal: VPC-endpoint-only deployments may not have STS reachability, but SM still works. Auth failures remain fatal (bad credentials won't self-heal). - Add InvalidClientTokenId and SignatureDoesNotMatch to isAuthError for comprehensive AWS credential failure mapping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…orev) If the bootstrap context is canceled/expired during the STS probe, propagate the context error instead of silently swallowing it. Auth errors and context errors are fatal; other STS failures (e.g. endpoint unreachable) remain non-fatal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
internal/proxy/secrets/awssm/package: Config, Provider (smClientinterface,New,Fetch,Close), error mapping withisAuthErrorhelperGetCallerIdentityconnectivity probe (auth-fatal, non-auth non-fatal for VPC-endpoint deployments)aws-sm://host/path#fieldURIsaws-smintoknownProviderTypes,DefaultConstructors, anddecodeProviderConfigsmClient, race-clean,ProviderContractcomplianceTest Plan
go test ./internal/proxy/secrets/awssm/... -race— all passgo test ./internal/policy/...—TestValidateSecrets_AWSProviderpassesgo test ./internal/session/...—TestResolveProviderConfigs_AWSSMpassesgo test ./...— full suite greenGOOS=windows go build ./...— cross-compile clean🤖 Generated with Claude Code