Skip to content

feat(helm): add a dedicated connection-broker bearer secret value - #1859

Closed
nikhilunni wants to merge 2 commits into
mainfrom
broker-bearer-chart-value
Closed

nikhilunni wants to merge 2 commits into
mainfrom
broker-bearer-chart-value

Conversation

@nikhilunni

Copy link
Copy Markdown
Contributor

Summary

The coordinator sends ENGRAM_CONNECTION_BROKER_BEARER to the orchestrator's connection credential broker. The Helm chart took that value from the CONTROL_PLANE_BEARER key, and it had no way to set the orchestrator's CONNECTION_BROKER_BEARER. So every chart deployment uses the control-plane bearer for the broker, and a holder of the control-plane bearer can mint connection credentials.

This PR is the expand step. It adds orchestrator.connectionBrokerSecret (existingSecret, key, default key CONNECTION_BROKER_BEARER). When existingSecret is set, the chart gives that one Secret key to both:

  • the coordinator's ENGRAM_CONNECTION_BROKER_BEARER (templates/deployment.yaml)
  • the orchestrator's CONNECTION_BROKER_BEARER (templates/orchestrator-deployment.yaml)

so the two always match.

Unset (the default), nothing changes on upgrade. The coordinator still reads the CONTROL_PLANE_BEARER key, and the orchestrator env omits CONNECTION_BROKER_BEARER, so the orchestrator falls back to CONTROL_PLANE_BEARER as it does today.

Docs: the values comment, docs/deploy.md, the site configuration and Helm references, and a CHANGELOG [Unreleased] "Added" entry.

Follow-up: the contract step

In a later release, after deployments set the dedicated secret, the orchestrator stops falling back to CONTROL_PLANE_BEARER. It then refuses broker requests when it has no CONNECTION_BROKER_BEARER of its own. The chart then requires orchestrator.connectionBrokerSecret.existingSecret and stops wiring the coordinator from the CONTROL_PLANE_BEARER key. That release's CHANGELOG upgrade notes must tell operators to set the secret first.

Validation

  • helm lint with ci/render-values.yaml, with the value unset and set: passed.
  • helm template, value unset, compared with origin/main: the only difference is the rewritten template comment. With comment lines removed, the two outputs are identical.
  • helm template, value set (existingSecret=engram-broker): both env vars read engram-broker / CONNECTION_BROKER_BEARER.
  • Every shipped overlay (values-{gcp,aws,iap}.yaml.example, placeholders stubbed as in CI) renders.
  • site/: pnpm build (leak + style lint, astro check, build) passed on Node 24.
  • git diff --check: passed.

🤖 Generated with Claude Code

@nikhilunni
nikhilunni force-pushed the broker-bearer-chart-value branch from 2040171 to 5024658 Compare December 2, 2026 20:44
nikhilunni and others added 2 commits December 2, 2026 13:56
The coordinator sends ENGRAM_CONNECTION_BROKER_BEARER to the
orchestrator's connection credential broker. The chart took it from the
CONTROL_PLANE_BEARER key and could not set the orchestrator's
CONNECTION_BROKER_BEARER, so every chart deployment used the
control-plane bearer for the broker.

`orchestrator.connectionBrokerSecret` (`existingSecret`, `key`) now
feeds both variables from one Secret key, so they always match. When
`existingSecret` is empty, the render is the same as before: the
coordinator reads the CONTROL_PLANE_BEARER key, and the orchestrator
env omits CONNECTION_BROKER_BEARER and falls back. This is the expand
step; a later release makes the dedicated secret required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…request

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nikhilunni

Copy link
Copy Markdown
Contributor Author

Combined into #1860 with the other audit PRs, so they merge and deploy together.

@nikhilunni nikhilunni closed this Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant