Använda AWS-säkerhet för utvecklare
Rahul Singh
Technical Product Manager
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::reports/*",
"Condition": {
"Bool": {
"aws:SecureTransport": "true"
},
"IpAddress": {
"aws:SourceIp": "203.0.113.0/24"
}
}
}

{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::reports/*",
"Condition": {
"Bool": {
"aws:SecureTransport": "true"
},
"IpAddress": {
"aws:SourceIp": "203.0.113.0/24"
}
}
}

Frågan
Svaret


Identitetsbaserad


Identitetsbaserad
Resursbaserad
{"Effect": "Allow", "Action": "s3:*", "Resource": "*"}
{"Effect": "Deny", "Action": "s3:DeleteObject", "Resource": "*"}
{"Effect": "Allow", "Action": "s3:*", "Resource": "*"}
{"Effect": "Deny", "Action": "s3:DeleteObject", "Resource": "*"}
Begäran: s3:DeleteObject resulterar i: Nekad.
Ett explicit nekande vinner alltid över ett tillåtande, oavsett hur brett


{"Effect": "Allow", "Action": "s3:*",
"Resource": "*"}
{"Effect": "Deny", "Action": "s3:DeleteObject",
"Resource": "*"}
s3:GetObject → allow: det breda tillåtandet täcker dets3:DeleteObject → explicit nekande: ett uttalande säger nejkms:Decrypt, dynamodb:GetItem → implicit nekande: denna policy nämner aldrig dessa tjänsterSamma fel, två orsaker
Explicit nekande
Implicit nekande

Använda AWS-säkerhet för utvecklare