# TLS/HTTPS Setup Guide for Quantum ## Overview **Quantum** includes enterprise-grade TLS/HTTPS support with: - **Manual certificate configuration** (production-ready) - **Self-signed certificates** (development/testing) - **ACME/Let's Encrypt framework** (coming soon) - **HTTP/2 automatic negotiation** - **Wildcard certificate support** ## Quick Start ### 1. Generate Development Certificates **Self-Signed Certificate (localhost testing):** ```bash # Generate certificate valid for localhost openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes \ -subj "/CN=localhost/O=Quantum Dev/C=US" # Verify certificate openssl x509 -in cert.pem -text -noout | grep -E "(Subject|DNS|IP)" ``` **Multi-Domain Certificate:** ```bash # Create config file for Subject Alternative Names cat > cert.conf </dev/null | \ openssl x509 -noout -text | grep -E "(Subject|Issuer|Not Before|Not After|DNS)" # Test certificate chain openssl s_client -connect localhost:8443 -showcerts < /dev/null ``` ### 3. Performance Testing ```bash # Test HTTP/2 multiplexing curl -k --http2-prior-knowledge https://localhost:8443/file1 \ https://localhost:8443/file2 \ https://localhost:8443/file3 # Load testing with ApacheBench (HTTP/2) h2load -n 1000 -c 10 -m 10 https://localhost:8443/ ``` ## Security Best Practices ### 1. Certificate Management ```bash # Set proper file permissions chmod 644 *.pem # Certificates (public) chmod 600 *.key # Private keys (secure) # Store certificates securely sudo mkdir -p /etc/quantum/certificates sudo mkdir -p /etc/quantum/private sudo chown root:quantum /etc/quantum/private sudo chmod 750 /etc/quantum/private ``` ### 2. Production Deployment ```bash # Create systemd service with proper security sudo tee /etc/systemd/system/quantum.service > /dev/null </dev/null | sha256sum ``` **Connection Issues:** ```bash # Check server is listening ss -tlnp | grep :443 # Test with openssl client openssl s_client -connect localhost:443 -debug # Check logs tail -f /var/log/quantum/error.log ``` **HTTP/2 Issues:** ```bash # Verify HTTP/2 support curl -k --http2 -I https://localhost:8443 | grep -i "http/2" # Test ALPN negotiation openssl s_client -connect localhost:8443 -alpn h2,http/1.1 ``` ## What's Next - **ACME Integration**: Automatic Let's Encrypt certificate management (coming soon) - **Certificate Renewal**: Automated certificate rotation - **HTTP/3 Support**: QUIC protocol with TLS 1.3 - **Advanced Security**: OCSP stapling, HSTS headers, certificate pinning ## Support For TLS-related issues: - Check certificate validity and format - Verify network connectivity and firewall rules - Review Quantum logs for detailed error messages - Test with simple configurations first **Quantum now provides revolutionary TLS termination with quantum leap performance!** ⚡🔒