S3 -Security Flashcards
What type of Object Encryptions are available in S3?
- Server-Side Encryption (SSE)
- Server-Side Encryption with Amazon S3-Managed Keys (SSE-S3) – Enabled by Default
– Encrypts S3 objects using keys handled, managed, and owned by AWS - Server-Side Encryption with KMS Keys stored in AWS KMS (SSE-KMS)
– Leverage AWS Key Management Service (AWS KMS) to manage encryption keys - Server-Side Encryption with Customer-Provided Keys (SSE-C)
– When you want to manage your own encryption keys - Client-Side Encryption
How does SSE-S3 works?
- Encryption using keys handled, managed, and owned by AWS
- Object is encrypted server-side
- Encryption type is AES-256
- Must set header “x-amz-server-side-encryption”: “AES256”
- Enabled by default for new buckets & new objects
How does SSE-KMS works?
- Encryption using keys handled and managed by AWS KMS (Key Management Service)
- KMS advantages: user control + audit key usage using CloudTrail
- Object is encrypted server side
- Must set header “x-amz-server-side-encryption”: “aws:kms
What are the SSE-KMS limitations?
- If you use SSE-KMS, you may be impacted by the KMS limits
- When you upload, it calls the GenerateDataKey KMS API
- When you download, it calls the Decrypt KMS API
How does SSE-C works?
- 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 provided in HTTP headers, for every HTTP request made
How does – Client-Side Encryption works in S3?
- Use client libraries such as Amazon S3 Client-Side Encryption Library
- Clients must encrypt data themselves before sending to Amazon S3
- Clients must decrypt data themselves when retrieving from Amazon S3
- Customer fully manages the keys and encryption cycle
How to force encryption in transit for s3?
You can setup a bucket policy to deny s3:GetObject if SecureTransport is false. The file can only access by HTTPS.
What is default encryption in S3?
SSE-S3 encryption is automatically applied to new objects stored in S3 bucket
Which one evaluated first: Bucket polcies or Defaul encryption?
Bucket policies > Defaul encryption
What are the CORS headers?
Access-Control-Allow-Origin: https://www.example.com
Access-Control-Allow-Methods: GET, PUT, DELETE
How to enable CORS in S3 buckets?
S3 Bucket > Permissions > CORS settings,You can allow for a specific origin or for * (all origins)
What is Amazon S3 – MFA Delete?
MFA (Multi-Factor Authentication) – force users to generate a code on a
device (usually a mobile phone or hardware) before doing important
operations on S3
What are the protected actions that need S3 MFA Delete?
- Permanently delete an object version
- Suspend Versioning on the bucket
What must be setup for S3 MFA DeletE?
- To use MFA Delete, Versioning must be enabled on the bucket
- Only the bucket owner (root account) can enable/disable MFA Delete
What are S3 Access Logs?
- Log all access made to S3 in an other bucket
- Logging bucket must be in the Same AWS Region