You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add SSL Bump support for HTTPS content inspection (#131)
* Initial plan
* feat: add SSL Bump support for HTTPS content inspection
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
* docs: add SSL Bump documentation
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
* refactor: remove unused generateSslBumpConfig function
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
* fix: address SSL Bump issues and improve documentation
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
* fix: resolve SSL Bump initialization and config ordering issues
- Fix SSL database initialization: security_file_certgen requires the
directory to NOT exist, but Docker volume mounts create it. Now
initSslDb() creates the complete DB structure (certs/, index.txt,
size) directly on the host.
- Simplify entrypoint.sh: Since DB is pre-initialized on host, the
entrypoint only needs to fix permissions for the proxy user.
- Fix Squid config ordering: ACL definitions must appear before
ssl_bump rules that reference them. Moved ${aclSection} before
${sslBumpSection} in the config template.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: correct URL pattern filtering for SSL Bump mode
Two issues fixed:
1. URL pattern deny rule was blocking CONNECT requests:
- The deny rule `http_access deny allowed_domains` was evaluated
for CONNECT requests, blocking SSL bump before the URL check
- Added `!CONNECT` to only deny actual HTTP requests after bump
- CONNECT requests now pass through for domain-allowed hosts
2. URL pattern regex escaping was corrupting .* wildcards:
- Input `https://api.github.com/users/.*` was becoming
`^https://api\.github\.com/users/\..*` (incorrect)
- Now preserves .* patterns using placeholder before escaping
- Output is correctly `^https://api\.github\.com/users/.*`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: address SSL Bump security review findings
Security improvements based on review feedback:
1. URL Pattern Validation (cli.ts):
- Reject patterns not starting with https://
- Block overly broad patterns like https://* or .*
- Require path component in URL patterns
- Add helpful error messages guiding users to correct usage
2. Container Hardening (docker-manager.ts):
- Drop unnecessary capabilities from Squid container:
NET_RAW, SYS_ADMIN, SYS_PTRACE, SYS_MODULE, MKNOD,
AUDIT_WRITE, SETFCAP
- Reduces attack surface if Squid process is compromised
3. Enhanced Security Documentation (docs/ssl-bump.md):
- Added prominent security warnings about threat model change
- Documented when NOT to use SSL Bump:
- Multi-tenant environments
- Untrusted workloads
- Multi-user systems
- Detailed CA private key exposure risks
- Listed all implemented mitigations
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
|`--keep-containers`| flag |`false`| Keep containers running after command exits |
28
30
|`--tty`| flag |`false`| Allocate pseudo-TTY for interactive tools |
@@ -98,6 +100,47 @@ Path to file with blocked domains. Supports the same format as `--allow-domains-
98
100
--block-domains-file ./blocked-domains.txt
99
101
```
100
102
103
+
### `--ssl-bump`
104
+
105
+
Enable SSL Bump for HTTPS content inspection. When enabled, the firewall generates a per-session CA certificate and intercepts HTTPS connections, allowing URL path filtering.
SSL Bump decrypts HTTPS traffic at the proxy. The proxy can see full URLs, headers, and request bodies. Applications with certificate pinning will fail to connect.
113
+
:::
114
+
115
+
**How it works:**
116
+
1. A unique CA certificate is generated (valid for 1 day)
117
+
2. The CA is injected into the agent container's trust store
118
+
3. Squid intercepts HTTPS using SSL Bump (peek, stare, bump)
119
+
4. Full URLs become visible for filtering via `--allow-urls`
120
+
121
+
**See also:**[SSL Bump Reference](/gh-aw-firewall/reference/ssl-bump/) for complete documentation.
122
+
123
+
### `--allow-urls <urls>`
124
+
125
+
Comma-separated list of allowed URL patterns for HTTPS traffic. Requires `--ssl-bump`.
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/reference/security-architecture.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,63 @@ We considered isolating the agent in a network namespace with zero external conn
186
186
187
187
mitmproxy would let us inspect HTTPS payloads, potentially catching exfiltration in POST bodies. But it requires injecting a CA certificate and breaks certificate pinning (common in security-sensitive clients). Squid's CONNECT method reads SNI without decryption—less powerful but zero client-side changes, and we maintain end-to-end encryption.
188
188
189
+
:::tip[SSL Bump for URL Filtering]
190
+
When you need URL path filtering (not just domain filtering), enable `--ssl-bump`. This uses Squid's SSL Bump feature with a per-session CA certificate, providing full URL visibility while maintaining security through short-lived, session-specific certificates.
191
+
:::
192
+
193
+
---
194
+
195
+
## SSL Bump Security Model
196
+
197
+
When `--ssl-bump` is enabled, the firewall intercepts HTTPS traffic for URL path filtering. This changes the security model significantly.
198
+
199
+
### How SSL Bump Works
200
+
201
+
1.**CA Generation**: A unique CA key pair is generated at session start
202
+
2.**Trust Store Injection**: The CA certificate is added to the agent container's trust store
203
+
3.**TLS Interception**: Squid terminates TLS and re-establishes encrypted connections to destinations
204
+
4.**URL Filtering**: Full request URLs (including paths) become visible for ACL matching
205
+
206
+
### Security Safeguards
207
+
208
+
| Safeguard | Description |
209
+
|-----------|-------------|
210
+
|**Per-session CA**| Each awf execution generates a unique CA certificate |
211
+
|**Short validity**| CA certificate valid for 1 day maximum |
212
+
|**Ephemeral key storage**| CA private key exists only in temp directory, deleted on cleanup |
213
+
|**Container-only trust**| CA injected only into agent container, not host system |
214
+
215
+
### Trade-offs vs. SNI-Only Mode
216
+
217
+
| Aspect | SNI-Only (Default) | SSL Bump |
218
+
|--------|-------------------|----------|
219
+
| Filtering granularity | Domain only | Full URL path |
| Proxy visibility | Domain:port| Full request (URL, headers) |
223
+
| Performance | Faster | Slight overhead |
224
+
225
+
:::caution[When to Use SSL Bump]
226
+
Only enable SSL Bump when you specifically need URL path filtering. For most use cases, domain-based filtering provides sufficient control with stronger encryption guarantees.
227
+
:::
228
+
229
+
### SSL Bump Threat Considerations
230
+
231
+
**What SSL Bump enables:**
232
+
- Fine-grained access control (e.g., allow only `/githubnext/*` paths)
233
+
- Better audit logging with full URLs
234
+
- Detection of path-based exfiltration attempts
235
+
236
+
**What SSL Bump exposes:**
237
+
- Full HTTP request/response content visible to proxy
238
+
- Applications with certificate pinning will fail
239
+
- Slightly increased attack surface (CA key compromise)
240
+
241
+
**Mitigations:**
242
+
- CA key never leaves the temporary work directory
243
+
- Session isolation: each execution uses a fresh CA
0 commit comments