Reference

Security & identity

Look up identity, access checks, browser defenses, secrets and safe input boundaries.

Scope and conventions

Web/API security patterns, not a complete authentication implementation or security certification. Sequences are labeled sketches. Use maintained framework/provider libraries for identity and cryptography; adapt policies to your trust boundaries. Primary sources accompany each entry.

Authorization

Deny access unless a policy permits it

Web & API security

Enforce authorization on the server for every protected request, including downloads and alternate routes. Missing policy, malformed context or a failed policy lookup must not silently grant access.

Protocol / decision sketch

Sequence or decision sketch; not executable code.

Web & API security · Deny access unless a policy permits it
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
no explicit permit → deny
policy evaluation fails → fail closed
UI hides a button → server still checks the action

Check the particular object and tenant

Web & API security

Use the authenticated principal and server-established tenant scope in the resource lookup and permission decision. A UUID or unguessable ID does not replace object-level authorization.

Protocol / decision sketch

Sequence or decision sketch; not executable code.

Web & API security · Check the particular object and tenant
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
principal A requests /documents/B
check: tenant membership + resource ownership/relationship + action
return only data permitted by that decision

Keep role membership separate from the full decision

Web & API security

A role can grant a category of action, while resource attributes and relationships constrain which objects are accessible. Evaluate the policy using trusted server data, not client-supplied roles.

Protocol / decision sketch

Sequence or decision sketch; not executable code.

Web & API security · Keep role membership separate from the full decision
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
editor role + same tenant + document editable → may edit
editor role + different tenant              → deny