30. Security & Encryption **IMPORTANT** Flashcards

1
Q

What is encryption in flight?

A

SSL/TLS (HTTPS)

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

What is server-side encryption at rest

A

Data is encrypted after being received by the server and is decrypted before being sent (KMS)

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

What is client-side encryption?

A

Data is encrypted by client and never decrypted by server

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

What standard does KMS use for symmetric encryption?

A

AES-256

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

What standard does KMS use for asymmetric encryption?

A

RSA & ECC key pairs

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

What is the KMS data per call maximum?

A

4KB of data per call

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

What should you use if your KMS data is greater than the maximum?

A

If data > 4KB, use envelope encryption

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

What should you do in KMS to authorize cross-account access?

A

Attach a KMS Key Policy to authorize cross-account access

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

True or False: KMS keys have a global view.

A

False. KMS keys are bound to the region they are in.

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

What is the API used for envelope encryption?

A

GenerateDataKey

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

What is the API for data key caching?

A

LocalCryptoMaterialsCache

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

What is the API for creating a unique symmetric data key (DEK)?

A

GenerateDataKey

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

What is the API for encrypting data 4KB or less?

A

Encrypt

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

What is the API for generating a DEK for later use (not immediately)?

A

GenerateDataKeyWithoutPlaintext

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

When you exceed a KMS request quota, what happens?

A

You get a ThrottlingException

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

What are the possible solutions for resolving a KMS ThrottlingException?

A
  1. exponential backoff
  2. For GenerateDataKey, use DEK caching from the Encryption SDK
  3. you can request a quota increase through API or AWS support
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

True or False: Shared KMS request quotas vary with the AWS Region and the type of CMK used in the request.

A

True

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

What are the 4 methods of encrypting objects in S3?

A
  1. SSE-S3
  2. SSE-KMS
  3. SSE-C
  4. Client-side Encryption
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is SSE-S3?

A

SSE-S3 encrypts S3 objects using keys handled and managed by AWS

20
Q

What is SSE-KMS?

A

SSE-KMS leverages KMS to manage encryption keys

21
Q

What is SSE-C?

A

SSE-C is when you want to manage your own encryption keys

22
Q

What are the advantages of SSE-KMS?

A

user control and audit trail

23
Q

What header must be set for SSE-KMS?

A

“x-amz-server-side-encryption”: “aws:kms”

24
Q

What API calls does SSE-KMS leverage?

A

GenerateDataKey and DecryptKMS

these KMS API calls will show up in CloudTrail

25
What do you need to perform SSE-KMS?
1. A KMS Key Policy that authorizes the user / role 2. An IAM policy that authorizes access to KMS (otherwise you'll get an access denied error)
26
True or False: S3 calls to KMS for SSE-KMS do not count against your KMS limits.
False. S3 calls to KMS for SSE-KMS do count against your KMS limits.
27
How can you enforce SSL on an S3 bucket?
Create an S3 bucket policy with a DENY on the condition aws:SecureTransport = false
28
What is SSM Parameter Store?
AWS Systems Manager Parameter Store - secure, hierarchical storage for configuration data management and secrets management - simple API - KMS encryption is optional - can integrate with CloudFormation - can track versions - 2 tiers: Standard (free) and Advanced ($)
29
What is AWS Secrets Manager?
- protect secrets needed to access your applications and services - Capability to force rotation of secrets - automatic creation of secrets on rotation (using Lambda) - KMS encryption is mandatory - integration with RDS and CloudFormation
30
How does KMS encryption work?
KMS stores the CMK, and receives data from the clients, which it encrypts and sends back
31
Which AWS entities can be used to deploy SSL/TLS server certificates?
AWS Certificate Manager and IAM
32
Which is less expensive: SSM Parameter Store or Secrets Manager?
SSM Parameter Store
33
What would you suggest for someone who wants to rotate their keys?
Secrets Manager
34
How should you store secrets in CodeBuild?
DO NOT STORE THEM AS PLAINTEXT IN ENVIRONMENT VARIABLES Use environment variables to reference parameter store parameters or secrets manager secrets.
35
Are CloudTrail event log files encrypted by default?
Yes, with S3 Server-Side Encryption (SSE)
36
KMS stores what types of keys?
Master keys (not data keys)
37
KMS can be used with what AWS service to audit keys access history?
CloudTrail
38
What are the primary resources in KMS?
Customer Master Keys (CMKs)
39
What level of compliance does KMS have?
FIPS 140-2 Level 2 compliant
40
What is the KMS command to turn on automatic key rotation?
> aws kms enable-key-rotation | only for symmetric keys
41
What should you use to store database credentials?
Secrets Manager It will store and automatically rotate your database credentials
42
What should you use to block a single IP address?
NACL
43
Are NACLs stateful or stateless?
Stateless (incoming rule will not be applied to outgoing)
44
Are Security Groups stateful or stateless?
STATEFUL (if traffic is allowed inbound, it is also allowed outbound)
45
Can a Security Group block a single IP address?
No. You cannot block specific IP addresses with Security Groups, for this you would need a Network Access Control List (NACL)