S3-Security Flashcards

1
Q

You can encrypt objects in S3 buckets using one of four methods:

  • Server-Side Encryption (SSE)
    • Amazon S3-Managed Keys (SSE-S3) - default
    • KMS Keys stored in AWS KMS (SSE-KMS)
    • Customer-Provided Keys (SSE-C)
  • Client-Side Encryption
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Amazon S3-Managed Keys (SSE-S3)

  • encryption using keys handled, managed, and owned by ____
  • object is encrypted server-side
  • encryption type is ____
  • must set header “x-amz-server-side-encryption”:”AES256”
  • enabled by default for new buckets and objects
A

AWS
AES-256

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

KMS Keys stored in AWS KMS (SSE-KMS)

  • encryption using keys handled and managed by AWS KMS
  • KMS advantages: user control + audit key usage using ____
  • object is encrypted server-side
  • must set header “x-amz-server-side-encryption”:”aws:kms”
A

CloudTrail

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

SSE-KMS Limitations

When you upload data it calls the ____ KMS API.
When you download data it calls the ____ KMS API.

These calls count toward the KMS quota per second. (5500, 10000, 30000 req/s based on region)
you can request a quota increase using the ____.

A

GenerateDataKey
Decrypt
Service Quotas Console

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

Customer Provided Keys (SSE-C)

  • Server-side encryption using keys fully managed by the customer outside of AWS.
  • Amazon S3 does NOT store the encryption key you provide.
  • HTTPS must be used
  • Encryption key must be provide in HTTP headers, for every HTTP request made.
  • Will not see the option in the UI, must be done via CLI.
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Client-Side Encryption

  • use client libraries such as Amazon S3 Client-Side Encryption Library
  • Clients must encrypt the data themselves before sending to S3
  • Clients must decrypt data themselves when retrieving from S3
  • Customer fully manages the keys and encryption cycle
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Encryption in-flight is called ____.

S3 exposes two endpoints:
- http endpoint: non encrypted
- https endpoint: encryption in-flight

http is recommended
https is mandatory for which S3 encryption method?

A

SSL/TLS
SSE-C

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

How can you force S3 encryption in transit?

A

via a bucket policy, by adding a condition to Deny the GetObject action when aws:SecureTransport is false.

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

Amazon S3 bucket policies are evaluated ____ “Default Encryption”.

A

before

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

Which S3 encryption method is automatically applied to new objects stored in an S3 bucket?

A

SSE-S3

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

You can “force encryption” using a bucket policy and refuse any API call to PUT an S3 object without encryption headers (SSE-KMS or SSE-C).

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

CORS: Cross-Origin Resource Sharing

origin = scheme (protocol) + host (domain) + port
ex: https://www.example.com

CORS is a web browser based mechanism to allow requests to other origins while visiting the main origin.
Same origin: http://example.com/app1 & https://example.com/app2
Different origins: http://www.example.com & https://other.example.com

These request won’t be fulfilled unless the other origin allows for the requests, using CORS Headers (ex: Access-Control-Allow-Origin)

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

** If a client makes a cross-origin request on our S3 bucket, we need to enable the correct ____.

A

CORS headers

you can allow for a specific origin or for * (all origins)

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

To use MFA Delete, ____ must be enabled on the S3 bucket.

A

versioning

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

Only the ____ can enable/disable MFA Delete.

A

bucket owner (root account)

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

Identify the actions below that require MFA to be enabled:

  • enable versioning
  • suspend versioning on the bucket
  • list deleted versions
  • permanently delete an object version
A

suspend versioning on the bucket
permanently delete and object version

17
Q

MFA Delete can only be enabled via the ____ using the root account.

18
Q

For ____ purposes, you may want to log all access to S3 buckets.
Any request made to S3, from any account, authorized or denied, will be logged into another S3 bucket.
That data can be analyzed using data analysis tools (such as Athena)
The target logging bucket must be in the same AWS ____.

A

audit
region

19
Q

Do not set your S3 access logging bucket to the the ____ bucket.
It will create a loggin loop and your bucket will grow exponentially and be very expensive.

A

monitoring

20
Q

S3 Pre-Signed URLs can be generated using what 3 methods?

A

S3 Console
AWS CLI
AWS SDK

21
Q

What are the expiration times for S3 pre-signed URLs?

  • S3 Console: 1 min up to 720 mins (12 hours)
  • AWS CLI: default 3600 secs, max 604800 sec ~ 168 hours
    • configure expiration with –expires-in parameter in seconds
22
Q

Users given a ____ URL inherit the permissions of the user that generated the URL for GET / PUT

A

pre-signed

23
Q

Use case for pre-signed URL: when you want to provide a user access to a private S3 file for them to download (or upload).

A

Examples:

  • allow only logged-in users to download a premium video from your S3 bucket
  • allow an ever-changing list of users to download files by generating URLs dynamically
  • allow temporarily a user to upload a file to a precise location in your S3 bucket (while keeping your bucket private)
24
Q

The S3 Glacier ____ feature is helpful for compliance and data retention because it adopts the WORM (Write Once Ready Many) model.

A

Valut Lock

  • The lock policy is at the bucket level
  • Create a vault lock policy, the lock the policy for future edits. (can no longer be changed or deleted)
25
Before you can use the S3 Object Lock feature, you must enable ____.
versioning
26
Unlike the Glacier Vault lock at the bucket level, the S3 Object Lock is at the object/file level.
27
S3 Object Lock can block and object version ____ for a specified amount of time.
deletion
28
Which S3 Object Lock retention mode is described below: - Object versions can't be overwritten or deleted by any user, including the root user - Objects retention modes can't be changed, and retention periods can't be shortened
Compliance
29
Which S3 Object Lock retention mode is described below: - Most users can't overwrite or delete and object version or alter its lock settings - Some users have special permissions to change the retention or delete the object
Governance
30
The S3 Object Lock ____ protects the object for a fixed period of time (it can be extended).
retention period
31
Using S3 Object Lock, a ____ can be placed on an object that will protect it indefintely, independent from the retention period.
Legal Hold
32
In order to place/remove a legal hold on an S3 object you need which IAM permission?
s3:PutObjectLegalHold
33
S3 ____ simplify security management for S3 buckets.
Access Points
34
Each S3 Access Point has: - its own DNS name (internet origin or VPC origin) - an access point policy (similar to bucket policy) - manage security at scale
35
Using a ___ origin, we can make the S3 access point only accessible from within the VPC. You must create a VPC ____ to access the Access Point (Gateway or Interface Endpoint). The VPC Endpoint policy must allows access to the ____ and ____.
VPC Endpoint target bucket and Access Point
36
S3 Object ____ uses AWS Lambda Functions to change the object before it is retrieved by the caller application.
S3 Object Lambda
37
With S3 Object Lambda, only one S3 bucket is needed. On top of which, we create S3 Access Point and S3 Object Lambda Access Points.
38
What S3 feature is best for the following use cases? - redacting PII data for analytics or non-production environments - converting across data formats, such as XML to JSON - resizing and watermarking images on the fly using caller-specific details, such as the user who requested the object
S3 Object Lambda