fix(a2a,config): give --connect its own client-side TLS/SSRF policy#5884
Merged
Conversation
bug-ops
enabled auto-merge (squash)
July 10, 2026 16:46
zeph --tui --connect <URL> failed against its own documented plain-http:// loopback usage example on a fresh config. src/tui_remote.rs built the client-side SecurityPolicy from config.a2a (A2aServerConfig, the daemon's own server settings), whose require_tls/ssrf_protection default to true, so every --connect http://... attempt was rejected before reaching the daemon, even against loopback. Add a dedicated [a2a_client] config section (A2aClientConfig, env vars ZEPH_A2A_CLIENT_REQUIRE_TLS/ZEPH_A2A_CLIENT_SSRF_PROTECTION) used only by the --connect path; [a2a] is left untouched for the daemon's own server. Loopback targets (127.0.0.1, ::1, localhost) always bypass TLS/SSRF checks via a new zeph_common::net::is_loopback_host helper; non-loopback targets still require HTTPS and SSRF validation by default, unchanged from before. A2aServerConfig::require_tls/.ssrf_protection are now unread by any code path; marked reserved/inert in place rather than removed, since removal would be a breaking config change needing a migration step. Closes #5878
bug-ops
force-pushed
the
fix/5878-remote-tui-connect-tls
branch
from
July 10, 2026 16:48
1b48cc5 to
eb63b2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zeph --tui --connect <URL>failed against its own documented plain-http://loopback usage example (--connect http://127.0.0.1:8080/a2a/stream) on a fresh/default config, because the client-sideSecurityPolicywas built fromconfig.a2a(A2aServerConfig, the daemon's own server settings), whoserequire_tls/ssrf_protectiondefault totrue.[a2a_client]config section (A2aClientConfig, env varsZEPH_A2A_CLIENT_REQUIRE_TLS/ZEPH_A2A_CLIENT_SSRF_PROTECTION) used only by the--connectclient path;[a2a]/A2aServerConfigis left untouched for the daemon's own server.127.0.0.1,::1,localhost, via a newzeph_common::net::is_loopback_hosthelper) always bypass TLS/SSRF checks automatically, no config changes required. Non-loopback targets still require HTTPS and SSRF validation by default, unchanged from before.A2aServerConfig::require_tls/.ssrf_protectionare now unread by any code path (were only ever read by the buggy client wiring); marked reserved/inert in place rather than removed, since removal is a breaking config change needing a--migrate-configstep — tracked as a P3 follow-up.book/src/advanced/a2a.md,book/src/reference/configuration.md,.zeph/skills/setup-guide/SKILL.md,config/default.toml,docker/docker-compose.yml+docker-compose.dev.yml, CHANGELOG.md, and the live-testing playbook/coverage-status at the main-repo.local/testing/path.Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 12481/12481 passedRUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"0.0.0.0, private non-loopback IPs, localhost-substring hostnames, IPv4-mapped IPv6 loopback documented as a known safe-direction gap)Closes #5878