S3 security Flashcards
S3 public or private?
Private but default, only ROOT has access to S3 initially.
Other permissions need to be granted explicitly.
What does the feature - Block public access - do in S3?
Prevents data leak. It is a security layer that acts regardless of the resource permissions or policies attached to the bucket say. They apply only to public access permissions, not to any of the defined AWS identities.
At what level is the - Block public access - of an S3 bucket set?
It is set at the bucket level.
What is a bucket policy?
It is like identity policies but attached to resources. This will state WHO can access the resource (ALLOW/DENY)
What is the difference between bucket policies and identity policies?
Resource policies are attached to resources and identity policies are attached to identities.
RP delimits WHO can access the resource and IP delimits WHAT that resource can access.
To who can identity policies be attached?
Only to identities in your account. Identity policies can only control security in your account!
Can identity policies control access to other accounts / external accounts?
No, identity policies can only control access for identities in your account, it can’t grant cross-account access.
Can bucket policies ALLOW/DENY access to different accounts?
Yes, bucket policies can ALLOW/DENY access to whoever is the source, anonymous, same account, or different accounts and this is a MAJOR benefit.
Can identity policies grant permissions to anonymous identities?
No, they can only influence identities that are known and in the same account.
To who can bucket policies ALLOW/DENY access to?
Same account, different accounts, and anonymous principals.
How many statements can a bucket policy have?
Multiple, each one can affect a different principal.
How can you differentiate if a policy is a resource policy or an identity policy?
Only resource policies make explicit what is the principal that the policy applies to.
If it is there, it is probably a resource policy.
In bucket policies, how do you apply a statement to anonymous principals?
By using wildcards in the principal field (*).
What are the most used conditions that can be used in bucket policies?
Block or allow certain IP addresses.
Allow or deny access if you are using MFA.
Can bucket policies force you to encrypt objects at upload?
Yes. It can be exclusive or inclusive