Commit f7361c5
fix: copy AWF CA cert to chroot-accessible path for ssl-bump (#1555)
* fix: copy AWF CA cert to chroot-accessible path for ssl-bump
When ssl-bump and chroot are both active, NODE_EXTRA_CA_CERTS points to
/usr/local/share/ca-certificates/awf-ca.crt which is a Docker volume
mount on the container's overlay filesystem. After chroot /host, this
path is inaccessible, causing TLS failures (transaction-end-before-headers
in Squid, EHOSTUNREACH in Claude Code after 10 retries).
Fix: copy the CA cert to /host/tmp/awf-lib/awf-ca.crt before chroot
activates (same pattern as one-shot-token.so and get-claude-key.sh),
then update NODE_EXTRA_CA_CERTS to the chroot-relative path.
Also set SSL_CERT_FILE and REQUESTS_CA_BUNDLE so non-Node.js tools
(curl, git, Python requests, Ruby) trust the AWF CA in both chroot
and non-chroot ssl-bump modes.
Cleanup is handled by the existing /tmp/awf-lib removal in the EXIT
trap.
Fixes #1546
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Update containers/agent/entrypoint.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: address PR review feedback on ssl-bump chroot CA
- Verify destination file exists after copy ([ -f ] check)
- Log warning when mkdir /host/tmp/awf-lib fails
- Include CHROOT_KEY_HELPER in cleanup condition to prevent
/tmp/awf-lib leak when only key helper was copied
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 43870f7 commit f7361c5
1 file changed
+35
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
| |||
473 | 478 | | |
474 | 479 | | |
475 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
476 | 508 | | |
477 | 509 | | |
478 | 510 | | |
| |||
697 | 729 | | |
698 | 730 | | |
699 | 731 | | |
700 | | - | |
701 | | - | |
| 732 | + | |
| 733 | + | |
702 | 734 | | |
703 | 735 | | |
704 | 736 | | |
| |||
0 commit comments