Skip to content

Commit 9af4f43

Browse files
committed
docs(checkpoint): complete checkpoint 20 - HTTPS and SSL certificates
1 parent 29c7786 commit 9af4f43

8 files changed

Lines changed: 51 additions & 18 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ This repository was created to:
8585

8686
- [x] Nginx
8787
- [x] Reverse Proxy
88-
- [ ] HTTPS
89-
- [ ] SSL Certificates
88+
- [x] HTTPS
89+
- [x] SSL Certificates
9090

9191
---
9292

checkpoints/checkpoint-20-https-and-ssl-certificates.md

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# # SSL certificates
2+
# ssl/
3+
4+
# Or, if you prefer:
5+
*.key
6+
# *.crt

labs/networking/reverse-proxy-lab/compose.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ services:
99

1010
nginx:
1111
image: nginx
12+
1213
ports:
1314
- '8080:80'
15+
- '8443:443'
16+
1417
volumes:
18+
- ./frontend:/usr/share/nginx/html
1519
- ./nginx.conf:/etc/nginx/conf.d/default.conf
20+
- ./ssl:/etc/nginx/ssl
21+
1622
depends_on:
1723
- frontend
1824
- backend

labs/networking/reverse-proxy-lab/nginx.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
server {
22
listen 80;
33

4+
return 301 https://localhost:8443$request_uri;
5+
}
6+
7+
server {
8+
listen 443 ssl;
9+
10+
ssl_certificate /etc/nginx/ssl/nginx.crt;
11+
ssl_certificate_key /etc/nginx/ssl/nginx.key;
12+
413
location / {
514
proxy_pass http://frontend:80;
615
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIEBTCCAu2gAwIBAgIUaZCj/JFOlEOYADDeSDNPDw4nWq0wDQYJK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E/EKwTq185RdiEQ2Uz/lz0ia6HoyWIctcXQH3xA
19+
ctWfx6U7+rvhS4FixjDnH6P0EbUQR/5nSp+VSMoQyAqF5I0ooiRqQTx3IlwEe3ph
20+
zvwELHtYOrdaYwjyvE87sZEvdaTq6e1yd2jjYSe2Hd8ZrQhoV8hY07dOEaV3hWLB
21+
Izd6f2padxrG0gZyuCc7yi/jxEWi1r6YM82QsrmgTYnl1VWDJcge/gEFf0g+VKQ/
22+
DyHU/BZjWshcZfbwQWiaoMMPfMebVz7xywculZgxMgQJXsMfnHUESxJcU2M0z/ru
23+
pNtIADli2yvGs1/C3LvkPCyuwkdWrGUBPA==
24+
-----END CERTIFICATE-----

resources/phase-3-cheatsheet.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,3 @@ Code
124124
- Containers
125125
- Pipelines
126126
- Deployment
127-
128-
# avoid showing
129-
130-
pwd
131-
ls
132-
tree .
133-
docker ps
134-
docker images
135-
docker network ls
136-
docker compose ps
137-
git status
138-
git log

resources/trivy-commands.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
Quick trick to make the output readable
1+
# Quick trick to make the output readable
22

3-
Only show high-severity findings:
3+
# Only show high-severity findings:
44

55
trivy image --severity HIGH,CRITICAL my-first-image
66

7-
Show only the summary:
7+
# Show only the summary:
88

99
trivy image --severity HIGH,CRITICAL --format table my-first-image
1010

11-
Count vulnerabilities without flooding:
11+
# Count vulnerabilities without flooding:
1212

1313
trivy image --severity HIGH,CRITICAL --quiet my-first-image

0 commit comments

Comments
 (0)