Skip to content

bug(cli): mTLS client certs not loaded from gateway config dir in 0.0.83 #2272

Description

@zanetworker

Summary

The 0.0.83 CLI does not load mTLS client certificates from ~/.config/openshell/gateways/<name>/mtls/ when connecting to a local mTLS-enabled gateway. The gateway correctly requests client auth (CertificateRequest), but the CLI responds with no certificate, causing CertificateRequired fatal alert.

Environment

  • CLI: openshell 0.0.83
  • Gateway: openshell-gateway 0.0.83 (via brew, mTLS + podman driver)
  • OS: macOS (Apple Silicon)
  • Gateway registered via: openshell gateway add https://127.0.0.1:17670 --local --name openshell

Reproduction

# 1. Clean install 0.0.83 via brew
brew services restart openshell

# 2. Register gateway
openshell gateway add https://127.0.0.1:17670 --local --name openshell

# 3. Verify certs exist
ls ~/.config/openshell/gateways/openshell/mtls/
# tls.crt  tls.key  ca.crt

# 4. Verify certs work via curl
curl -sk --cert ~/.config/openshell/gateways/openshell/mtls/tls.crt \
     --key ~/.config/openshell/gateways/openshell/mtls/tls.key \
     https://127.0.0.1:17670/healthz
# Success (exit 0)

# 5. CLI fails
openshell provider list
# Error: received fatal alert: CertificateRequired

Debug Output

RUST_LOG=debug openshell provider list 2>&1 | grep -i cert

Key line:

DEBUG rustls::client::common: Client auth requested but no cert/sigscheme available

The rustls TLS client has no certificate configured even though the certs exist at the expected path.

Expected Behavior

The CLI should load tls.crt and tls.key from ~/.config/openshell/gateways/<name>/mtls/ and present them during the TLS handshake when auth_mode is mtls in the gateway metadata.

Workaround

None found. The plaintext gateway (--disable-tls) works for the CLI but the supervisor in 0.0.83 requires sandbox JWT auth, which is only minted by the mTLS/OIDC gateway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions