Skip to content

Validate the server certificate by default #263

Open

Description

@woksin

Problem

skipTlsValidation defaults to true (see Connecting). A client connecting to a shared or production server therefore accepts any certificate for both gRPC calls and token requests unless the connection string sets skipTlsValidation=false. Anyone who can intercept the connection can read the credentials and the events. A safe connection should not depend on every user remembering that option.

Proposal

  • Validate the server certificate by default.
  • Keep the local development image easy to use through an explicit opt-out (for example skipTlsValidation=true documented for local use, or detection of the development setup).
  • Consider an option for a custom certificate authority bundle; today the certificate must be trusted by the default Node.js and gRPC trust store.

This is likely a breaking change for clients that rely on the current default against self-signed servers.

Done when

  • A new connection validates the server certificate unless told not to.
  • The documentation explains how to connect to the development image.

Status

State: Backlog — not being worked on. The first step shipped in v6.54.0 (#266): the client warns at connection start when certificate validation is skipped against a non-loopback host, and the documentation explains the setting.
Remaining: Validate the server certificate by default. This is a breaking change for the next major version, and it needs coordination with the .NET client's default.

Activity

  1. self-assigned this
    on Oct 22, 2026
  2. added theissue type on Oct 25, 2026
  3. woksin commented on Oct 29, 2026

    @woksin
    ContributorAuthor

    Analysis and proposed solution

    • Current behaviour on main:
    • Gap: a client pointed at a shared or production server accepts any certificate, for both gRPC calls and token requests, unless the user remembers to opt in to validation.
    • Proposed change, in two steps (the same plan applies to the .NET client, so both clients behave the same):
      1. Next minor: when TLS is on, validation is skipped and the host is not localhost, 127.0.0.1 or ::1, log one warning at connection start. The warning names the host and says how to enable validation (skipTlsValidation=false). It covers the gRPC channel and the OAuth token fetch.
        • Update Documentation/connecting.md to lead with validation on for any non-local server.
        • Specs: a warning for a remote host with validation skipped; no warning for loopback hosts, for skipTlsValidation=false or for disableTls; the warning appears once per connection, not per call.
      2. Next major: flip the default so validation is on. Development setups keep working with an explicit skipTlsValidation=true, or by trusting the development certificate. This needs woksin's approval as a breaking change.
    • Size/risk/release intent: step 1 is S, low risk, minor. Step 2 is S, breaking, major.
    • Dependencies and blockers: step 2 is coordinated with the .NET client so both defaults change together.
  4. removed their assignment
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions