Pcornel
Security · Secrets Management

Tokens

Cheat sheet · https://pcornel.dk/topic.php?topic=5062

Back to the Topic

Answer

Tokens are issued credentials such as OAuth access tokens, personal access tokens or session tokens. Prefer short-lived, narrowly scoped tokens and protect refresh tokens like passwords.

Remember

  • Short-lived and narrowly scoped.
  • Refresh tokens are as sensitive as passwords.
  • Revoke on logout or compromise.

First checks

  • Token lifetimes — short
  • Token storage (no logs/URLs) — protection
  • Revocation capability — incident response

Verify in this order

issuance → use → expiry/revocation

Where it usually breaks

First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5062

Confirmation

Confirm action

Continue?