Repository navigation
docs(network): allowlist carries HTTPS; plain-HTTP mirrors behind a host proxy need verify=public - #353
docs(network): allowlist carries HTTPS; plain-HTTP mirrors behind a host proxy need verify=public#353napetrov wants to merge 2 commits into
Conversation
…ost proxy need verify=public The egress sidecar forwards plain HTTP to an allowlisted host directly. It refuses one that would have to be chained through the host proxy (not in NO_PROXY) with a 403, so an apt or pip mirror reached that way fails under allowlist. A verifier that runs apt-get then needs --network verify=public (or allow_internet = true in task.toml), or the mirror host in NO_PROXY. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues blocking this documentation-only clarification of allowlist proxy behavior and plain-HTTP mirror workarounds.
No open issues 🎉
What changed in this PR
0 new findings; nothing to fix.
This documentation-only PR clarifies how the coding harness’s allowlist network mode handles HTTPS and plain HTTP.
Changes:
- Explains that HTTPS uses the sidecar’s CONNECT proxy, while plain HTTP requiring the host proxy is refused with a 403.
- Documents verifier workarounds for plain-HTTP mirrors: public networking or the mirror host in
NO_PROXY.
| File | Description |
|---|---|
dokimi/docs/coding-harnesses.md |
Clarifies allowlist proxy behavior and plain-HTTP mirror workarounds. |
Review effort: Balanced
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). Review details
|
antonwolfy
left a comment
There was a problem hiding this comment.
The paragraph matches the sidecar's behaviour on HTTPS, the 403 for plain HTTP chained through a host proxy, and the verify=public / allow_internet fallbacks. One thing is worth fixing before merge: the NO_PROXY workaround as written still fails for a stock allowlist.
What I ran, on a Linux review host at f45482a:
make ci-local: 30 passed, 0 failed, 7 skipped (docs-only change)- a reproduction of the finding against the egress proxy, with the network mocked
Checked, no issues
- Claims vs code:
egress_proxy.pytunnelsCONNECTonly for allowlisted entries and returns 403 in_forward_httpwhen_upstream(..., "http")is set.verify=publicparses innetwork_policy.py, andallow_internet = truemaps topublic. - Rest of the page: the existing "Plain HTTP" bullet and the public-mode notes agree with the new paragraph.
- Commit: signed off.
| Under `allowlist`, HTTPS goes through the sidecar's CONNECT proxy. A plain-HTTP | ||
| request to an allowlisted host is forwarded directly, but one that would have to |
There was a problem hiding this comment.
The NO_PROXY workaround alone does not make a plain-HTTP mirror work under allowlist. _forward_http (egress_proxy.py:279-285) checks self.allowed(host, port) first, and a bare allowlist entry means host:443 (the page says so in the egress bullet above). A request to http://mirror.example/ goes to port 80, which is not listed.
Repro with the allowlist mirror.example, mirror.example in NO_PROXY and HTTP_PROXY set: the sidecar answers HTTP/1.1 403 Forbidden and records {'host': 'mirror.example', 'port': 80, 'decision': 'denied', 'reason': 'not on the allowlist'}. A reader who follows the paragraph gets the same 403 it describes.
Suggestion: say that the mirror also needs a host:80 entry in the allowlist (for example environment.egress), in addition to NO_PROXY, and that NO_PROXY is only needed when a host proxy is configured.
There was a problem hiding this comment.
Fixed in dd5daef. The paragraph now says a bare entry is host:443, so a plain-HTTP mirror needs its host:80 entry as well as the host in NO_PROXY. It gives the --network verify=allowlist:mirror.corp,mirror.corp:80 example. Docs only: the network and egress tests pass (333 passed). Changelog unchanged.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #353 +/- ##
==========================================
+ Coverage 94.06% 94.29% +0.23%
==========================================
Files 297 308 +11
Lines 38018 39322 +1304
Branches 6424 6651 +227
==========================================
+ Hits 35760 37079 +1319
+ Misses 1451 1430 -21
- Partials 807 813 +6 🚀 New features to boost your workflow:
|
Summary
Evidence
allowlistmode without saying what plain HTTP does.After: the paragraph is checked against
dokimi/harnesses/egress_proxy.py(plain-HTTP branch,_record(... "plain HTTP is not chained through the upstream proxy ...")).pytest tests/test_docs_links.py tests/test_docs_code_refs.py: 64 passed.Merge Danger
Door: two-way. Docs only.
Blast Radius: none on behaviour; readers of the network-policy section.
🤖 Generated with Claude Code