2.6 KiB
Security
MVP controls
- Authentication is enabled by default and blocks API access until a key is configured.
- API keys are accepted through Bearer authentication or
X-API-Key. - Only SHA-256 API-key hashes are stored; the original cannot be recovered.
- Hash comparison is constant-time.
- Exact IPv4 and IPv6 allowlisting can be enabled independently.
- Request bodies require
Content-Lengthand are capped at 16 KiB. - Phone numbers, message sizes, pagination, paths, ports, bind addresses, and IP entries are validated.
- Request logs contain only timestamp, method, path, status, client IP, duration, and success. Bodies and headers are never logged.
- Error responses do not expose stack traces or secrets.
/docsand/docs/openapi.yamlare public and expose only the published API contract; operational API routes remain protected.- Room backup is disabled to reduce accidental secret/configuration export.
- Server code has a top-level exception boundary so malformed requests do not crash the app.
Plaintext HTTP warning
The embedded MVP server is HTTP-only. HTTP provides no confidentiality or server identity: API keys and SMS content can be observed or modified by anyone able to intercept traffic. Use it only on a trusted, isolated network. For remote operation, use a VPN or a controlled TLS reverse proxy, firewall the gateway port, and keep authentication and allowlisting enabled.
Port forwarding directly from the public internet is strongly discouraged for the MVP.
Key management
- Use a randomly generated high-entropy value of at least 16 characters; 32+ is preferred.
- Store the backend copy in its secret manager or environment configuration.
- Never place keys in source control, URLs, query parameters, screenshots, or logs.
- Rotate a suspected key by setting a new value in the app and backend.
- Disabling authentication should be limited to temporary testing on an isolated network.
Allowlist limitations
The MVP supports exact IP addresses only. It intentionally does not parse CIDR ranges. Source addresses can change due to DHCP, VPNs, proxies, or NAT. Verify the client address shown in request logs before enabling a strict allowlist.
Planned security work
- HMAC over method, canonical path, body hash, timestamp, and nonce
- Short timestamp acceptance window
- Durable nonce/replay cache
- Credential identifiers and multiple API clients
- Rate limiting and lockout telemetry
- Native TLS-capable transport or formally documented reverse-proxy deployment
- CIDR-aware allowlists
Report vulnerabilities privately to the project maintainer and do not include real SMS content, API keys, or device identifiers in reports.