WAF Configuration
When deploying Thinfinity® Workspace behind a WAF (Web Application Firewall), the primary goal is to configure secure ingress traffic over HTTPS and WSS (WebSocket Secure) protocols while preserving the integrity of WebSocket upgrade requests essential for platform operation.
The following best practices provide a step-by-step approach to establishing a stable and secure WAF policy:
Deploy Gradually with Learning Mode
Start in Learning Mode: Begin in observability-only mode to capture logs, validate handshake flows, and tune false positives without impacting production traffic.
Gradual Enforcement: Once stability is confirmed, progressively enable the core rule set for Thinfinity Workspace endpoints.
Configure Transport Layer Security
Enforce HTTPS/WSS: Block all insecure HTTP connections.
TLS Policy: Support TLS 1.2 and TLS 1.3 only; disable legacy protocols.
Certificates: Maintain valid, up-to-date SSL/TLS certificates.
End-to-End Encryption: Preserve TLS termination from client → WAF and WAF → Thinfinity Gateway.
Enable WebSocket Protocol Support
Upgrade Support: Allow
Connection: upgradeandUpgrade: websocketrequests for Thinfinity paths (e.g.,/thinfinity/*).Protocol Compliance: Ensure HTTP/1.1 upgrade flows are supported.
Inspection Policy: Do not perform payload inspection inside encrypted WebSocket tunnels; instead, enforce rate and connection limits.
Optimize Connection Performance
Persistent Sessions: Keep WebSocket connections alive for long-running sessions.
Timeouts: Configure generous idle/read timeouts (30–60 minutes) and ~300s for long-polling fallbacks.
Rate Limiting: Apply per-user/IP session limits and restrict new connection rates to mitigate abuse.
Establish Monitoring and Logging
Handshake Logging: Record upgrade attempts, successes (
101 Switching Protocols), and failures.Metrics Tracking: Monitor session counts, duration, handshake success, and error types.
Error Classification: Maintain clear categories for TLS errors, WAF blocks, timeouts, and upstream resets.
Summary
Deploy a WAF upstream of the Thinfinity Gateway to facilitate WSS upgrade requests while minimizing inspection interference during active tunnel sessions. Start in Learning Mode to establish baseline parameters, then enforce TLS protocols, validate handshake integrity, and implement rate limiting policies.
During active sessions, bypass in-depth inspection of encrypted WebSocket frames to maintain system stability and optimize performance.
Last updated
Was this helpful?