← All Learning Paths

Secrets & Keys

Handle secrets and keys across their lifecycle: storage, rotation, revocation, and leak response.

technicalintermediate8 nodes10.42h total

Learning path

Handle secrets and keys across their lifecycle: storage, rotation, revocation, and leak response.

  1. Carry out "Rotate API Keys Without Breaking Clients" on a secrets & keys project, pausing at the "Replace a compromised or aging API key with zero unplanned client outages and a clear audit" step to verify "No key is unknown, and high-impact keys have a named owner.".

    Completion criteria: Record the state "Replace a compromised or aging API key with zero unplanned client outages and a clear audit" at the verification step, then paste the output of "No key is unknown, and high-impact keys have a named owner." that proves it.

    Next step: Rotate a Leaked Secret Safely

    ⏱ 0.5h

  2. Execute "Rotate a Leaked Secret Safely" end to end, then repeat the last step with one parameter changed and compare "A new random secret that has never appeared in the repository or logs.".

    Prerequisites: Rotate API Keys Without Breaking Clients

    Completion criteria: Show the command for every step of "Rotate a Leaked Secret Safely" and paste the output proving "A new random secret that has never appeared in the repository or logs."; then note the step where "Revoke the exposed credential at the provider first. Do not wait for history cleanup;" appears.

    Next step: Add Fencing Tokens to Protected Writes

    ⏱ 0.5h

  3. Run "Every acquisition receives a strictly increasing token." from "Add Fencing Tokens to Protected Writes" and confirm the documented result "Issue a token greater than every previous token when leadership is acquired, for example".

    Prerequisites: Rotate a Leaked Secret Safely

    Completion criteria: Run "Add Fencing Tokens to Protected Writes" twice — once as written and once with a changed input — and attach both transcripts with the observed difference.

    Next step: HMAC Generator

    ⏱ 0.5h

  4. Use "HMAC Generator" on a secrets & keys sample, then check "hmac, crypto, security" against your manual result.

    Completion criteria: Run two inputs through "HMAC Generator", record both outputs, and show one case where "text to hash" changes as expected.

    Next step: SHA-256 Hash Generator

    ⏱ 0.25h

  5. Feed a representative input into "SHA-256 Hash Generator" and verify "text to hash" by hand.

    Prerequisites: HMAC Generator

    Completion criteria: Paste two input/output pairs from "SHA-256 Hash Generator" and annotate the one where "Generate SHA-256 cryptographic hashes from text input using the Web Crypto API." changes the result.

    Next step: Security Boundaries in Modern Web Applications

    ⏱ 0.25h

  6. Compare "Composing the Boundary" with "A practical tour of the browser security model: same-origin policy, CSP, CORS, XSS, and CSRF" in "Security Boundaries in Modern Web Applications" and state which trade-off you would accept in secrets & keys code.

    Prerequisites: SHA-256 Hash Generator

    Completion criteria: Write a five-line decision note citing "Composing the Boundary" 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: Redact Secrets Before Logging

    ⏱ 1h

  7. Solve "Redact Secrets Before Logging" for secrets & keys work: turn JSON object: { text: string } into upstream key=[REDACTED] user=bob status=200 and pass both samples.

    Completion criteria: Submit a solution for "Secrets & Keys" that passes both samples ({text:upstream key=sk-live-abcdef1234567890 user=bob to upstream key=[REDACTED] user=bob status=200) and attach the failing case you fixed.

    Next step: Capstone: Secrets & Keys

    ⏱ 0.42h

  8. Ship "Scope check" from "Build an API Key Management Service", then prove it with the project's test suite and an acceptance note.

    Prerequisites: Redact Secrets Before Logging

    Completion criteria: Run the project's test command for "Build an API Key Management Service", paste the passing output, and attach the acceptance note for "Scope check" with the test name.

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

    ⏱ 4h