AWS secretsmanager: Clarify KMS key permissions for cross-account secret access
Summary
Expands guidance on which KMS key permissions a principal needs depending on the secret operations it performs (kms:Decrypt for reads, kms:GenerateDataKey for writes).
Security assessment
The added text documents least-privilege KMS key permissions (kms:Decrypt vs kms:GenerateDataKey) for cross-account secret access, which is encryption/authorization guidance. It is best-practice documentation rather than a fix for a specific vulnerability.
Evidence
+ * The following key policy statement allows `ApplicationRole` in `Account2` to use the KMS key in `Account1` to decrypt the secret in `Account1`. To use this statement, add it to the key policy for your KMS key. For more information, see [Changing a key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying.html). The KMS key permissions the principal needs depend on the operations it performs on the secret. To read the secret value, the principal needs `kms:Decrypt`. If the principal also creates or changes the secret value (for example, with `PutSecretValue`, `UpdateSecret`, or `CreateSecret`), also grant `kms:GenerateDataKey`. For the KMS key permissions required by each operation, see [Permissions for the KMS key](./security-encryption.html#security-encryption-authz).
Diff
diff --git a/secretsmanager/latest/userguide/auth-and-access_examples_cross.md b/secretsmanager/latest/userguide/auth-and-access_examples_cross.md index c870a7b..99d0584 100644 --- a//secretsmanager/latest/userguide/auth-and-access_examples_cross.md +++ b//secretsmanager/latest/userguide/auth-and-access_examples_cross.md @@ -96 +96 @@ JSON - * The following key policy statement allows `ApplicationRole` in `Account2` to use the KMS key in `Account1` to decrypt the secret in `Account1`. To use this statement, add it to the key policy for your KMS key. For more information, see [Changing a key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying.html). + * The following key policy statement allows `ApplicationRole` in `Account2` to use the KMS key in `Account1` to decrypt the secret in `Account1`. To use this statement, add it to the key policy for your KMS key. For more information, see [Changing a key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying.html). The KMS key permissions the principal needs depend on the operations it performs on the secret. To read the secret value, the principal needs `kms:Decrypt`. If the principal also creates or changes the secret value (for example, with `PutSecretValue`, `UpdateSecret`, or `CreateSecret`), also grant `kms:GenerateDataKey`. For the KMS key permissions required by each operation, see [Permissions for the KMS key](./security-encryption.html#security-encryption-authz).