mirror of
https://github.com/cloudflare/cloudflared.git
synced 2026-10-12 02:12:14 +00:00
## Summary - generate a cryptographically random process-local HMAC-SHA256 session signing key - issue host-only, Secure, HttpOnly, SameSite=Lax Quick Tunnel session cookies - cap sessions at the earlier of 4 hours or the Access identity expiry - validate canonical cookie encoding, signatures, nonces, and expiry - invalidate sessions across cloudflared restarts through process-local signing keys - use `github.com/cloudflare/backoff` for tunnel retry jitter while preserving retry limits, retry-forever caps, and grace-period resets ## Security - session payloads contain only a random nonce and expiry; no visitor identity or recipient rules - malformed, tampered, expired, and previous-process sessions fail closed - HMAC signatures are compared in constant time ## Validation - `make test lint` - `go test -race ./retry ./quicktunnelauth`