Security overview¶
Authentication¶
Use an established authentication provider or maintained authentication library. The selected solution must support registration, login, password reset, and account deletion. The team must not implement password storage, session cryptography, reset-token generation, or OAuth protocols from scratch.
Authorisation¶
Authentication does not grant automatic submission access. The backend must enforce roles and competition/season/fixture scope for every protected operation. Approved submitters should only submit within their assigned scope.
Input and data protection¶
- Validate all request bodies, files, parameters, and query strings.
- Apply upload size/type limits and reject invalid files with actionable messages.
- Use transactions and uniqueness constraints for idempotent batch ingestion.
- Parameterise database queries.
- Store secrets in deployment secret stores, never source control.
- Minimise personal data and define deletion/retention behaviour.
API protection¶
- Enforce HTTPS in deployed environments.
- Apply safe CORS rules rather than allowing arbitrary origins in production.
- Add rate limits and quotas before issuing public consumer keys.
- Use timeouts, retries with limits, and circuit-breaking/fallback behaviour for external APIs.
- Return safe error messages and structured internal logs.
Verification¶
Security review must include automated dependency scanning, route-level authorisation tests, negative validation tests, secret scanning, deployment review, and manual threat-model updates for major features.