Commit a11d144
fix(template): use bucket ARN for SSE-KMS encryption context
PR #533 scoped kms:EncryptionContext:aws:s3:arn to the object ARN
(<bucket>/<BucketKey>). That works for plain SSE-KMS, but the state
bucket has BucketKeyEnabled: true, so S3 generates a short-lived
bucket-level data key and derives per-object keys locally — the
encryption context S3 forwards to KMS is the bucket ARN, not the
object ARN.
The condition therefore never matched at runtime and every sync
failed with:
AccessDenied: ... is not authorized to perform: kms:Decrypt
on resource: arn:aws:kms:...:key/... because no identity-based
policy allows the kms:Decrypt action
(IAM reports a condition-mismatched Allow as "not allowed".)
Change both KMSGetDataPolicy and KMSDecryptPolicy to pin the bucket
ARN. The role can still only reach the single state object via the
S3ObjectPolicy ARN scoping; kms:ViaService still forces all KMS
access through S3.
Also update docs/Whats-New.md to describe the correct behavior and
link to the S3 Bucket Keys docs.
Refs: #521, #533
Ref: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ae9775a commit a11d144
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
| 374 | + | |
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
0 commit comments