Security
Wavry is designed for encryption-first interactive sessions with explicit trust boundaries.
Security Model Summary
Core principles:
- media and input payloads remain encrypted end-to-end
- control plane is separated from encrypted data plane
- replay and tamper resistance are built into session transport
- relay should operate as a blind forwarder for encrypted payloads
Cryptographic Baseline
- handshake:
Noise_XX_25519_ChaChaPoly_BLAKE2s - transport encryption:
ChaCha20-Poly1305 - peer identity: key-based identity model
Trust Boundaries
Endpoint boundary:
- keys and decrypted payloads must stay on trusted endpoints
Gateway boundary:
- gateway handles auth, signaling, and policy
- treat as internet-facing security surface
Relay boundary:
- relay forwards encrypted packets
- relay should not require decryption capability
Production Hardening Checklist
Control Plane
- terminate TLS at trusted ingress
- enforce strict auth and admin token controls
- keep rate limiting enabled (
WAVRY_GLOBAL_RATE_LIMIT*) - trust proxy headers only behind trusted proxy (
WAVRY_TRUST_PROXY_HEADERS=1)
Signaling Security
- use
wss://for signaling in production - avoid insecure signaling override except controlled dev
- pin signaling cert fingerprints when high assurance is required (
WAVRY_SIGNALING_TLS_PINS_SHA256)
Secret Handling
- keep secrets out of logs and source-controlled files
- rotate tokens/keys on a defined schedule
- use scoped credentials with least privilege
Relay Security
- do not run insecure relay mode in production
- set and validate relay master public key
- monitor relay registration and heartbeat anomalies
Detection and Monitoring
Alert on:
- auth failure spikes
- handshake failure surges
- abnormal relay usage changes
- unusual admin API access patterns
Log with enough context for incident reconstruction, but avoid sensitive payload disclosure.
Incident Response
- identify impacted surface (gateway, relay, endpoint)
- rotate exposed credentials/tokens
- isolate abusive traffic/users/ranges
- patch and redeploy
- record timeline, blast radius, and preventive controls
Security Validation Before Release
- run standard lint/tests and security-relevant checks
- verify production signaling/TLS posture
- verify no insecure relay flags in production deployment
- verify admin access boundaries and auditability