← Back to Pull requests

feat: Add TLS support #1503

Closed
unknown closed this pull request without merging on Oct 14, 2026 16:32 UTC
View on GitHub
unknown unknown commented on Sep 28, 2026 15:35 UTC
Author

Summary

Adds outbound TLS and mTLS for remote signers, remote attestors and remote provers, with one rule shared by all three clients:

An https:// address turns TLS on. The optional tls block only customizes it.

The same code applies the rule to all three, and configs without https:// behave exactly as before.

One TLS rule for every client

| | Remote signer | Remote attestor | Remote prover |
|---|---|---|---|
| Address field | grpc | grpc | params.url |
| TLS on | https://… | https://… | https://… |
| Plaintext | http://…, bare host:port, other gRPC targets | http://…, bare host:port | http://…, bare host:port |
| No port with https:// | 443 | 443 | 443 |
| tls block | optional, customizes TLS | optional, customizes TLS | optional (params.tls), customizes TLS |
| tls block without https:// | rejected | rejected | rejected |
| Without a tls block | system CAs, no client cert | system CAs, no client cert | system CAs, no client cert |

The same config shape works for all three:

signers:
  - alias: kms
    type: remote
    grpc: https://kms.example.com             # TLS, port 443
    remoteKeyId: relayer-key

attestors:
  - name: attestor-41002
    type: remote
    grpc: https://attestor.example.com        # TLS, port 443
    tls:                                       # optional: private CA and/or mTLS
      caFile: /etc/ibc/tls/ca.crt
      certFile: /etc/ibc/tls/client.crt
      keyFile: /etc/ibc/tls/client.key

relayer:
  connections:
    - clientA:
        type: remote
        params:
          url: https://prover.example.com     # TLS, port 443
          tls:                                 # same block, same meaning
            caFile: /etc/ibc/tls/ca.crt

Address rules

How each client reads an address:

| | Remote signer | Remote attestor | Remote prover |
|---|---|---|---|
| Bare host:port | passed to gRPC as written | dialed as http://host:port | dialed as http://host:port |
| http(s):// URL becomes | gRPC target host:port (443 / 80 by default) | used as the request URL | used as the request URL |
| Host | required | required | required |
| Path | rejected | allowed (e.g. gateway prefix) | allowed (e.g. gateway prefix) |
| Userinfo | rejected | allowed (sent as basic auth) | allowed (sent as basic auth) |
| Query or fragment | rejected | rejected | rejected |

One principle behind the differences: an address is accepted only if the client can use all of it. HTTP clients can use a path and userinfo. A gRPC target is just host:port, so a signer rejects anything it would silently drop. A query or fragment would swallow the RPC path appended to the URL, so all three reject it. Errors never echo the address, since it can carry credentials.

The tls block

Same fields, same meaning, for every client:

| Field | Meaning |
|---|---|
| caFile | Trust servers signed by this CA instead of the system CAs |
| certFile + keyFile | Present this client certificate (mTLS). Set both or neither |
| serverName | Expect this name on the server's certificate |
| insecureSkipVerify | Skip server verification. Development only; logs a warning that names the service, not the URL |

Shared behaviour

The same for all three clients:

  • Validation at load: cert files must exist and parse, cert and key must match, a client certificate that has expired or isn't valid yet is rejected, caFile can't be combined with insecureSkipVerify, a tls block requires an https:// address, and tls is rejected on local attestors and signers. The validity check also runs when Go doesn't pre-parse the certificate (GODEBUG=x509keypairleaf=0).

  • Certificates: read once at startup, so rotation needs a restart.

  • Startup: a tls block that can't be loaded is a startup error. An unreachable remote attestor is still skipped with a warning, as before.
  • Compatibility

    Every config that works today behaves the same. The changes add things, or reject addresses that could never connect:

  • Attestor: grpc now also accepts an http(s):// URL. Previously any scheme was rejected.

  • Signer: an http(s):// target now works. https://host[:port] becomes the gRPC target host:port with TLS. Previously gRPC-Go couldn't resolve it.

  • Prover:

  • - a bare host:port url is now dialed as http://, as for attestors. Previously connect couldn't use it, including the shipped sample prover.example.com:9090
    - https:// already meant TLS; the block now adds settings
  • Newly rejected at load: prover or attestor addresses with a query, a fragment, no host or a bad port, and signer http(s):// addresses with userinfo, a path, a query or a fragment. None of these could connect before.

  • Transport: each client keeps its existing HTTP/gRPC transport settings and only gains the TLS config. Logging and config validate --live are unchanged.
  • Also in this PR

  • Go 1.26.6 → 1.26.9 and golang.org/x/net v0.59.0 → v0.60.0 (go.mod files, Dockerfile, Go prerequisites in the docs).
  • Diff: 645 lines (+483 / -162) across 8 files Reviewer: swift1337 Review duration: 23097m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.75) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.75 · 645 lines diff across 8 files
    0.75
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.387
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.075
    Real PR Conversation Timeline
    1 comments
    "Review active on #1503"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 75.1% (HIGH) · Higher = larger blast radius
    75.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 29.7% · Safe to merge
    29.7%
    Repository