Security

Every document is treated as untrusted

Doxzo minimizes access, storage time, and information exposure. This page documents the actual controls in place.

Authentication and authorization

Access is enforced server-side and scoped to the exact records a user may touch.

Password handling

Passwords are hashed with bcrypt at cost 12. Plaintext passwords are never stored.

Sessions

JSON Web Tokens are signed with AUTH_SECRET and expire after 12 hours.

Role enforcement

Customer and vendor roles are checked on the server. Vendors resolve to a Vendor record and can only access jobs matching their vendor ID.

Ownership

Customers can only access their own jobs. There is no cross-tenant document access.

Print codes

The temporary 6-digit code is the bridge between customer and vendor, protected end to end.

Random, never sequential

Codes are randomly generated and never derived from internal IDs or sequence numbers.

Stored as hashes

Only a SHA-256 hash of the code is stored in PostgreSQL. The raw code never touches the database.

Short-lived

Codes expire with the print job TTL and become invalid after completion or expiry.

Rate-limited

Code entry is limited to 5 attempts per 15 minutes per client, reducing brute-force guessing.

File upload security

Uploads are treated as untrusted input and validated before anything touches storage.

Size and type limits

Uploads use memory storage with a 25 MB limit. MIME type and extension are validated.

Safe storage keys

Internal object IDs are generated server-side. User filenames are never used as storage paths.

No leakage

Document contents are never logged, returned in errors, placed in URLs, or stored in the database.

Encryption and transport

Security at rest and in transit, with development conveniences clearly separated from production.

HTTPS/TLS

Production deployments must terminate HTTPS/TLS. The API is not designed for plaintext production traffic.

Encryption at rest

Object storage providers must use encrypted-at-rest storage. Production should use an S3-compatible provider, not the local filesystem.

Short-lived access URLs

Temporary access URLs, when used, are short-lived and scoped to a specific job.

Headers, CORS and rate limiting

Standard web defenses are applied at the API boundary.

Secure headers

Helmet provides security-related HTTP headers.

CORS allowlist

Cross-origin requests are restricted to configured origins.

Rate limiting

General API rate limiting is enabled, with stricter limits for print-code entry.

Logging rules

Logging never compromises documents or credentials.

Never log

Document content, base64 files, document URLs, access tokens, passwords, payment secrets, or private keys. Development logs follow the same rule.