Use it when handling automation credentials around Tokens. Keep credential owner/purpose, secret value custody, retrieval identity, target privilege, runtime exposure, rotation/revocation and verified rejection as separate proof boundaries.
Tokens
Tokens are bearer or proof-bearing credentials whose security depends on issuer trust, audience, scopes/claims, lifetime, storage and validation at the target—not merely on the token string being accepted.
1. Tokens: short-lived, scoped.
2. OIDC federation for CI/cloud.
3. Refresh automatically.
4. Revoke on compromise.
5. Don't log.
identity → token (short TTL) → API
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
workload identity → trusted issuer/grant → token claims/audience/scope → short lifetime → protected runtime handling → relying-party validation → authorized operation → audit correlation → refresh/session lifecycle → expiry/revocation rejection
Healthy evidence: tokens are short-lived, audience- and scope-bound, minted for workload identities, not persisted unnecessarily and expired/wrong-audience tokens are rejected.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: long-lived bearer tokens are copied into config, token caches are world-readable, audiences are ignored or refresh material has no revocation path.
Step 3 Common mistakes Narrow the fault
- Tokens without expiry.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Token decodes ≠ token signature/trust valid.
- Token valid ≠ token intended for this audience.
- Access token short-lived ≠ refresh token low risk.
- HTTP 2xx ≠ token had only intended privilege.
- Token TTLs — short-lived
vault token lookup— TTL and policies- Workload identity/OIDC instead of static tokens — federation
ReferenceWhat it is1 section · depth on demand
Core model
Prefer short-lived tokens minted for a specific workload identity, audience and operation. Validate issuer/audience/time claims at the relying system, protect tokens as secrets, avoid replay-capable persistence, refresh through the intended grant and revoke sessions/refresh material when risk or ownership changes.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
Token evidence shows issuer/relying-party behavior for captured claims and times, but it does not show every authorization decision or eliminate replay risk for stolen bearer material.
In depth
Tokens are credentials issued for API access: personal access tokens, API keys, OAuth access tokens, service-account tokens. They are convenient for automation because they can be scoped and revoked without changing a password, but they are bearer credentials — anyone holding one can use it.
| Practice | Why |
|---|---|
| Minimal scopes | Limits what a leaked token can do |
| Expiry | Leaked tokens stop working |
| One token per integration | Revoke one without breaking others |
| Store in a secret manager | Not in code, Git, or tickets |
| Monitor use | Detect misuse and unused tokens |
Prefer short-lived tokens obtained at run time (OIDC federation, Vault dynamic secrets, cloud workload identity) over long-lived static tokens wherever the platform supports it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Secrets & Credentials > Tokens. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Tokens credential proof-boundary map
Fast identity, handling/execution, effective-outcome and closure proof boundaries for Tokens.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Ownership / source | Credential owner, purpose, consumers and authoritative store/issuer are explicit | Shared or orphaned credentials exist outside a controlled source with unclear consumers |
| Retrieval / exposure | Workload retrieves only required material and plaintext exposure is transient and bounded | Secrets leak to source, logs, command lines, artifacts, caches, child processes or unrelated jobs |
| Effective outcome | Target-side authentication/authorization or secure control outcome is independently observed | Tool/job success substitutes for target authorization, effective state or workload proof |
| Closure / next action | Rotation/revocation, denied-path tests, audit evidence and residual exceptions are explicit | Old credentials remain valid, policy bypass exists, audit gaps are unknown or broad success is inferred from one signal |