Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ starts with **Upgrade notes**: read them before you upgrade. The upgrade procedu
- A session that spawns a child session gets a new prompt when the child finishes a turn.
The prompt carries the child's outcome and its last message, so the parent does not have
to poll for it. ([#1825])
- The Helm value `orchestrator.connectionBrokerSecret` (`existingSecret`, `key`) gives the
connection credential broker its own bearer. The chart sets it on the coordinator and the
orchestrator. Unset, nothing changes: the broker uses the control-plane bearer. Set it
now: a later release will require it. ([#1859])

### Fixed

Expand Down Expand Up @@ -450,3 +454,4 @@ The first tagged release. See the
[#1825]: https://github.com/cortexapps/engrams/pull/1825
[#1826]: https://github.com/cortexapps/engrams/pull/1826
[#1849]: https://github.com/cortexapps/engrams/pull/1849
[#1859]: https://github.com/cortexapps/engrams/pull/1859
16 changes: 12 additions & 4 deletions deploy/helm/engram/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,21 @@ spec:
key: {{ $agKey }}
{{- end }}
{{- if .Values.web.enabled }}
# ADR 0109: host-only bearer for coordinator calls to the connection
# credential broker. It must match the orchestrator's validated bearer.
# ADR 0109: the bearer for coordinator calls to the connection
# credential broker. It must match the orchestrator's broker bearer
# (orchestrator-deployment.yaml reads the same Secret key).
- name: ENGRAM_CONNECTION_BROKER_BEARER
valueFrom:
secretKeyRef:
name: {{ .Values.orchestrator.databaseSecret.existingSecret }}
key: {{ .Values.orchestrator.databaseSecret.bearerKey }}
{{- with .Values.orchestrator.connectionBrokerSecret }}
{{- if .existingSecret }}
name: {{ .existingSecret }}
key: {{ .key }}
{{- else }}
name: {{ $.Values.orchestrator.databaseSecret.existingSecret }}
key: {{ $.Values.orchestrator.databaseSecret.bearerKey }}
{{- end }}
{{- end }}
{{- end }}
{{- if eq .Values.forge.provider "github" }}
# ADR 0023: the GitHub App private key (PEM). The coord reads
Expand Down
11 changes: 11 additions & 0 deletions deploy/helm/engram/templates/orchestrator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ spec:
secretKeyRef:
name: {{ .Values.orchestrator.databaseSecret.existingSecret }}
key: {{ .Values.orchestrator.databaseSecret.bearerKey }}
{{- with .Values.orchestrator.connectionBrokerSecret }}
{{- if .existingSecret }}
# Unset, the orchestrator's broker falls back to CONTROL_PLANE_BEARER,
# which is also what the coordinator then sends.
- name: CONNECTION_BROKER_BEARER
valueFrom:
secretKeyRef:
name: {{ .existingSecret }}
key: {{ .key }}
{{- end }}
{{- end }}
- name: BETTER_AUTH_SECRET
valueFrom:
secretKeyRef:
Expand Down
14 changes: 14 additions & 0 deletions deploy/helm/engram/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,20 @@ orchestrator:
bearerKey: CONTROL_PLANE_BEARER
authSecretKey: BETTER_AUTH_SECRET

# The bearer the coordinator presents to the orchestrator's connection
# credential broker. The chart gives the same Secret key to the coordinator
# (ENGRAM_CONNECTION_BROKER_BEARER) and the orchestrator
# (CONNECTION_BROKER_BEARER), so the two always match.
# - Default (existingSecret: ""): the broker uses CONTROL_PLANE_BEARER
# (databaseSecret.bearerKey above), and the orchestrator env omits
# CONNECTION_BROKER_BEARER.
# - Set existingSecret to a Secret that holds a DEDICATED random value
# under `key`, so a holder of the control-plane bearer cannot mint
# connection credentials. A later release requires this secret.
connectionBrokerSecret:
existingSecret: ""
key: CONNECTION_BROKER_BEARER

# ADR 0051: the orchestrator KEK-envelope-seals `user_session_secrets` at rest
# (the user's harness tokens, e.g. CLAUDE_CODE_OAUTH_TOKEN) using the SAME
# 32-byte key + envelope format as the coordinator's `kek.provider: env-var`
Expand Down
1 change: 1 addition & 0 deletions docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ lands where.
| `ENGRAM_GCP_PROJECT_ID` | gcp secrets backend: the Secret Manager project |
| `ENGRAM_CHUNK_GC_INTERVAL_SECS` / `ENGRAM_CHUNK_GC_RETAIN_SECS` | chunk-GC cadence / unreferenced retention |
| `ENGRAM_APP_GRPC_TOKENS` | The orchestrator's bearer (fail-closed when empty) |
| `ENGRAM_CONNECTION_BROKER_BEARER` | The bearer for calls to the orchestrator's connection credential broker. Must match the orchestrator's `CONNECTION_BROKER_BEARER`. The chart reads both from `orchestrator.connectionBrokerSecret`; unset, both use `CONTROL_PLANE_BEARER` |

Cloud credentials are ambient: GKE Workload Identity / EKS IRSA on
the coordinator's ServiceAccount — no key files.
Expand Down
1 change: 1 addition & 0 deletions site/src/content/docs/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ where, for anyone reading a manifest or running a component outside the charts.
| `DATABASE_URL` | Postgres connection string, from the coordinator's Secret. |
| `ENGRAM_AUTH_TOKENS` | Comma-separated bearer tokens that hosts and the orchestrator present. |
| `ENGRAM_APP_GRPC_TOKENS` | The orchestrator's bearer for the coordinator's private RPC port. Empty means every call is refused. |
| `ENGRAM_CONNECTION_BROKER_BEARER` | The bearer the coordinator sends to the orchestrator's connection credential broker. It must match the orchestrator's `CONNECTION_BROKER_BEARER`. When the orchestrator has no `CONNECTION_BROKER_BEARER`, it accepts its control-plane bearer here. |
| `ENGRAM_BLOB_BACKEND` | `gcs`, `s3`, or `local` for development. |
| `ENGRAM_GCS_BUCKET` | With `gcs`: the chunks bucket. |
| `ENGRAM_S3_BUCKET`, `ENGRAM_S3_REGION`, `ENGRAM_S3_ENDPOINT_URL` | With `s3`: the bucket, the signing region, and an optional endpoint for S3-compatible stores such as MinIO or R2, which switches the client to path-style addressing. |
Expand Down
2 changes: 1 addition & 1 deletion site/src/content/docs/docs/reference/helm-engram.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ at boot.
| `upgradeDrain` | The job that runs before an upgrade whose host agents cannot adopt the VMs running now: whether it runs and its time budget. It runs the coordinator image. See [Upgrade engrams](../../guides/upgrade/#when-a-release-changes-how-hosts-run-vms). |
| `probes`, `drainSeconds`, `terminationGracePeriodSeconds` | Liveness on `/healthz`, readiness on `/readyz`, and how long a replica drains before it stops. |
| `web` | The dashboard: image, Ingress, and the annotations that attach a managed certificate. |
| `orchestrator` | The orchestrator: image, its Secret with the session-signing key, `auth` (see [Sign-in](#sign-in)), the public URL, and integration settings. |
| `orchestrator` | The orchestrator: image, its Secret with the session-signing key, `auth` (see [Sign-in](#sign-in)), the public URL, and integration settings. `connectionBrokerSecret` names a Secret and key with a dedicated bearer for the connection credential broker; the chart gives it to the coordinator and the orchestrator. Unset, the broker uses the control-plane bearer. |

## Upgrades

Expand Down
Loading