fix(gateway): add GATEWAY_SKIP_VERIFY_HOSTS for selective TLS skip#145
Merged
guyb1 merged 4 commits intoonecli:mainfrom Apr 3, 2026
Merged
fix(gateway): add GATEWAY_SKIP_VERIFY_HOSTS for selective TLS skip#145guyb1 merged 4 commits intoonecli:mainfrom
guyb1 merged 4 commits intoonecli:mainfrom
Conversation
Extends the existing `GATEWAY_DANGER_ACCEPT_INVALID_CERTS` global flag with a finer-grained alternative: `GATEWAY_SKIP_VERIFY_HOSTS` accepts a comma-separated list of hostname patterns and disables TLS certificate validation only for matched upstream hosts. Pattern syntax: - Exact match: `internal.corp` - Wildcard subdomain: `*.internal.corp` (matches apex and all subdomains) - Matching is case-insensitive Implementation holds two reqwest::Client instances (strict / no-verify) and selects between them per CONNECT request. No DB or schema changes. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Contributor
Author
|
this is not technically a new feature, rather an enhancement for the existing all-or-nothing env variable toggle for skipping cert verification, done with another env variable hosting a whitelist, so minimum complexity, and no need to keep an extra reqwest if nothing matches |
hisgarden
pushed a commit
to hisgarden/onecli
that referenced
this pull request
Apr 11, 2026
…necli#145) * feat(gateway): add GATEWAY_SKIP_VERIFY_HOSTS for per-host TLS skip Extends the existing `GATEWAY_DANGER_ACCEPT_INVALID_CERTS` global flag with a finer-grained alternative: `GATEWAY_SKIP_VERIFY_HOSTS` accepts a comma-separated list of hostname patterns and disables TLS certificate validation only for matched upstream hosts. Pattern syntax: - Exact match: `internal.corp` - Wildcard subdomain: `*.internal.corp` (matches apex and all subdomains) - Matching is case-insensitive Implementation holds two reqwest::Client instances (strict / no-verify) and selects between them per CONNECT request. No DB or schema changes. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * some fixes --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]> Co-authored-by: Guy Ben Aharon <[email protected]>
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
GATEWAY_SKIP_VERIFY_HOSTSenv var to the gateway: a comma-separated list of hostname patterns for which TLS certificate validation is skipped on upstream connectionsGATEWAY_DANGER_ACCEPT_INVALID_CERTSflag with host-selective control — no DB or schema changes requiredinternal.corp) or wildcard subdomain prefix (*.internal.corp); matching is case-insensitivereqwest::Client(no-verify) at startup and selects between strict/no-verify per CONNECT request based on hostname matchTest plan
cargo test— 132 unit tests + 5 integration tests all pass (including 6 new tests covering exact match, wildcard, case-insensitivity, empty list, and env var parsing)cargo clippy -- -D warnings— cleancargo fmt --check— cleanGATEWAY_SKIP_VERIFY_HOSTS=*.internal.corpand verify gateway logs "TLS verification skipped" only for matched hostsNotes
pnpm buildandpnpm checksurface two pre-existing failures unrelated to this PR:apps/web: implicitanyon filter callback inmanage-access-dialog.tsx:89packages/db: missing Prisma generated client exports (User,ConnectedService,AuditLog) — requirespnpm db:generateagainst a live DB🤖 Generated with Claude Code