1. Identifying is not authorising
Authentication establishes the identity of the caller invoking a service. Authorisation evaluates whether that identity is allowed to perform a specific action on a specific resource. Both checks must be enforced on the server side.
2. Every resource belongs to a context
In systems serving multiple organisations, a valid identity does not imply access to every tenant. Membership, roles and resource ownership must always be verified. Denying by default reduces accidental data exposure.
3. Validate inputs and handle errors
Parameters, request bodies and uploaded files from clients must never be trusted blindly. APIs should validate schemas, enforce least privilege, log failures without leaking secrets and return consistent error responses.
4. Retries and idempotency
When an upstream service fails transiently, retrying may be appropriate, whereas duplicating payments or orders is not. An idempotent operation is designed so that repeating the same request produces no unintended duplicate side effects.
Further reading
Reviewable introductory material—not a security certification or description of an executed penetration audit.

