WEBVTT
Kind: captions
Language: en

1
00:00:00.000 --> 00:00:07.215
Welcome back to Domain 2, Security and Compliance. Last time, roles kept long-term keys out of

2
00:00:07.215 --> 00:00:12.895
our store's code. Today we protect the data itself, with two ideas. First,

3
00:00:12.895 --> 00:00:19.880
encryption: for data sitting on disk, called at rest, and for data moving across a network,

4
00:00:19.880 --> 00:00:27.171
called in transit. Second, secrets: where to keep database passwords and API keys so they never

5
00:00:27.171 --> 00:00:31.700
sit in your code. The exam tests both in tasks 2.2 and 2.3.

6
00:00:32.100 --> 00:00:37.632
Encryption turns readable data, called plaintext, into scrambled ciphertext,

7
00:00:37.632 --> 00:00:44.547
using an algorithm and a key. A shopper's order details go in, and what comes out is useless to

8
00:00:44.547 --> 00:00:50.298
anyone who doesn't hold the key. The matching key turns it back into plaintext.

9
00:00:50.298 --> 00:00:57.286
So encryption doesn't remove risk; it moves it to the key. Whoever controls the key controls the

10
00:00:57.286 --> 00:01:02.600
data. That's why most of today's services are really about managing keys.

11
00:01:03.000 --> 00:01:10.335
Data needs protection in two places. In transit, it travels between the shopper's browser and

12
00:01:10.335 --> 00:01:16.802
the store. TLS, the protocol behind HTTPS, wraps that trip in an encrypted tunnel,

13
00:01:16.802 --> 00:01:23.191
so nobody on the network can read card details. At rest, data sits in S3 buckets,

14
00:01:23.191 --> 00:01:30.289
EBS volumes and RDS databases. Encryption at rest protects it if a disk or copy is stolen.

15
00:01:30.289 --> 00:01:35.100
Good security does both, and on AWS both are easy to turn on.

16
00:01:35.500 --> 00:01:40.434
HTTPS needs a TLS certificate that proves the site really is shop.example.com.

17
00:01:40.434 --> 00:01:46.443
AWS Certificate Manager, or ACM, provisions public and private certificates and deploys them to

18
00:01:46.443 --> 00:01:52.326
integrated services such as Elastic Load Balancing, Amazon CloudFront and Amazon API Gateway.

19
00:01:52.326 --> 00:01:58.335
ACM renews the certificates it manages, so the site never breaks because a certificate expired.

20
00:01:58.335 --> 00:02:02.700
Public certificates used with integrated services cost nothing extra.

21
00:02:03.100 --> 00:02:08.722
For data at rest, the key service is AWS Key Management Service, or KMS.

22
00:02:08.722 --> 00:02:15.983
It creates and controls encryption keys, which are protected by hardware security modules and

23
00:02:15.983 --> 00:02:22.307
never leave KMS unencrypted. Services such as S3, EBS and RDS integrate with KMS,

24
00:02:22.307 --> 00:02:30.115
so encrypting a volume or database is one setting. You decide who may use each key with key policies

25
00:02:30.115 --> 00:02:34.800
and IAM, and every use of a key is logged in AWS CloudTrail.

26
00:02:35.200 --> 00:02:42.805
KMS keys come in three kinds, and the difference is control. AWS owned keys belong to a service

27
00:02:42.805 --> 00:02:50.490
and are shared across accounts; you can't see them. AWS managed keys are created in your account

28
00:02:50.490 --> 00:02:57.454
by a service, with names like aws/s3. You can see and audit them, but AWS manages them.

29
00:02:57.454 --> 00:03:04.418
Customer managed keys are ones you create: you set the policy, turn rotation on or off,

30
00:03:04.418 --> 00:03:06.900
and can disable or delete them.

31
00:03:07.300 --> 00:03:12.721
Both services use hardware security modules, or HSMs. AWS KMS is a managed,

32
00:03:12.721 --> 00:03:18.430
multi-tenant service: AWS runs the HSMs, and it's built into many AWS services.

33
00:03:18.430 --> 00:03:25.369
AWS CloudHSM gives you single-tenant HSMs in your own VPC. You manage the keys and the HSM users

34
00:03:25.369 --> 00:03:32.741
yourself, so you get full control and more responsibility. Choose CloudHSM when rules demand dedicated

35
00:03:32.741 --> 00:03:37.800
hardware that only you control. For most workloads, KMS is the answer.

36
00:03:38.200 --> 00:03:45.394
Now secrets. The store's app needs a database password. Typing it into the code means anyone who

37
00:03:45.394 --> 00:03:52.513
reads the code sees it, and changing it means a redeploy. AWS Secrets Manager stores the secret

38
00:03:52.513 --> 00:03:58.733
encrypted with KMS, controls access with IAM, and lets the app fetch it at runtime.

39
00:03:58.733 --> 00:04:05.628
Its signature feature is automatic rotation on a schedule: it changes the database password,

40
00:04:05.628 --> 00:04:08.700
and the app simply fetches the new value.

41
00:04:09.100 --> 00:04:14.273
Systems Manager Parameter Store looks similar, so the exam likes to compare them.

42
00:04:14.273 --> 00:04:19.573
Parameter Store keeps configuration values, such as endpoints and feature settings,

43
00:04:19.573 --> 00:04:25.639
and its SecureString type encrypts a value with KMS. But it has no built-in automatic rotation.

44
00:04:25.639 --> 00:04:31.131
Secrets Manager is purpose-built for credentials like database passwords and API keys,

45
00:04:31.131 --> 00:04:35.984
with rotation included. If a question says rotate credentials automatically,

46
00:04:35.984 --> 00:04:37.900
the answer is Secrets Manager.

47
00:04:38.300 --> 00:04:43.078
Here's how the exam asks about this. Encrypt data in transit or use HTTPS:

48
00:04:43.078 --> 00:04:47.728
a TLS certificate from ACM. Provision and renew SSL or TLS certificates:

49
00:04:47.728 --> 00:04:53.023
AWS Certificate Manager. Create and control encryption keys: AWS KMS. A dedicated,

50
00:04:53.023 --> 00:04:58.512
single-tenant HSM: AWS CloudHSM. Store and automatically rotate database credentials:

51
00:04:58.512 --> 00:05:03.355
AWS Secrets Manager. Store configuration values centrally: Parameter Store.

52
00:05:03.355 --> 00:05:07.100
And audit who used an encryption key: AWS CloudTrail logs.

53
00:05:07.500 --> 00:05:12.710
To recap: encrypt data in transit with TLS, using certificates from ACM,

54
00:05:12.710 --> 00:05:19.368
and at rest with keys from AWS KMS. KMS keys are AWS owned, AWS managed or customer managed,

55
00:05:19.368 --> 00:05:25.302
depending on how much control you need, and CloudHSM gives you dedicated hardware.

56
00:05:25.302 --> 00:05:32.249
Keep credentials out of code: Secrets Manager stores and rotates them, and Parameter Store holds

57
00:05:32.249 --> 00:05:38.400
configuration. Next, we'll defend the store's front door with AWS WAF and AWS Shield.
