Uso di AWS Security per sviluppatori
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"
}
}
}

La domanda
La risposta


Basate sull'identità


Basate sull'identità
Basate sulla risorsa
{"Effect": "Allow", "Action": "s3:*", "Resource": "*"}
{"Effect": "Deny", "Action": "s3:DeleteObject", "Resource": "*"}
{"Effect": "Allow", "Action": "s3:*", "Resource": "*"}
{"Effect": "Deny", "Action": "s3:DeleteObject", "Resource": "*"}
Request: s3:DeleteObject risulta: Denied.
Un deny esplicito batte qualsiasi allow, anche se ampio


{"Effect": "Allow", "Action": "s3:*",
"Resource": "*"}
{"Effect": "Deny", "Action": "s3:DeleteObject",
"Resource": "*"}
s3:GetObject → allow: l'allow ampio lo copres3:DeleteObject → deny esplicito: una statement dice nokms:Decrypt, dynamodb:GetItem → deny implicito: questa policy non menziona quei serviziStesso errore, due cause
Deny esplicito
Deny implicito

Uso di AWS Security per sviluppatori