'reqwest' client for inference/provider requests uses bundled webpki-roots, ignoring custom/private CAs #2696
DavidLeNsogroup
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
The gateway's outbound HTTP client for provider/inference requests (reqwest, feature
rustls-tlsperCargo.toml:70) resolves torustls-tls-webpki-roots— a fixed, compiled-in copy of Mozilla's public root CA list. It never reads the host's system trust store, and there is no config surface (checked the fullgateway.tomlschema) to supply a custom CA bundle for this client.This makes it impossible to configure an
openai-type inference provider whose endpoint uses a certificate from a private/internal CA or a self-signed cert — which is a common setup for internal LiteLLM/vLLM/TGI deployments behind a corporate or air-gapped network.Steps to reproduce
openshell provider create --type openai --name my-provider --config OPENAI_BASE_URL=https://my-internal-endpoint --credential OPENAI_API_KEY=...openshell inference set --provider my-provider --model <model>https://inference.local.Actual behavior
Requests fail. Sandbox-side OCSF logs show a
NET:FAILoninference.local:443with no policy[reason:...]suffix (i.e. not a policy denial — it's a downstream connection failure), because the gateway's reqwest client can't complete the TLS handshake against the internal CA.Expected behavior
Some supported way to trust an internal/private CA for outbound provider connections — for example:
rustls-tls-native-rootsfeature (mirroring whattokio-tungstenitealready does perCargo.toml:73, viarustls-tls-native-roots) so the OS trust store is honored, and/orca_bundle_pathprovider config key, or a[openshell.gateway] extra_ca_certsgateway.toml key) to point at a custom CA/CA bundle without relying on OS-level trust.Workaround currently in use
Terminating the internal endpoint with a cert chained to a publicly-trusted root (e.g. via a reverse proxy with a Let's Encrypt cert), which isn't viable for fully air-gapped deployments.
Environment
All reactions