← All Learning Paths

Authentication & Security

An authentication path covering JWT flows across JavaScript, Python, Go, Rust, and TypeScript, secret handling, traversal guards, and token inspection.

technicalintermediate14 nodes13.75h total

A security-focused learning path covering authentication, authorization, OAuth2, JWT, session management, password security, CORS, CSP, and common vulnerabilities for secure web applications.

  1. Read "A Complete Guide to JWT Authentication in Web Applications" for the "Anatomy of a JWT" argument, then name the decision in security work it would change.

    Completion criteria: Record a short walkthrough of "A Complete Guide to JWT Authentication in Web Applications" with timestamps at "Anatomy of a JWT" and "Choosing a Signing Algorithm", plus the commit that applies it.

    Next step: Security Boundaries in Modern Web Applications

    ⏱ 1h

  2. Compare "Content Security Policy" with "Cross-Origin Resource Sharing" in "Security Boundaries in Modern Web Applications" and state which trade-off you would accept in security code.

    Prerequisites: A Complete Guide to JWT Authentication in Web Applications

    Completion criteria: Write a five-line decision note citing "Content Security Policy" from "Security Boundaries in Modern Web Applications", name the option you rejected, and attach the before/after diff of one file you changed.

    Next step: Node.js JWT Auth with Express

    ⏱ 1h

  3. Execute "Node.js JWT Auth with Express", change one constant, and describe how the output diverges from "Implement JWT authentication flow in Node.js Express with bcrypt password hashing, token".

    Prerequisites: Security Boundaries in Modern Web Applications

    Completion criteria: Save two runs of "Node.js JWT Auth with Express" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: FastAPI JWT Authentication Middleware

    ⏱ 0.75h

  4. Run the security snippet "FastAPI JWT Authentication Middleware", capture stdout, and show which line demonstrates the documented behavior: "Implement JWT authentication in FastAPI with python-jose and passlib.".

    Prerequisites: Node.js JWT Auth with Express

    Completion criteria: Attach the terminal transcript for "FastAPI JWT Authentication Middleware": command, exit code, and the printed result you used to confirm "Implement JWT authentication in FastAPI with python-jose and passlib.".

    Next step: Go JWT Authentication with Claims

    ⏱ 0.75h

  5. Adapt "Go JWT Authentication with Claims" to a second input and compare the new output with the behavior described in "Generate and validate JWT tokens in Go using the golang-jwt package with custom claims,".

    Prerequisites: FastAPI JWT Authentication Middleware

    Completion criteria: Change one constant in "Go JWT Authentication with Claims", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Rust JWT Authentication

    ⏱ 0.75h

  6. Execute "Rust JWT Authentication", change one constant, and describe how the output diverges from "Implement JWT authentication in Rust using the jsonwebtoken crate with HMAC-SHA256 signing,".

    Prerequisites: Go JWT Authentication with Claims

    Completion criteria: Paste the command, the exit code, and the output line matching "Implement JWT authentication in Rust using the jsonwebtoken crate with HMAC-SHA256 signing,"; then show a second run with a changed parameter.

    Next step: Next.js JWT Authentication Middleware

    ⏱ 0.75h

  7. Run the security snippet "Next.js JWT Authentication Middleware", capture stdout, and show which line demonstrates the documented behavior: "Implement JWT-based authentication in Next.js using middleware for route protection,".

    Prerequisites: Rust JWT Authentication

    Completion criteria: Save two runs of "Next.js JWT Authentication Middleware" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: Load Secrets From Environment Not From Files

    ⏱ 0.75h

  8. Adapt "Load Secrets From Environment Not From Files" to a second input and compare the new output with the behavior described in "A config loader that keeps secret values out of committed files by resolving them from the".

    Prerequisites: Next.js JWT Authentication Middleware

    Completion criteria: Attach the terminal transcript for "Load Secrets From Environment Not From Files": command, exit code, and the printed result you used to confirm "A config loader that keeps secret values out of committed files by resolving them from the".

    Next step: Log Scrubber Redacting Secret Values

    ⏱ 0.75h

  9. Execute "Log Scrubber Redacting Secret Values", change one constant, and describe how the output diverges from "A structured log scrubber that masks known secret keys and bearer tokens before".

    Prerequisites: Load Secrets From Environment Not From Files

    Completion criteria: Change one constant in "Log Scrubber Redacting Secret Values", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Safe Path Join Blocking Traversal

    ⏱ 0.75h

  10. Run the security snippet "Safe Path Join Blocking Traversal", capture stdout, and show which line demonstrates the documented behavior: "A path resolver that joins untrusted segments onto a base directory and rejects any attempt".

    Prerequisites: Log Scrubber Redacting Secret Values

    Completion criteria: Save two runs of "Safe Path Join Blocking Traversal" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: jsonwebtoken

    ⏱ 0.75h

  11. Read "jsonwebtoken"'s documented surface around "jwt.sign jwt.sign(payload, secret, opts?): string", then build a minimal endpoint and log the response.

    Prerequisites: Safe Path Join Blocking Traversal

    Completion criteria: Attach one successful call and one invalid call against "jsonwebtoken", citing "jwt.sign jwt.sign(payload, secret, opts?): string" as the documented surface.

    Next step: JWT Token Decoder

    ⏱ 1h

  12. Use "JWT Token Decoder" on a security sample, then check "jwt-token to decoded-payload" against your manual result.

    Prerequisites: jsonwebtoken

    Completion criteria: Run two inputs through "JWT Token Decoder", record both outputs, and show one case where "jwt-token to decoded-payload" changes as expected.

    Next step: Validate Token Claims Against a Policy

    ⏱ 0.25h

  13. Build "Validate Token Claims Against a Policy" for security code and verify [expired] against both samples.

    Prerequisites: JWT Token Decoder

    Completion criteria: Attach the solution file for "Authentication & Security", two passing sample runs, and one failing run whose error matches the contract.

    Next step: Capstone: Authentication & Security

    ⏱ 0.5h

  14. Ship "Authorization code issue" from "Implement an OAuth2 Authorization Code Server", then prove it with the project's test suite and an acceptance note.

    Prerequisites: JWT Token Decoder, Validate Token Claims Against a Policy

    Completion criteria: Deliver "Authorization code issue" and paste the test output where the acceptance test passes; include the test name and command.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h