Production checklist
Security, reliability, performance and operations items to check before and after you put a Spica instance in front of real users.
Security
- The default identity's password is changed (
--passport-default-identity-passwordorapplication.defaultPassword), or the default identity is removed. - Every team member has a personal identity with only the policies they need.
- Identities with full access use two-factor authentication.
- The master key is long, random, stored in a secret manager and backed up.
- The API is served over HTTPS only, and
--public-urluseshttps://. -
--cors-allowed-originslists your apps' origins instead of*. - Response headers such as
X-Frame-OptionsandStrict-Transport-Securityare set with--response-header. - No API key with write access, or read access to private data, is used in browsers or mobile apps.
- Every bucket that users can reach has read and write rules.
- HTTP functions that change data use
authenticate, and public ones userateLimit. - Credentials used by functions are secrets, not environment variables.
- Password policy, lockout and rate limits are configured for users.
- Access tokens are short-lived and clients use refresh tokens.
Data
- The database runs with authentication. MongoDB runs as a replica set, preferably with three members.
- Automated backups of the database, files and function sources exist, and a restore has been tested.
- Buckets have indexes for their common filters, sorts and rules.
- Buckets that grow without bound (logs, notifications) have document limits.
- Uploaded files and function sources live on durable, shared storage when you run several replicas.
Reliability and performance
- Liveness and readiness probes use
/status/liveand/status/ready. - API containers have memory limits, and
--function-builder-max-memorystays below them when you use the rollup builder. - Function timeouts match the real duration of their handlers.
- Latency-sensitive functions use warm workers, and I/O-bound ones a higher
concurrencyPerWorker. - Read-heavy public data is served with the bucket response cache or a CDN.
-
--replicationis on when you run more than one API replica. - Your proxy allows WebSocket upgrades and long-lived connections on
/api. - Your proxy's body size limit matches
--storage-object-size-limitand--payload-size-limit.
Operations
- Resources are kept in git and deployed with
spica planandspica applyfrom CI. - Access logs and function worker logs go to stdout and into your log platform.
- Alerts exist for function errors, 5xx responses and database health.
- You know how long logs and activity are kept (
--common-log-lifespan) and it fits your audit needs. - Image versions are pinned, and upgrades are tested on staging first.
- Unused identities, API keys and refresh tokens are reviewed and removed regularly.