Encrypt bootstrap SSM parameter to survive org re-encryption policies#6857
Encrypt bootstrap SSM parameter to survive org re-encryption policies#6857HeathHopkins wants to merge 1 commit into
Conversation
Change the /sst/bootstrap SSM parameter from String to SecureString and read it with WithDecryption: true. This prevents breakage when an AWS organization policy automatically re-encrypts unencrypted SSM parameters. Backward-compatible: WithDecryption is a no-op for existing String parameters, and PutParameter with Overwrite allows upgrading String to SecureString on the next bootstrap version bump. Matches the pattern already used by the passphrase parameter.
|
i don't think this is backward-compatible
so existing accounts with also, that matters for SST because our least-privilege bootstrap policy in |
Closes #6856
Summary
/sst/bootstrapSSM parameter fromStringtoSecureStringand read it withWithDecryption: trueMotivation
Some AWS organizations enforce policies that automatically convert unencrypted SSM parameters to
SecureString. Once this happens, the bootstrap parameter becomes unreadable because SST callsGetParameterwithWithDecryption: false, which returns encrypted ciphertext instead of the plaintext JSON.Changes
Two changes in
pkg/project/provider/aws.goinsideBootstrap():GetParameterfor/sst/bootstrap:WithDecryptionchanged fromfalsetotruePutParameterfor/sst/bootstrap:Typechanged fromParameterTypeStringtoParameterTypeSecureStringBackward Compatibility
This is safe for existing deployments with unencrypted
Stringbootstrap parameters:WithDecryption"is ignored forStringandStringListparameter types." Existing unencrypted parameters are returned identically.PutParameterwithOverwrite: trueallows changing the type fromStringtoSecureStringseamlessly.