SSL Bump
SSL Bump enables deep inspection of HTTPS traffic, allowing URL path filtering instead of just domain-based filtering.
Overview
Section titled “Overview”By default, awf filters HTTPS traffic based on domain names using SNI (Server Name Indication). You can allow github.com, but cannot restrict access to specific paths like https://github.com/githubnext/*.
With SSL Bump enabled, the firewall generates a per-session CA certificate and intercepts HTTPS connections, enabling:
- URL path filtering: Restrict access to specific paths, not just domains
- Full HTTP request inspection: See complete URLs in logs
- Wildcard URL patterns: Use
*wildcards in--allow-urlspatterns
Quick Start
Section titled “Quick Start”# Enable SSL Bump for URL path filteringsudo awf \ --allow-domains github.com \ --ssl-bump \ --allow-urls "https://github.com/githubnext/*,https://api.github.com/repos/*" \ -- curl https://github.com/githubnext/some-repoCLI Flags
Section titled “CLI Flags”--ssl-bump
Section titled “--ssl-bump”Enable SSL Bump for HTTPS content inspection.
| Property | Value |
|---|---|
| Type | Flag (boolean) |
| Default | false |
| Requires | N/A |
When enabled:
- A per-session CA certificate is generated (valid for 1 day)
- The CA is injected into the agent container’s trust store
- Squid intercepts HTTPS connections using SSL Bump
- URL-based filtering becomes available via
--allow-urls
--allow-urls <urls>
Section titled “--allow-urls <urls>”Comma-separated list of allowed URL patterns for HTTPS traffic.
| Property | Value |
|---|---|
| Type | String (comma-separated) |
| Default | — |
| Requires | --ssl-bump flag |
Wildcard syntax:
*matches any characters within a path segment- Patterns must include the full URL scheme (
https://)
# Allow specific repository paths--allow-urls "https://github.com/githubnext/*"
# Allow API endpoints--allow-urls "https://api.github.com/repos/*,https://api.github.com/users/*"
# Combine with domain allowlist--allow-domains github.com --ssl-bump --allow-urls "https://github.com/githubnext/*"How It Works
Section titled “How It Works”Without SSL Bump (Default)
Section titled “Without SSL Bump (Default)”Agent → CONNECT github.com:443 → Squid checks domain ACL → Pass/Block (SNI only, no path visibility)Squid sees only the domain from the TLS ClientHello SNI extension. The URL path is encrypted and invisible.
With SSL Bump
Section titled “With SSL Bump”Agent → CONNECT github.com:443 → Squid intercepts TLS → Squid presents session CA certificate → Agent trusts session CA (injected into trust store) → Full HTTPS request visible: GET /githubnext/repo → Squid checks URL pattern ACL → Pass/BlockSquid terminates the TLS connection and establishes a new encrypted connection to the destination.
Security Model
Section titled “Security Model”Threat Model Change
Section titled “Threat Model Change”SSL Bump fundamentally changes the security model. Without SSL Bump, the firewall only sees encrypted traffic and domain names (via SNI). With SSL Bump enabled, the proxy terminates TLS connections and can see all HTTPS traffic in plaintext.
When SSL Bump is appropriate:
- Single-user development environments
- Controlled CI/CD pipelines where you trust the workload
- Testing and debugging URL-based access patterns
When SSL Bump is NOT appropriate:
- Multi-tenant environments (shared infrastructure)
- Running untrusted code or AI agents
- Multi-user systems with shared
/tmpdirectories - Production security-critical workloads
CA Private Key Exposure Risk
Section titled “CA Private Key Exposure Risk”The CA private key grants the ability to impersonate any HTTPS site for the duration of its validity.
| Property | Value |
|---|---|
| Storage Location | /tmp/awf-<timestamp>/ssl/ca-key.pem |
| File Permissions | 0600 (owner read/write only) |
| Validity | 1 day maximum |
| Cleanup | Deleted when session ends |
Risk scenarios:
- Multi-user systems: Other users may read
/tmpcontents - Container escape: Attacker can access key from host filesystem
- Squid compromise: Squid process has key access; vulnerabilities could expose it
- Incomplete cleanup: SIGKILL may prevent cleanup
Mitigations implemented:
- Per-session unique CA (not shared across sessions)
- Short validity period (1 day)
- Restrictive file permissions (0600)
- Key mounted read-only into Squid container
- Container security hardening (dropped capabilities)
Trust Store Modification
Section titled “Trust Store Modification”- The session CA is injected only into the agent container’s trust store
- Host system trust stores are NOT modified
Traffic Visibility
Section titled “Traffic Visibility”When SSL Bump is enabled:
| What’s Visible | To Whom |
|---|---|
| Full URLs (including paths) | Squid proxy |
| HTTP headers | Squid proxy |
| Request/response bodies | Configurable (off by default) |
URL Pattern Validation
Section titled “URL Pattern Validation”To prevent security bypasses, URL patterns (--allow-urls) are validated:
- Must start with
https://(no HTTP or other protocols) - Must include a path component (e.g.,
https://github.com/org/*) - Overly broad patterns like
https://*are rejected - Domain-only patterns should use
--allow-domainsinstead
Example Use Cases
Section titled “Example Use Cases”Restrict GitHub to Specific Organizations
Section titled “Restrict GitHub to Specific Organizations”sudo awf \ --allow-domains github.com \ --ssl-bump \ --allow-urls "https://github.com/githubnext/*,https://github.com/github/*" \ -- copilot --prompt "Clone the githubnext/copilot-workspace repo"Allows access to githubnext and github organizations while blocking other repositories.
API Endpoint Restrictions
Section titled “API Endpoint Restrictions”sudo awf \ --allow-domains api.github.com \ --ssl-bump \ --allow-urls "https://api.github.com/repos/githubnext/*,https://api.github.com/users/*" \ -- curl https://api.github.com/repos/githubnext/gh-aw-firewallDebug with Verbose Logging
Section titled “Debug with Verbose Logging”sudo awf \ --allow-domains github.com \ --ssl-bump \ --allow-urls "https://github.com/*" \ --log-level debug \ -- curl https://github.com/githubnext/gh-aw-firewall
# View full URL paths in Squid logssudo cat /tmp/squid-logs-*/access.logComparison: SNI-Only vs SSL Bump
Section titled “Comparison: SNI-Only vs SSL Bump”| Feature | SNI-Only (Default) | SSL Bump |
|---|---|---|
| Domain filtering | ✓ | ✓ |
| Path filtering | ✗ | ✓ |
| End-to-end encryption | ✓ | Modified (proxy-terminated) |
| Certificate pinning | Works | Broken |
| Performance | Faster | Slight overhead |
| Log detail | Domain:port only | Full URLs |
Troubleshooting
Section titled “Troubleshooting”Certificate Errors
Section titled “Certificate Errors”Problem: Agent reports certificate validation failures
Solutions:
# Check if CA was injecteddocker exec awf-agent ls -la /usr/local/share/ca-certificates/
# Verify trust store was updateddocker exec awf-agent cat /etc/ssl/certs/ca-certificates.crt | grep -A1 "AWF Session CA"URL Patterns Not Matching
Section titled “URL Patterns Not Matching”Problem: Allowed URL patterns are being blocked
# Enable debug loggingsudo awf --log-level debug --ssl-bump --allow-urls "..." -- your-command
# Check exact URL format in logssudo cat /tmp/squid-logs-*/access.log | grep your-domain
# Ensure patterns include scheme (https://)# ✗ Wrong: github.com/githubnext/*# ✓ Correct: https://github.com/githubnext/*Known Limitations
Section titled “Known Limitations”Certificate Pinning
Section titled “Certificate Pinning”Applications that implement certificate pinning will fail when SSL Bump is enabled. The pinned certificate won’t match the session CA’s generated certificate.
Workaround: Use domain-only filtering without SSL Bump for these applications.
HTTP/3 (QUIC)
Section titled “HTTP/3 (QUIC)”SSL Bump works with HTTP/1.1 and HTTP/2. HTTP/3 (QUIC) is not currently supported.
WebSocket Connections
Section titled “WebSocket Connections”WebSocket over HTTPS (wss://) is intercepted and filtered. The initial handshake URL is checked against --allow-urls patterns.
See Also
Section titled “See Also”- CLI Reference - Complete command-line options
- Security Architecture - How the firewall protects traffic