Security is protecting confidentiality, integrity and availability by thinking like a burglar: know what you're guarding and from whom (threat model), shrink every door and window (attack surface), stack independent locks (defence in depth), give everyone only the keys they need (least privilege), and never trust input (Ch 1).
Three look-alike tools do very different jobs: encoding changes the alphabet and hides nothing; hashing makes a one-way fingerprint; encryption locks data in a box only a key opens (Ch 2). Passwords are the special case: never stored, only fingerprinted — with a unique salt per user and a deliberately slow function like Argon2id, so a stolen table costs attackers years instead of seconds (Ch 3). Real systems encrypt in transit with TLS and at rest with AES-GCM, guard the keys in KMS with envelope encryption, and prove messages are genuine with HMAC signatures (Ch 4).
Authentication is the passport; authorization is the boarding pass. MFA and passkeys harden the first; sessions or signed JWTs
remember it; and the second must be checked on the server, every time (Ch 5) — because the most common real breach is simply
broken access control: /notes/43 handed to the wrong student (Ch 6).
Whenever data meets an interpreter, keep them apart: parameterized queries stop SQL injection and argument lists stop command injection (Ch 7); escaping, sanitizing, HttpOnly cookies and CSP stop scripts hiding in content (XSS, Ch 8). Browsers isolate sites with the same-origin policy, CORS deliberately relaxes it, and SameSite cookies and CSRF tokens close the "send in the user's name" loophole (Ch 9). Servers must not be tricked into fetching internal addresses (SSRF) or reading outside their folders (path traversal) (Ch 10). The unglamorous basics — secrets out of code, dependencies patched and pinned, logins rate-limited, security events logged — prevent more breaches than anything clever (Ch 11).
And for an AI engineer, the newest injection: prompt injection, where instructions hidden in data steer the model. There is no perfect filter, so you limit what a fooled model can do — scope its tools to the current user, treat its output as untrusted, and keep a human in the loop for anything dangerous (Ch 12).
This completes Foundations. You now understand the machine, its operating system, how it talks across the internet, how to drive it from a terminal, how to version your work, and how to keep it all safe. Next: this Java course, where you learn to write code in Java.