Educational guidance only. This article is not legal advice, an audit conclusion or an authorization to test systems.
Authorize the requested object
A valid token does not permit access to every record. Check ownership, tenant and role against the specific operation. Changing a record identifier must never bypass those checks.
Validate and minimize
Accept only expected fields and types. Return only the fields the caller needs. Avoid trusting browser-supplied ownership or role fields as authority.
Bound usage and document access
Apply appropriate rate limits and input bounds. Keep an inventory of endpoints and owners. Review old API versions and logs without leaking tokens or private data.