Skip to content

vector: use the system CA store for postgres, doris and mongodb_metrics - #576584

Merged
adamcstephens merged 1 commit into
NixOS:masterfrom
zimbatm:cacert-vector
Oct 21, 2026
Merged

adamcstephens merged 1 commit into
NixOS:masterfrom
zimbatm:cacert-vector

Conversation

@zimbatm

@zimbatm zimbatm commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

vector uses OpenSSL with openssl-probe for most components. These already read SSL_CERT_FILE or the system bundle. Three rustls components used the compiled-in webpki-roots store instead:

  • postgres and doris sinks (sqlx feature tls-rustls-ring). Switch to tls-rustls-ring-native-roots, which reads the system store.
  • mongodb_metrics source (mongodb rustls-tls). The driver uses webpki-roots when no tlsCAFile is set. Set it from SSL_CERT_FILE, which vector sets at startup through openssl-probe.

Also bump webpki-roots to 1.0.10 (0.26.1 to the 0.26.11 shim) and rustls-webpki to 0.103.16 for the copies that stay in the binary. These drop emSign ECC Root CA - G3 and block the revoked eMudhra intermediates.

Tested on x86_64-linux with a private test CA in SSL_CERT_FILE and local TLS servers signed by it: the old postgres sink (sslmode=verify-full) and mongodb_metrics source fail with UnknownIssuer even with the test CA, so they ignored the system store; the new ones connect, and fail against the same servers with the normal system bundle. The OpenSSL-based http_client source uses the system store before and after. The scanner (https://github.com/zimbatm/nix-cacert-scan) finds 151 embedded roots with emSign ECC Root CA - G3 and AAA Certificate Services before, and 117 without them after. nats over wss was not tested at runtime.

Related to: #576485
Related to: #576544

Assisted-by: Claude Code (claude-opus-5)

Things done

vector uses OpenSSL with openssl-probe for most components. These
already read SSL_CERT_FILE or the system bundle. Three rustls
components used the compiled-in webpki-roots store instead:

- postgres and doris sinks (sqlx feature tls-rustls-ring). Switch to
  tls-rustls-ring-native-roots, which reads the system store.
- mongodb_metrics source (mongodb rustls-tls). The driver uses
  webpki-roots when no tlsCAFile is set. Set it from SSL_CERT_FILE,
  which vector sets at startup through openssl-probe.

Also bump webpki-roots to 1.0.10 (0.26.1 to the 0.26.11 shim) and
rustls-webpki to 0.103.16 for the copies that stay in the binary.
These drop emSign ECC Root CA - G3 and block the revoked eMudhra
intermediates.

Part of NixOS#576544

Assisted-by: Claude Code (claude-opus-5)
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". label Oct 20, 2026
@zimbatm zimbatm added the backport release-26.05 Backport PR automatically label Oct 20, 2026
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs labels Oct 20, 2026
@adamcstephens

Copy link
Copy Markdown
Contributor

Will you be submitting these upstream?

@adamcstephens
adamcstephens added this pull request to the merge queue Oct 21, 2026
Merged via the queue into NixOS:master with commit 7810f90 Oct 21, 2026
35 checks passed
@nixpkgs-ci

nixpkgs-ci Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Backport failed for release-26.05, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-26.05
git worktree add -d .worktree/backport-576584-to-release-26.05 origin/release-26.05
cd .worktree/backport-576584-to-release-26.05
git switch --create backport-576584-to-release-26.05
git cherry-pick -x 711e2ef9e7b80cb29f293af90d9e0b8700b9fc5b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 8.has: failed backport 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. backport release-26.05 Backport PR automatically llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants