S3 security Flashcards

1
Q

S3 public or private?

A

Private but default, only ROOT has access to S3 initially.

Other permissions need to be granted explicitly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the feature - Block public access - do in S3?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

At what level is the - Block public access - of an S3 bucket set?

A

It is set at the bucket level.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a bucket policy?

A

It is like identity policies but attached to resources. This will state WHO can access the resource (ALLOW/DENY)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between bucket policies and identity policies?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

To who can identity policies be attached?

A

Only to identities in your account. Identity policies can only control security in your account!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Can identity policies control access to other accounts / external accounts?

A

No, identity policies can only control access for identities in your account, it can’t grant cross-account access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Can bucket policies ALLOW/DENY access to different accounts?

A

Yes, bucket policies can ALLOW/DENY access to whoever is the source, anonymous, same account, or different accounts and this is a MAJOR benefit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Can identity policies grant permissions to anonymous identities?

A

No, they can only influence identities that are known and in the same account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

To who can bucket policies ALLOW/DENY access to?

A

Same account, different accounts, and anonymous principals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How many statements can a bucket policy have?

A

Multiple, each one can affect a different principal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How can you differentiate if a policy is a resource policy or an identity policy?

A

Only resource policies make explicit what is the principal that the policy applies to.
If it is there, it is probably a resource policy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In bucket policies, how do you apply a statement to anonymous principals?

A

By using wildcards in the principal field (*).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the most used conditions that can be used in bucket policies?

A

Block or allow certain IP addresses.

Allow or deny access if you are using MFA.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Can bucket policies force you to encrypt objects at upload?

A

Yes. It can be exclusive or inclusive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How many bucket policies can you attach to a bucket?

A

Only 1.

17
Q

How many statements can a bucket policy have?

A

Multiple.

18
Q

What policies apply to an anonymous principal?

A

Only bucket policies.

19
Q

What policies apply to identities in the same account as the bucket?

A

Bucket policies + resource policies, because the principal is authenticated.

20
Q

What are the conditions for an external account to access your S3 bucket?

A

First, you need to have a bucket policy allowing access to the bucket from that external account.
Lastly, the external account needs to have access to S3 in general.

21
Q

Does AWS recommend the use of ACLs?

A

No, it is a legacy and AWS recommends using bucket policies or identity policies.

22
Q

What are the disadvantages of using ACLs?

A

They are inflexible.

23
Q

Powerup

A

Identity: controlling different resources.
Identity: when you have a preference for IAM and centralized control.
Identity: same account.
Bucket: just controlling S3 (no other services but specific products).
Bucket: anonymous or cross-account access.
ACLs: NEVER - unless you must.