Skip to main content
Cybersecurity

Security Fundamentals Tutorial with Examples.

Security fundamentals tutorial for beginners: the CIA triad, risk, attack surface, failing closed, defense in depth and security logging.

Beginner

Start here — no prior experience needed

4 lessons

Intermediate

For developers with core concepts down

4 lessons

Also part of Security Fundamentals

Taught in other topics. Each link opens the lesson in its home topic.

12 lessons
linux intermediate
5 min read

A real permission-denied error from a locked-down file, then stripping the setuid bit from /usr/bin/passwd to see exactly why an ordinary user can't change their own password without it.

sql advanced
5 min read

Secure PostgreSQL with real output: roles, GRANT and REVOKE, column privileges, the locked public schema, row-level security, and SQL injection.

redis intermediate
5 min read

A default Redis install lets every connection run every command against every key. ACL SETUSER changes that — including a real NOPERM the moment a restricted user reaches outside its allowed keys or commands.

kafka intermediate
5 min read

A default Kafka cluster trusts every connection completely. Turn on SASL/PLAIN and an ACL authorizer, and watch an unauthorized client fail with the exact exception Kafka throws — for a topic, then for a consumer group.

cloud-interviews beginner
5 min read

How a policy decision is actually evaluated, why an explicit deny always wins, roles versus long-lived keys, and the wildcard that looks scoped and is not.

api-testing intermediate
5 min read

Extend the local test API with two auth schemes and catch the assumption that 'wrong token' and 'no token' return the same status code — they don't, and mixing them up hides real bugs.

fastapi intermediate
5 min read

Hash passwords with pwdlib and Argon2, log in through FastAPI's OAuth2 password flow, issue JWTs, and see wrong, expired and tampered tokens get 401s.

docker advanced
5 min read

Harden Docker images and containers: non-root users, read-only filesystems, secrets management, image scanning, and runtime policies.

data-engineering advanced
5 min read

Run the same email and SSN through three PII techniques and see what each gives up: hashing for joins, masking for display, tokenization for reversal.

cryptography beginner
5 min read

Run SHA-256 and HMAC in Python: one input bit flips half the digest, a recomputed hash fools a naive check, and only the keyed HMAC rejects the forgery.

web-security beginner
5 min read

A Flask API leaks another user's invoice. Add the ownership check that fixes it, and a pytest sweep that catches the next route to forget the check.

mcp advanced
5 min read

Protect an MCP server with OAuth: the 401 and resource metadata, audience and scope checks, CIMD versus DCR, token refresh, Keycloak and DPoP in the SDK.