Skip to content

Chronicle 16.20.0 validates TLS by default, so the CLI can no longer connect to a local server out of the box #67

Description

@woksin

Chronicle 16.20.0 inverted the client's TLS default. From its release notes:

Changed — Validate TLS certificates by default; the Development connection string remains the explicit self-signed-certificate opt-out. (Cratis/Chronicle#3606)

Deliberate hardening upstream, and the right default for a client library. But the CLI's default server is a bare connection string with no opt-out, and a development Chronicle serves a self-signed certificate — so on Chronicle ≥ 16.20.0 the commonest workflow in the product stops working until the user hand-edits their connection string.

The default appears with no skipTlsValidation at four places:

  • Source/Cli/FirstRunDetector.cs:13const string DefaultServer = "chronicle://localhost:35000";
  • Source/Cli/Program.cs:23var server = ctx.Server ?? "chronicle://localhost:35000";
  • Source/Cli/Commands/Chronicle/ChronicleSettings.cs:44
  • Source/Cli/Commands/Init/ChronicleDocGenerator.cs:38,42 — the connection string the CLI writes into generated docs for users

Evidence

Bisected against a fixed local server image, so the server side is constant and only the client version moves:

Chronicle client Integration specs
16.19.1 161/161 pass
16.19.2 161/161 pass
16.19.3 161/161 pass
16.20.0 108 of 161 fail
16.21.0 108 fail
16.22.0 108 fail

All failures are "The SSL connection could not be established". Not flaky and not environmental — a workflow_dispatch of Build on unchanged main passed at the same moment.

Upstream added ?skipTlsValidation=true to its own Development connection-string constant in the same release, which is the shape of the intended opt-out.

The documentation is now wrong in two places

Documentation/reference/connection.md:20:

in development, the server auto-generates a self-signed certificate for localhost and the CLI trusts it automatically — no certificate setup is required to connect to a local server

Documentation/reference/connection.md:26:

skipTlsValidation — ... On by default, which is what lets the CLI trust a development server's self-signed certificate; set it to false to require a valid certificate.

Both describe the pre-16.20.0 behaviour. Whichever way this is resolved, these two need to change.

Why this is not just a version bump

#66 deliberately stopped Chronicle at 16.19.3 rather than taking the current 16.22.0, because carrying this into a minor release would break every out-of-the-box local connection. That pin is a holding position, not a preference — it should be lifted once this is decided.

Options

  1. Default skipTlsValidation=true for loopback only — append it to the default connection string when the host is localhost/127.0.0.1/::1, and leave every explicitly-configured server alone. Restores the documented behaviour, keeps the hardening everywhere it matters, stays minor. Loses the protection for a local server, which is where it is worth least.
  2. Take the break — require users to add ?skipTlsValidation=true themselves, update both doc sites, and release major. Honest about the change, and matches upstream's intent most literally, but every existing context and every generated doc becomes wrong.
  3. Trust the development certificate explicitly — have the CLI recognise and pin the server's auto-generated development certificate rather than skipping validation wholesale. The best end state, and the most work.

Option 1 seems right to me, but this is a security-default question and worth an explicit call rather than a default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions