Preface |
|
xii | |
Acknowledgments |
|
xiv | |
About this book |
|
xvi | |
About the author |
|
xix | |
About the cover illustration |
|
xx | |
|
1 Introduction to AWS security |
|
|
1 | (16) |
|
1.1 The shared responsibility model |
|
|
2 | (3) |
|
What is AWS responsible for? |
|
|
2 | (2) |
|
What are you responsible for? |
|
|
4 | (1) |
|
1.2 Cloud-native security tools |
|
|
5 | (9) |
|
Identity and access management |
|
|
5 | (2) |
|
|
7 | (6) |
|
|
13 | (1) |
|
1.3 A new way of operating |
|
|
14 | (1) |
|
Speed of infrastructure development |
|
|
14 | (1) |
|
Shifting responsibilities |
|
|
15 | (1) |
|
|
15 | (2) |
|
2 Identity and access management |
|
|
17 | (27) |
|
2.1 Identity and access management basics |
|
|
18 | (17) |
|
|
18 | (1) |
|
|
19 | (8) |
|
Resource policies 25 Groups |
|
|
27 | (3) |
|
|
30 | (5) |
|
2.2 Using common patterns in AWS IAM |
|
|
35 | (5) |
|
|
35 | (1) |
|
|
35 | (5) |
|
2.3 Attribute-based access control with tags |
|
|
40 | (4) |
|
|
40 | (1) |
|
|
41 | (3) |
|
|
44 | (11) |
|
3.1 Securing access between multiple accounts |
|
|
44 | (6) |
|
The wall between accounts |
|
|
45 | (2) |
|
|
47 | (1) |
|
Managing multiple accounts with AWS organizations |
|
|
48 | (2) |
|
3.2 Integration with existing access management systems |
|
|
50 | (5) |
|
Integrating with Active Directory and other SAML systems |
|
|
50 | (1) |
|
Integrating with OpenID Connect systems |
|
|
51 | (4) |
|
4 Policies and procedures for secure access |
|
|
55 | (26) |
|
4.1 Establishing best practices for IAM |
|
|
58 | (4) |
|
Why create best practices? |
|
|
59 | (1) |
|
Best practices example: MFA 59 Enforceable best practices |
|
|
60 | (2) |
|
4.2 Applying least privilege access control |
|
|
62 | (7) |
|
Why least privilege is hard |
|
|
63 | (1) |
|
|
64 | (2) |
|
|
66 | (2) |
|
Shared permissions (groups and managed policies) |
|
|
68 | (1) |
|
4.3 Choosing between short- and long-lived credentials |
|
|
69 | (2) |
|
The risk of long-lived credentials |
|
|
69 | (1) |
|
Trade-offs associated with credential rotation |
|
|
70 | (1) |
|
|
71 | (1) |
|
4.4 Reviewing IAM permissions |
|
|
71 | (10) |
|
Why you should review IAM resources |
|
|
72 | (5) |
|
Types of reviews 72 Reducing the review burden |
|
|
77 | (4) |
|
5 Securing the network: The virtual private cloud |
|
|
81 | (31) |
|
5.1 Working with a virtual private cloud |
|
|
83 | (9) |
|
|
84 | (2) |
|
|
86 | (1) |
|
Network interfaces and IPs |
|
|
87 | (2) |
|
Internet and NAT gateways |
|
|
89 | (3) |
|
5.2 Traffic routing and virtual firewalls |
|
|
92 | (12) |
|
|
93 | (4) |
|
|
97 | (4) |
|
|
101 | (3) |
|
5.3 Separating private networks |
|
|
104 | (8) |
|
Using multiple VPCs for network isolation |
|
|
104 | (2) |
|
|
106 | (3) |
|
Connecting VPCs to private networks |
|
|
109 | (3) |
|
6 Network access protection beyond the VPC |
|
|
112 | (29) |
|
6.1 Securing access to services with VPC endpoints and PrivateLink |
|
|
114 | (8) |
|
What's wrong with public traffic? |
|
|
115 | (1) |
|
|
116 | (2) |
|
Creating a PrivateLink service |
|
|
118 | (4) |
|
6.2 Blocking malicious traffic with AWS Web Application Firewall |
|
|
122 | (14) |
|
|
124 | (3) |
|
Blocking real-world attacks with custom AWS WAF rules |
|
|
127 | (6) |
|
|
133 | (3) |
|
6.3 Protecting against distributed denial of service attacks using AWS Shield |
|
|
136 | (2) |
|
Free protection with Shield Standard |
|
|
136 | (1) |
|
Stepping up protection with Shield Advanced |
|
|
137 | (1) |
|
6.4 Integrating third-party firewalls |
|
|
138 | (3) |
|
Web application and next-gen firewalls |
|
|
138 | (1) |
|
Setting up a firewall from AWS Marketplace |
|
|
139 | (2) |
|
7 Protecting data in the cloud |
|
|
141 | (32) |
|
7.1 Data security concerns |
|
|
142 | (5) |
|
|
143 | (2) |
|
|
145 | (2) |
|
|
147 | (1) |
|
7.2 Securing data at rest |
|
|
147 | (9) |
|
|
148 | (4) |
|
Least privilege access controls |
|
|
152 | (1) |
|
|
153 | (3) |
|
7.3 Securing data in transit |
|
|
156 | (4) |
|
Secure protocols for data transport |
|
|
157 | (1) |
|
Enforcing secure transport |
|
|
158 | (2) |
|
|
160 | (9) |
|
Access logging for Amazon S3 |
|
|
160 | (3) |
|
CloudTrail logs for resource access |
|
|
163 | (2) |
|
VPC Flow Logs for network access |
|
|
165 | (4) |
|
|
169 | (4) |
|
Identifying sensitive data with Amazon Made |
|
|
170 | (3) |
|
8 Logging and audit trails |
|
|
173 | (26) |
|
8.1 Recording management events |
|
|
175 | (7) |
|
|
177 | (3) |
|
Investigating an issue with CloudTrail logs |
|
|
180 | (2) |
|
8.2 Tracking resource configuration changes |
|
|
182 | (6) |
|
Pinpoint a change with a configuration timeline |
|
|
183 | (3) |
|
|
186 | (1) |
|
Resource compliance information |
|
|
187 | (1) |
|
8.3 Centralizing application logs |
|
|
188 | (11) |
|
|
188 | (2) |
|
|
190 | (2) |
|
Advanced CloudWatch logs features |
|
|
192 | (5) |
|
Recording network traffic |
|
|
197 | (2) |
|
|
199 | (28) |
|
9.1 Resource configuration scanning |
|
|
200 | (10) |
|
|
201 | (3) |
|
|
204 | (4) |
|
Compliance standards and benchmarks |
|
|
208 | (2) |
|
9.2 Host vulnerability scanning |
|
|
210 | (4) |
|
Types of host vulnerabilities |
|
|
211 | (1) |
|
|
211 | (3) |
|
9.3 Detecting threats in logs |
|
|
214 | (13) |
|
|
215 | (3) |
|
Threats in CloudTrail logs |
|
|
218 | (9) |
|
10 Incident response and remediation |
|
|
227 | (18) |
|
10.1 Tracking security events |
|
|
228 | (8) |
|
|
229 | (4) |
|
|
233 | (2) |
|
|
235 | (1) |
|
10.2 Incident response planning |
|
|
236 | (3) |
|
|
237 | (2) |
|
10.3 Automating incident response |
|
|
239 | (6) |
|
|
239 | (4) |
|
|
243 | (2) |
|
11 Securing a real-world application |
|
|
245 | (34) |
|
11.1 A sample application |
|
|
246 | (9) |
|
Diving into the application |
|
|
246 | (4) |
|
|
250 | (5) |
|
11.2 Strong authentication and access controls |
|
|
255 | (4) |
|
|
255 | (2) |
|
|
257 | (1) |
|
Overly permissive policies and incorrect authorization settings |
|
|
258 | (1) |
|
Inadvertent admin or root access |
|
|
258 | (1) |
|
|
259 | (5) |
|
|
259 | (1) |
|
|
260 | (2) |
|
|
262 | (1) |
|
|
263 | (1) |
|
11.4 Web application firewalls |
|
|
264 | (7) |
|
|
265 | (1) |
|
|
266 | (3) |
|
|
269 | (2) |
|
11.5 Implementing authentication and authorization end to end |
|
|
271 | (8) |
|
|
271 | (4) |
|
Securing the API gateway endpoints |
|
|
275 | (4) |
Index |
|
279 | |