mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
AWS requires the customer managed key of an encrypted snapshot to be shared with the account restoring it (Redshift Management Guide, "Sharing a snapshot"). Neither botocore nor the Service Reference says so, so the request-resources generator states it in FORWARDED, an evidence entry under MEASURED's rules: the action and the snapshot type, with the rest read from the metadata (the key type and format kms:Decrypt acts on, the snapshot record's KmsKeyId member, the endpoint prefix, kms:ViaService). Under IAM enforcement a Redshift or Redshift Serverless restore is then also checked as kms:Decrypt on the key the snapshot records, found in the snapshot's account, against the key policy and the caller's own policies, with aws:ViaAWSService and kms:ViaService naming the service's endpoint. KMS key policies are now evaluated as resource policies. A key KMS would not use, disabled, pending deletion or not held, refuses the restore, as KMS refuses the request the service makes with it. A snapshot under AWS's own key records none, and one under an AWS managed key (a copy grant made without a key) needs nothing, as AWS writes that key's policy to let the account use it through the service.