Skip to content

objectstore-plugin: reload the exchange CA bundle on each handshake - #3839

Open
KR Ravindra (KR-Ravindra) wants to merge 1 commit into
agent-substrate:mainfrom
KR-Ravindra:fix/exchangeclient-reload-ca
Open

KR Ravindra (KR-Ravindra) wants to merge 1 commit into
agent-substrate:mainfrom
KR-Ravindra:fix/exchangeclient-reload-ca

Conversation

@KR-Ravindra

Copy link
Copy Markdown

Problem

The node-mode GCS plugin parses the exchange CA bundle once into tls.Config.RootCAs in exchangeclient.New, so after the servicedns CA is rotated it keeps verifying the exchange against the old root. Token exchanges on nodes whose atelet predates the rotation fail with Unavailable and suspends crash the actor until atelet is restarted. The serving side already reloads per handshake.

Fix

Verify the exchange's certificate in VerifyConnection against credbundle.PoolLoader, as ateapiauth.DialOptions does, so a rotation applies on the next handshake. The startup load stays so a missing bundle still fails New.

How tested

New TestNew_ReloadsTheCAFile: stub exchange with a cert from a second CA, exchange fails, bundle rewritten with both roots, next call on the same connection succeeds. Fails on main.

Fixes #3256

AI use: AI-assisted, I reviewed and tested it. Experimented and verified with an AI agent.

  • Tests pass
  • Docs updated (no user-facing change)

The node-mode GCS plugin parsed the exchange CA bundle once into RootCAs, so a rotation of the servicedns CA broke token exchanges on every node until atelet was restarted. Verify the exchange's certificate in VerifyConnection against credbundle.PoolLoader, as the ate-api client already does.

Signed-off-by: KR Ravindra <42912207+KR-Ravindra@users.noreply.github.com>
@KR-Ravindra
KR Ravindra (KR-Ravindra) marked this pull request as ready for review November 13, 2026 08:51

This branch has not been deployed

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

Labels

None yet

Projects

None yet

1 participant