Skip to content

SSL Bump

SSL Bump enables deep inspection of HTTPS traffic, allowing URL path filtering instead of just domain-based filtering.

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-urls patterns
Terminal window
# Enable SSL Bump for URL path filtering
sudo awf \
--allow-domains github.com \
--ssl-bump \
--allow-urls "https://github.com/githubnext/*,https://api.github.com/repos/*" \
-- curl https://github.com/githubnext/some-repo

Enable SSL Bump for HTTPS content inspection.

PropertyValue
TypeFlag (boolean)
Defaultfalse
RequiresN/A

When enabled:

  1. A per-session CA certificate is generated (valid for 1 day)
  2. The CA is injected into the agent container’s trust store
  3. Squid intercepts HTTPS connections using SSL Bump
  4. URL-based filtering becomes available via --allow-urls

Comma-separated list of allowed URL patterns for HTTPS traffic.

PropertyValue
TypeString (comma-separated)
Default
Requires--ssl-bump flag

Wildcard syntax:

  • * matches any characters within a path segment
  • Patterns must include the full URL scheme (https://)
Terminal window
# 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/*"
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.

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/Block

Squid terminates the TLS connection and establishes a new encrypted connection to the destination.

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 /tmp directories
  • Production security-critical workloads

The CA private key grants the ability to impersonate any HTTPS site for the duration of its validity.

PropertyValue
Storage Location/tmp/awf-<timestamp>/ssl/ca-key.pem
File Permissions0600 (owner read/write only)
Validity1 day maximum
CleanupDeleted when session ends

Risk scenarios:

  1. Multi-user systems: Other users may read /tmp contents
  2. Container escape: Attacker can access key from host filesystem
  3. Squid compromise: Squid process has key access; vulnerabilities could expose it
  4. 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)
  • The session CA is injected only into the agent container’s trust store
  • Host system trust stores are NOT modified

When SSL Bump is enabled:

What’s VisibleTo Whom
Full URLs (including paths)Squid proxy
HTTP headersSquid proxy
Request/response bodiesConfigurable (off by default)

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-domains instead
Terminal window
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.

Terminal window
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-firewall
Terminal window
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 logs
sudo cat /tmp/squid-logs-*/access.log
FeatureSNI-Only (Default)SSL Bump
Domain filtering
Path filtering
End-to-end encryptionModified (proxy-terminated)
Certificate pinningWorksBroken
PerformanceFasterSlight overhead
Log detailDomain:port onlyFull URLs

Problem: Agent reports certificate validation failures

Solutions:

Terminal window
# Check if CA was injected
docker exec awf-agent ls -la /usr/local/share/ca-certificates/
# Verify trust store was updated
docker exec awf-agent cat /etc/ssl/certs/ca-certificates.crt | grep -A1 "AWF Session CA"

Problem: Allowed URL patterns are being blocked

Terminal window
# Enable debug logging
sudo awf --log-level debug --ssl-bump --allow-urls "..." -- your-command
# Check exact URL format in logs
sudo cat /tmp/squid-logs-*/access.log | grep your-domain
# Ensure patterns include scheme (https://)
# ✗ Wrong: github.com/githubnext/*
# ✓ Correct: https://github.com/githubnext/*

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.

SSL Bump works with HTTP/1.1 and HTTP/2. HTTP/3 (QUIC) is not currently supported.

WebSocket over HTTPS (wss://) is intercepted and filtered. The initial handshake URL is checked against --allow-urls patterns.