RCP 目前仅支持 KMS、Secrets Manager、SQS、STS 和 S3。 因此,要保护跨其他服务(如 DynamoDB)的数据,我们需要创新思维。 如果这些资源是用 KMS 加密的,我们就可以在 RCP 中使用 KMS 来创建一个数据边界:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "EnforceEncryptionReadPerimeter",
"Effect": "Deny",
"Principal": "*",
"Action": [
"kms:Decrypt"
],
"Resource": "*",
"Condition": {
"StringNotEqualsIfExists": {
"aws:PrincipalOrgID": "<ORG_ID_HERE>"
},
"BoolIfExists": {
"aws:PrincipalIsAWSService": "false"
}
}
},
{
"Sid": "EnforceConfusedDeputyProtection",
"Effect": "Deny",
"Principal": "*",
"Action": [
"kms:Decrypt"
],
"Resource": "*",
"Condition": {
"StringNotEqualsIfExists": {
"aws:SourceOrgID": "ORG_ID_HERE"
},
"Null": {
"aws:SourceAccount": "false"
},
"Bool": {
"aws:PrincipalIsAWSService": "true"
}
}
},
{
"Sid": "EnforceKMSEncryption",
"Effect": "Deny",
"Principal": "*",
"Action": [
"kms:PutKeyPolicy",
"kms:CreateKey"
],
"Resource": "*",
"Condition": {
"Bool": {
"kms:BypassPolicyLockoutSafetyCheck": true
}
}
}
]
}
{
"Version": "2012-10-17",
"Statement": [
]
}