From 75560bc52aa5ec9c6adececbcec1e2cd77bee986 Mon Sep 17 00:00:00 2001 From: Khaliq Date: Tue, 17 Nov 2026 01:20:21 -0800 Subject: [PATCH 1/7] feat(relaygate): default policy declares inboxDefaults for gid 11 Desktop agents (device-enrolled, named cursor-/claude-/codex-) have inboxes no streamDefaults prefix covers; relaygate#43 places them by the registered agent's gid. Give gid 11 the same mode/ACL as the local- inbox rule (660, pit may read). Older images ignore the key. Co-Authored-By: Claude Opus 5.5 --- charts/relaygate/values.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/charts/relaygate/values.yaml b/charts/relaygate/values.yaml index afc57939..25862e82 100644 --- a/charts/relaygate/values.yaml +++ b/charts/relaygate/values.yaml @@ -50,6 +50,14 @@ policy: - { prefix: "slack:", gid: 22, mode: "660", classify: true } - { prefix: "kb:", gid: 22, mode: "660", classify: true } streamOverrides: [] + # Inboxes no prefix covers (Desktop agents enrolled with a device token are + # named cursor-, claude-, codex-...) follow the registered agent: owned by it, + # in its gid, with this per-gid mode/ACL (else 660, no ACL). Mirrors the + # local- inbox rule: local agents DM each other, the pit may read, never + # write. A name no agent has is still refused. relaygate#43; older images + # ignore it. + inboxDefaults: + - { gid: 11, mode: "660", acl: [{ gid: 22, perm: "r" }] } # Sessions (with the Sessions proxy): local sessions readable by the pit, # pit sessions private to the pit. Overrides can't change a session's group. sessionDefaults: From 44c261321761fc62c34aaaa7e26ac2144baeb267 Mon Sep 17 00:00:00 2001 From: Khaliq Date: Tue, 17 Nov 2026 01:49:13 -0800 Subject: [PATCH 2/7] chore(relaygate): bump chart to 0.1.10 Co-Authored-By: Claude Opus 5.5 --- charts/relaygate/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/relaygate/Chart.yaml b/charts/relaygate/Chart.yaml index 5e55e181..9c9f2864 100644 --- a/charts/relaygate/Chart.yaml +++ b/charts/relaygate/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: relaygate type: application -version: 0.1.9 +version: 0.1.10 appVersion: "0.1.0" kubeVersion: ">=1.27.0-0" description: >- From 6933e7fdf05bef71e8ac8c683bc652bad19a358f Mon Sep 17 00:00:00 2001 From: Khaliq Date: Tue, 17 Nov 2026 01:55:53 -0800 Subject: [PATCH 3/7] chore(agent-relay): 0.7.54 picks up relaygate 0.1.10 Co-Authored-By: Claude Opus 5.5 --- charts/agent-relay/Chart.lock | 6 +++--- charts/agent-relay/Chart.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/agent-relay/Chart.lock b/charts/agent-relay/Chart.lock index e80fb075..cc364989 100644 --- a/charts/agent-relay/Chart.lock +++ b/charts/agent-relay/Chart.lock @@ -34,6 +34,6 @@ dependencies: version: 0.3.11 - name: relaygate repository: file://../relaygate - version: 0.1.9 -digest: sha256:5f03ff500f55fc4bdeb35bbbdca11b0ed4fb9527d4bf0601826f005b0b5fcee5 -generated: "2026-11-17T00:23:52.745880727-08:00" + version: 0.1.10 +digest: sha256:8a0a16359291e927c0dcce69ce236b215ae63c196a1f082fb150fdb7f2cf9580 +generated: "2026-11-17T01:55:47.93979-08:00" diff --git a/charts/agent-relay/Chart.yaml b/charts/agent-relay/Chart.yaml index 381d264a..753f7c9b 100644 --- a/charts/agent-relay/Chart.yaml +++ b/charts/agent-relay/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: agent-relay description: Self-hosted Agent Relay messaging and sessions suite type: application -version: 0.7.53 +version: 0.7.54 appVersion: "0.1.0" kubeVersion: ">=1.28.0-0" annotations: @@ -63,6 +63,6 @@ dependencies: repository: file://../slack-relay condition: components.slackRelay - name: relaygate - version: 0.1.9 + version: 0.1.10 repository: file://../relaygate condition: components.relaygate From c79d8dc0ea3cc49fa8c78cc29f10d1132c99fa52 Mon Sep 17 00:00:00 2001 From: Khaliq Date: Tue, 17 Nov 2026 02:21:42 -0800 Subject: [PATCH 4/7] chore(self-hosted): matrix rows for agent-relay 0.7.54 and relaygate 0.1.10 Co-Authored-By: Claude Opus 5.5 --- docs/self-hosted-requirements.md | 6 ++++-- self-hosted/requirements.yaml | 24 ++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/self-hosted-requirements.md b/docs/self-hosted-requirements.md index e093e9fe..cecc479e 100644 --- a/docs/self-hosted-requirements.md +++ b/docs/self-hosted-requirements.md @@ -165,7 +165,8 @@ Services image (sessions-pipeline-worker, alleyoop and the privileged SQL Jobs): | relayauth-0.1.2 | shipped | relayauth 0.1.2 | relayauth: `ghcr.io/agentworkforce/relayauth@sha256:c23c92d25fdf…` | | | License-annotation patch bump of 0.1.1. Superseded by 0.1.3. | | relayauth-0.1.1 | shipped | relayauth 0.1.1 | relayauth: `ghcr.io/agentworkforce/relayauth@sha256:c23c92d25fdf…` | | | relayauth 784582ef (machine-bound History assertion contract, relayauth #113). Superseded by 0.1.2. | | relayauth-0.1.0 | shipped | relayauth 0.1.0 | relayauth: `ghcr.io/agentworkforce/relayauth@sha256:eb71daa28e30…` | | | superseded by 0.1.1. | -| agent-relay-0.7.53 | unreleased | agent-relay 0.7.53
relay-control 0.4.22
relay-webapp 0.2.7
(deps: relaycast 0.3.16, relayauth 0.1.5, sessions-pipeline 0.8.47, relay-control 0.4.22, relay-webapp 0.2.7, relayflows 0.2.5, durable-actors 0.14.6-awf.4, relayfile 0.2.2, telemetry-collector 0.1.7, relay-chief 0.1.0, slack-relay 0.3.11, relaygate 0.1.9) | relaycast: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
relaycast-postgres: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
sessions-pipeline-worker: `ghcr.io/agentworkforce/sessions-pipeline@sha256:77022c5b6a1d…`
relay-control: `ghcr.io/agentworkforce/relay-control@sha256:d1b6ca95fab2…`
relay-webapp: `ghcr.io/agentworkforce/relay-webapp@sha256:bd295ccb7d13…` | | | Carries 0.7.52 and sessions-pipeline 0.8.47: ingestEdge.replicas (default 1; above 1 requires ledger=s3). Default renders differ only in the helm.sh/chart labels. | +| agent-relay-0.7.54 | unreleased | agent-relay 0.7.54
relay-control 0.4.22
relay-webapp 0.2.7
(deps: relaycast 0.3.16, relayauth 0.1.5, sessions-pipeline 0.8.47, relay-control 0.4.22, relay-webapp 0.2.7, relayflows 0.2.5, durable-actors 0.14.6-awf.4, relayfile 0.2.2, telemetry-collector 0.1.7, relay-chief 0.1.0, slack-relay 0.3.11, relaygate 0.1.10) | relaycast: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
relaycast-postgres: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
sessions-pipeline-worker: `ghcr.io/agentworkforce/sessions-pipeline@sha256:77022c5b6a1d…`
relay-control: `ghcr.io/agentworkforce/relay-control@sha256:d1b6ca95fab2…`
relay-webapp: `ghcr.io/agentworkforce/relay-webapp@sha256:bd295ccb7d13…` | | | Carries 0.7.53 and relaygate 0.1.10: the default policy gives inboxes no prefix covers (Desktop agents enrolled with a device token, named cursor-, claude-, codex-) the gid-11 inboxDefaults mirroring the local- rule, so local agents DM each other and the pit may read, never write. Needs relaygate with inboxDefaults (relaygate#43); older images ignore it. Still default-off (components.relaygate). Default renders differ in the relaygate policy ConfigMap and the helm.sh/chart labels. | +| agent-relay-0.7.53 | **planned** | agent-relay 0.7.53
relay-control 0.4.22
relay-webapp 0.2.7
(deps: relaycast 0.3.16, relayauth 0.1.5, sessions-pipeline 0.8.47, relay-control 0.4.22, relay-webapp 0.2.7, relayflows 0.2.5, durable-actors 0.14.6-awf.4, relayfile 0.2.2, telemetry-collector 0.1.7, relay-chief 0.1.0, slack-relay 0.3.11, relaygate 0.1.9) | relaycast: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
relaycast-postgres: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
sessions-pipeline-worker: `ghcr.io/agentworkforce/sessions-pipeline@sha256:77022c5b6a1d…`
relay-control: `ghcr.io/agentworkforce/relay-control@sha256:d1b6ca95fab2…`
relay-webapp: `ghcr.io/agentworkforce/relay-webapp@sha256:bd295ccb7d13…` | | | Carries 0.7.52 and sessions-pipeline 0.8.47: ingestEdge.replicas (default 1; above 1 requires ledger=s3). Default renders differ only in the helm.sh/chart labels. | | agent-relay-0.7.52 | **planned** | agent-relay 0.7.52
relay-control 0.4.22
relay-webapp 0.2.7
(deps: relaycast 0.3.16, relayauth 0.1.5, sessions-pipeline 0.8.46, relay-control 0.4.22, relay-webapp 0.2.7, relayflows 0.2.5, durable-actors 0.14.6-awf.4, relayfile 0.2.2, telemetry-collector 0.1.7, relay-chief 0.1.0, slack-relay 0.3.11, relaygate 0.1.9) | relaycast: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
relaycast-postgres: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
sessions-pipeline-worker: `ghcr.io/agentworkforce/sessions-pipeline@sha256:77022c5b6a1d…`
relay-control: `ghcr.io/agentworkforce/relay-control@sha256:d1b6ca95fab2…`
relay-webapp: `ghcr.io/agentworkforce/relay-webapp@sha256:bd295ccb7d13…` | | | Carries 0.7.51 and sessions-pipeline 0.8.46: opt-in ingestEdge.ledgerBucket and ingestEdge.ledgerHomeGuard. Default renders differ only in the helm.sh/chart labels. | | agent-relay-0.7.51 | **planned** | agent-relay 0.7.51
relay-control 0.4.22
relay-webapp 0.2.7
(deps: relaycast 0.3.16, relayauth 0.1.5, sessions-pipeline 0.8.45, relay-control 0.4.22, relay-webapp 0.2.7, relayflows 0.2.5, durable-actors 0.14.6-awf.4, relayfile 0.2.2, telemetry-collector 0.1.7, relay-chief 0.1.0, slack-relay 0.3.11, relaygate 0.1.9) | relaycast: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
relaycast-postgres: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
sessions-pipeline-worker: `ghcr.io/agentworkforce/sessions-pipeline@sha256:77022c5b6a1d…`
relay-control: `ghcr.io/agentworkforce/relay-control@sha256:d1b6ca95fab2…`
relay-webapp: `ghcr.io/agentworkforce/relay-webapp@sha256:bd295ccb7d13…` | | | Carries 0.7.50 and sessions-pipeline 0.8.45: opt-in ingestEdge.admission.awaitAuthority. Default renders differ only in the helm.sh/chart labels. | | agent-relay-0.7.50 | **planned** | agent-relay 0.7.50
relay-control 0.4.22
relay-webapp 0.2.7
(deps: relaycast 0.3.16, relayauth 0.1.5, sessions-pipeline 0.8.44, relay-control 0.4.22, relay-webapp 0.2.7, relayflows 0.2.5, durable-actors 0.14.6-awf.4, relayfile 0.2.2, telemetry-collector 0.1.7, relay-chief 0.1.0, slack-relay 0.3.11, relaygate 0.1.9) | relaycast: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
relaycast-postgres: `ghcr.io/agentworkforce/relaycast-self-host@sha256:ec062ef901af…`
sessions-pipeline-worker: `ghcr.io/agentworkforce/sessions-pipeline@sha256:77022c5b6a1d…`
relay-control: `ghcr.io/agentworkforce/relay-control@sha256:d1b6ca95fab2…`
relay-webapp: `ghcr.io/agentworkforce/relay-webapp@sha256:bd295ccb7d13…` | | | Carries 0.7.49 and slack-relay 0.3.11: the Slack router reacts :eyes: to each message it routes as soon as it takes it (slack.ackReaction, needs the bot scope reactions:write), still default-off (components.slackRelay). Default renders differ only in the helm.sh/chart labels. | @@ -301,7 +302,8 @@ Services image (sessions-pipeline-worker, alleyoop and the privileged SQL Jobs): | durable-actors-0.14.6-awf.1 | **planned** | durable-actors 0.14.6-awf.1 | | | | Superseded before a chart tag by 0.14.6-awf.2. The vendored v0.14.6 chart plus UPSTREAM.md patch 10 (AWS: storage.provider s3, storage.s3.{region,actorCredentials,actorRoleArn,endpoint,forcePathStyle}, serviceAccount.annotations, sandbox.{runtimeClassName,nodeSelector,tolerations}, AWS availability zones in placement.zone) and patch 11 (the -awf.1 version suffix). The S3 values need a control-plane image from the AgentWorkforce durable-actors fork (selfhost/aws-s3, GHCR durable-actors-control-plane); upstream 0.14.6 images ignore them. GCS defaults render as the upstream chart apart from the helm.sh/chart label. Supersedes the never-released 0.14.6 row: Vendored TerseAI/durable-actors release chart v0.14.6 (tag commit 5f0a2d62, asset sha256 a489cd15...bee) with the local patches listed in charts/durable-actors/UPSTREAM.md (root global, invoke-only key, host idle timeout, pool-manager name length, zero-valued bounds, lowercase ingress host, schema patterns, README links). Never published by this repo; images pinned by upstream digest (charts/durable-actors/UPSTREAM.md). | | relayfile-0.1.1 | shipped | relayfile 0.1.1 | relayfile: `ghcr.io/agentworkforce/relayfile:0.1.0` | | | image by tag (Chart.appVersion), not digest. Superseded by 0.2.0. | | relay-chief-0.1.0 | unreleased | relay-chief 0.1.0 | | | | First chart, rendered only. No Relay Chief image is published and the digest is operator-supplied until one exists. | -| relaygate-0.1.9 | unreleased | relaygate 0.1.9 | relaygate: `ghcr.io/agentworkforce/relaygate@sha256:` | | | Carries 0.1.8. The default policy adds the agent directory prefix relaycast:agent/ (gid 22, mode 040): the pit sees every agent in GET /v1/agents and /v1/agents/:name, local agents' view is unchanged, and seeing grants no write (DMs still need w on the inbox). Needs relaygate with the agent directory (relaygate#41) for it to take effect; older images ignore it. Default renders differ in the policy ConfigMap and the helm.sh/chart label. | +| relaygate-0.1.10 | unreleased | relaygate 0.1.10 | relaygate: `ghcr.io/agentworkforce/relaygate@sha256:` | | | Carries 0.1.9. The default policy adds inboxDefaults for gid 11 (660, acl 22:r), mirroring the relaycast:inbox/local- rule: an inbox no prefix covers (Desktop agents named cursor-, claude-, codex-) follows its registered agent's group, so local agents DM each other and the pit may read, never write. Needs relaygate with inboxDefaults (relaygate#43) for it to take effect; older images ignore it. Default renders differ in the policy ConfigMap and the helm.sh/chart label. | +| relaygate-0.1.9 | **planned** | relaygate 0.1.9 | relaygate: `ghcr.io/agentworkforce/relaygate@sha256:` | | | Carries 0.1.8. The default policy adds the agent directory prefix relaycast:agent/ (gid 22, mode 040): the pit sees every agent in GET /v1/agents and /v1/agents/:name, local agents' view is unchanged, and seeing grants no write (DMs still need w on the inbox). Needs relaygate with the agent directory (relaygate#41) for it to take effect; older images ignore it. Default renders differ in the policy ConfigMap and the helm.sh/chart label. | | relaygate-0.1.8 | **planned** | relaygate 0.1.8 | relaygate: `ghcr.io/agentworkforce/relaygate@sha256:` | | | Carries 0.1.7. global.relaygate.controlPolicy: RELAYGATE_ADMIN_TOKEN from the shared adminToken Secret; with pull, RELAYCONTROL_POLICY_URL (relay-control /internal/v1/relaygate/policy) and RELAYCONTROL_POLICY_SECRET instead of RELAYGATE_POLICY, the ConfigMap and its volume. Needs relaygate main at R1/R2 (#33, #34) or later. Default renders differ only in the helm.sh/chart label. | | relaygate-0.1.7 | **planned** | relaygate 0.1.7 | relaygate: `ghcr.io/agentworkforce/relaygate@sha256:` | | | Carries 0.1.6. Gate-only: SESSIONS_PORT (global.relaygate.gateOnly.sessionsPort, not 8080) with a containerPort, the internal ClusterIP Service -sessions, and a NetworkPolicy admitting only sessionsListener.controlFrom (non-empty, labelled peers) to it; render fails without the port. Needs relaygate #28 or later for SESSIONS_PORT. Default renders differ only in the helm.sh/chart label. | | relaygate-0.1.6 | **planned** | relaygate 0.1.6 | relaygate: `ghcr.io/agentworkforce/relaygate@sha256:` | | | Carries 0.1.5. control.introspectUrl no longer needs proxy.sessionsUrl (desktop enrolment with a device token works without the Sessions proxy); its env renders outside the Sessions block. Comments for controlPrincipals namePrefix and reserved key ids. CI pins relaygate sha256:b2fcef80 (main 2e8368d, desktop enrolment). Ships no default digest. | diff --git a/self-hosted/requirements.yaml b/self-hosted/requirements.yaml index 3025906a..c250ad4f 100644 --- a/self-hosted/requirements.yaml +++ b/self-hosted/requirements.yaml @@ -1900,9 +1900,22 @@ compatibility: images: relayauth: { repository: ghcr.io/agentworkforce/relayauth, digest: sha256:eb71daa28e30eb7305f666d0bccc5a4002e53e8a574e3c4c32163d907a1b71df } notes: superseded by 0.1.1. - - id: agent-relay-0.7.53 + - id: agent-relay-0.7.54 status: unreleased current: true + charts: { agent-relay: 0.7.54, relay-control: 0.4.22, relay-webapp: 0.2.7 } + app_versions: { agent-relay: 0.1.0, relay-control: 0.1.0, relay-webapp: 0.1.0 } + depends: + agent-relay: { relaycast: 0.3.16, relayauth: 0.1.5, sessions-pipeline: 0.8.47, relay-control: 0.4.22, relay-webapp: 0.2.7, relayflows: 0.2.5, durable-actors: 0.14.6-awf.4, relayfile: 0.2.2, telemetry-collector: 0.1.7, relay-chief: 0.1.0, slack-relay: 0.3.11, relaygate: 0.1.10 } + images: + relaycast: { repository: ghcr.io/agentworkforce/relaycast-self-host, digest: sha256:ec062ef901af15cf575b53a71d7eb09f2e6ab6e7c0d5be2da35339a275a5c6cc } + relaycast-postgres: { repository: ghcr.io/agentworkforce/relaycast-self-host, digest: sha256:ec062ef901af15cf575b53a71d7eb09f2e6ab6e7c0d5be2da35339a275a5c6cc } + sessions-pipeline-worker: { repository: ghcr.io/agentworkforce/sessions-pipeline, digest: sha256:77022c5b6a1d30f96f921d703eb27a1acada8ec273ad84aebdde24f8eddce305 } + relay-control: { repository: ghcr.io/agentworkforce/relay-control, digest: sha256:d1b6ca95fab240a9d41208d83de3b1f4245408b0765038762f1c419ee60f43bc } + relay-webapp: { repository: ghcr.io/agentworkforce/relay-webapp, digest: sha256:bd295ccb7d1323965dce890f19d0b7f857d706c00d7756f719c713763fdb49f3 } + notes: 'Carries 0.7.53 and relaygate 0.1.10: the default policy gives inboxes no prefix covers (Desktop agents enrolled with a device token, named cursor-, claude-, codex-) the gid-11 inboxDefaults mirroring the local- rule, so local agents DM each other and the pit may read, never write. Needs relaygate with inboxDefaults (relaygate#43); older images ignore it. Still default-off (components.relaygate). Default renders differ in the relaygate policy ConfigMap and the helm.sh/chart labels.' + - id: agent-relay-0.7.53 + status: planned charts: { agent-relay: 0.7.53, relay-control: 0.4.22, relay-webapp: 0.2.7 } app_versions: { agent-relay: 0.1.0, relay-control: 0.1.0, relay-webapp: 0.1.0 } depends: @@ -3433,9 +3446,16 @@ compatibility: charts: { relay-chief: 0.1.0 } app_versions: { relay-chief: 0.1.0 } notes: First chart, rendered only. No Relay Chief image is published and the digest is operator-supplied until one exists. - - id: relaygate-0.1.9 + - id: relaygate-0.1.10 status: unreleased current: true + charts: { relaygate: 0.1.10 } + app_versions: { relaygate: 0.1.0 } + images: + relaygate: { repository: ghcr.io/agentworkforce/relaygate, digest_required: true } + notes: 'Carries 0.1.9. The default policy adds inboxDefaults for gid 11 (660, acl 22:r), mirroring the relaycast:inbox/local- rule: an inbox no prefix covers (Desktop agents named cursor-, claude-, codex-) follows its registered agent''s group, so local agents DM each other and the pit may read, never write. Needs relaygate with inboxDefaults (relaygate#43) for it to take effect; older images ignore it. Default renders differ in the policy ConfigMap and the helm.sh/chart label.' + - id: relaygate-0.1.9 + status: planned charts: { relaygate: 0.1.9 } app_versions: { relaygate: 0.1.0 } images: From 6267fd491afaa8bce1e8158bce2fd6aee862a515 Mon Sep 17 00:00:00 2001 From: Khaliq Date: Tue, 17 Nov 2026 02:25:09 -0800 Subject: [PATCH 5/7] fix(relaygate): render only inboxDefaults entries the policy's groups define Helm merges the policy map, so an override that replaces groups kept the default gid-11 inboxDefaults entry and relaygate would refuse to load it. The ConfigMap now drops entries whose gid or ACL gids aren't in policy.groups; values.yaml documents the inheritance and the [] opt-out; charts.sh checks the default, both drops and the opt-out. Co-Authored-By: Claude Opus 5.5 --- charts/relaygate/templates/relaygate.yaml | 16 +++++++++++++++- charts/relaygate/values.yaml | 6 ++++++ scripts/ci/charts.sh | 7 +++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/charts/relaygate/templates/relaygate.yaml b/charts/relaygate/templates/relaygate.yaml index 049e6237..c276bb94 100644 --- a/charts/relaygate/templates/relaygate.yaml +++ b/charts/relaygate/templates/relaygate.yaml @@ -11,7 +11,21 @@ metadata: {{- include "relaygate.labels" . | nindent 4 }} data: policy.json: | - {{- .Values.policy | toPrettyJson | nindent 4 }} + {{- /* inboxDefaults comes from the chart default even when an override replaces groups (Helm merges maps): + render only the entries whose gid and ACL gids the policy defines, so a policy without gid 11 still loads. */ -}} + {{- $policy := deepCopy .Values.policy }} + {{- if hasKey $policy "inboxDefaults" }} + {{- $gids := list }} + {{- range ($policy.groups | default list) }}{{ $gids = append $gids (toString .gid) }}{{ end }} + {{- $kept := list }} + {{- range $policy.inboxDefaults }} + {{- $ok := has (toString .gid) $gids }} + {{- range (.acl | default list) }}{{ if not (has (toString .gid) $gids) }}{{ $ok = false }}{{ end }}{{ end }} + {{- if $ok }}{{ $kept = append $kept . }}{{ end }} + {{- end }} + {{- $_ := set $policy "inboxDefaults" $kept }} + {{- end }} + {{- $policy | toPrettyJson | nindent 4 }} --- {{- end }} {{- if not .Values.persistence.existingClaim }} diff --git a/charts/relaygate/values.yaml b/charts/relaygate/values.yaml index 25862e82..a0ec4adb 100644 --- a/charts/relaygate/values.yaml +++ b/charts/relaygate/values.yaml @@ -56,6 +56,12 @@ policy: # local- inbox rule: local agents DM each other, the pit may read, never # write. A name no agent has is still refused. relaygate#43; older images # ignore it. + # A policy override that omits inboxDefaults inherits this entry (Helm + # merges maps), including its 22:r ACL, even if the override's local- rule + # drops that ACL: set inboxDefaults to match your own groups, or [] to opt + # out (desktop inboxes then get 660, same group only). Entries naming a gid + # your policy.groups doesn't define are left out of the rendered policy, so + # an override without gid 11 or 22 still loads. inboxDefaults: - { gid: 11, mode: "660", acl: [{ gid: 22, perm: "r" }] } # Sessions (with the Sessions proxy): local sessions readable by the pit, diff --git a/scripts/ci/charts.sh b/scripts/ci/charts.sh index 3e4aa804..bae6f892 100755 --- a/scripts/ci/charts.sh +++ b/scripts/ci/charts.sh @@ -1019,6 +1019,13 @@ for chart in "${charts[@]}"; do ! grep -Eq 'name: (RELAYCONTROL_INTROSPECT_URL|SESSION_INGEST_AUDIENCE|SESSIONS_CORS_ORIGINS|SESSIONS_INTERNAL_SECRET)$' <<<"$out" || err "$chart: unset Control settings rendered" [ "$(yq 'select(.kind == "ConfigMap") | .data["policy.json"] | from_json | .controlPrincipals | length' <<<"$out" | sed '/^---$/d;/^$/d')" = 0 ] \ || err "$chart: default policy must not grant Control principals" + # inboxDefaults: the default mirrors the local- inbox rule; an override whose groups lack a gid it names drops + # that entry (Helm merges the policy map, so the default would otherwise make the policy fail to load). + inbox_defaults() { render "$chart" charts/relaygate/ci/proxy-values.yaml "$@" | yq 'select(.kind == "ConfigMap") | .data["policy.json"]' | sed '/^---$/d' | jq -c '.inboxDefaults'; } + [ "$(inbox_defaults)" = '[{"acl":[{"gid":22,"perm":"r"}],"gid":11,"mode":"660"}]' ] || err "$chart: default inboxDefaults must mirror the local- inbox rule" + [ "$(inbox_defaults --set-json 'policy.groups=[{"gid":22,"name":"pit"}]')" = '[]' ] || err "$chart: inboxDefaults for an undefined gid must not render" + [ "$(inbox_defaults --set-json 'policy.groups=[{"gid":11,"name":"local"}]')" = '[]' ] || err "$chart: inboxDefaults with an ACL on an undefined gid must not render" + [ "$(inbox_defaults --set-json 'policy.inboxDefaults=[]')" = '[]' ] || err "$chart: inboxDefaults: [] must opt out" expect_render_failure "$chart" "$v" "Sessions CORS/internal secret without sessionsUrl" "need proxy.sessionsUrl" --set proxy.sessionsUrl= # Control principals alone (desktop enrolment): no Sessions proxy needed. out=$(render "$chart" "$v" --set proxy.sessionsUrl= --set-json 'proxy.sessionsCorsOrigins=[]' --set secrets.sessionsInternalSecret.name=) From b68b8aff0becc0d49221adeabbdddce7995129d9 Mon Sep 17 00:00:00 2001 From: Khaliq Date: Tue, 17 Nov 2026 02:53:46 -0800 Subject: [PATCH 6/7] fix(relaygate): an operator's inboxDefaults entry naming an undefined gid fails the render Dropping it would loosen a restrictive mode to relaygate's 660 fallback. Only the chart's own default entry is still dropped when policy.groups lacks gid 11 or 22. Static checks cover both failures and an operator entry rendering as given. Co-Authored-By: Claude Opus 5.5 --- charts/relaygate/templates/relaygate.yaml | 17 ++++++++++++----- charts/relaygate/values.yaml | 7 ++++--- scripts/ci/charts.sh | 4 ++++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/charts/relaygate/templates/relaygate.yaml b/charts/relaygate/templates/relaygate.yaml index c276bb94..07c38dff 100644 --- a/charts/relaygate/templates/relaygate.yaml +++ b/charts/relaygate/templates/relaygate.yaml @@ -11,17 +11,24 @@ metadata: {{- include "relaygate.labels" . | nindent 4 }} data: policy.json: | - {{- /* inboxDefaults comes from the chart default even when an override replaces groups (Helm merges maps): - render only the entries whose gid and ACL gids the policy defines, so a policy without gid 11 still loads. */ -}} + {{- /* inboxDefaults keeps the chart default even when an override replaces groups (Helm merges maps). Only that + default entry is dropped when the policy lacks its groups, so a policy without gid 11 or 22 still loads; an + operator's own entry naming an undefined gid fails the render, never loosens to relaygate's 660 fallback. */ -}} {{- $policy := deepCopy .Values.policy }} {{- if hasKey $policy "inboxDefaults" }} + {{- $chartDefault := toJson (dict "gid" 11 "mode" "660" "acl" (list (dict "gid" 22 "perm" "r"))) }} {{- $gids := list }} {{- range ($policy.groups | default list) }}{{ $gids = append $gids (toString .gid) }}{{ end }} {{- $kept := list }} {{- range $policy.inboxDefaults }} - {{- $ok := has (toString .gid) $gids }} - {{- range (.acl | default list) }}{{ if not (has (toString .gid) $gids) }}{{ $ok = false }}{{ end }}{{ end }} - {{- if $ok }}{{ $kept = append $kept . }}{{ end }} + {{- $missing := list }} + {{- if not (has (toString .gid) $gids) }}{{ $missing = append $missing (toString .gid) }}{{ end }} + {{- range (.acl | default list) }}{{ if not (has (toString .gid) $gids) }}{{ $missing = append $missing (toString .gid) }}{{ end }}{{ end }} + {{- if not $missing }} + {{- $kept = append $kept . }} + {{- else if ne (toJson .) $chartDefault }} + {{- fail (printf "relaygate: policy.inboxDefaults entry for gid %v names gid(s) %s that policy.groups doesn't define; define them or remove the entry" .gid (join ", " (uniq $missing))) }} + {{- end }} {{- end }} {{- $_ := set $policy "inboxDefaults" $kept }} {{- end }} diff --git a/charts/relaygate/values.yaml b/charts/relaygate/values.yaml index a0ec4adb..8ffa802f 100644 --- a/charts/relaygate/values.yaml +++ b/charts/relaygate/values.yaml @@ -59,9 +59,10 @@ policy: # A policy override that omits inboxDefaults inherits this entry (Helm # merges maps), including its 22:r ACL, even if the override's local- rule # drops that ACL: set inboxDefaults to match your own groups, or [] to opt - # out (desktop inboxes then get 660, same group only). Entries naming a gid - # your policy.groups doesn't define are left out of the rendered policy, so - # an override without gid 11 or 22 still loads. + # out (desktop inboxes then get 660, same group only). This default entry is + # left out of the rendered policy when policy.groups lacks gid 11 or 22, so + # such an override still loads; an entry of your own that names a gid + # policy.groups doesn't define fails the render instead. inboxDefaults: - { gid: 11, mode: "660", acl: [{ gid: 22, perm: "r" }] } # Sessions (with the Sessions proxy): local sessions readable by the pit, diff --git a/scripts/ci/charts.sh b/scripts/ci/charts.sh index bae6f892..3ce6a448 100755 --- a/scripts/ci/charts.sh +++ b/scripts/ci/charts.sh @@ -1026,6 +1026,10 @@ for chart in "${charts[@]}"; do [ "$(inbox_defaults --set-json 'policy.groups=[{"gid":22,"name":"pit"}]')" = '[]' ] || err "$chart: inboxDefaults for an undefined gid must not render" [ "$(inbox_defaults --set-json 'policy.groups=[{"gid":11,"name":"local"}]')" = '[]' ] || err "$chart: inboxDefaults with an ACL on an undefined gid must not render" [ "$(inbox_defaults --set-json 'policy.inboxDefaults=[]')" = '[]' ] || err "$chart: inboxDefaults: [] must opt out" + # An operator's own entry naming an undefined gid fails closed rather than falling back to relaygate's 660. + expect_render_failure "$chart" charts/relaygate/ci/proxy-values.yaml "inboxDefaults ACL names an undefined gid" "policy.inboxDefaults entry for gid 11 names gid(s) 44" --set-json 'policy.inboxDefaults=[{"gid":11,"mode":"600","acl":[{"gid":44,"perm":"r"}]}]' + expect_render_failure "$chart" charts/relaygate/ci/proxy-values.yaml "inboxDefaults for an undefined gid" "policy.inboxDefaults entry for gid 33 names gid(s) 33" --set-json 'policy.inboxDefaults=[{"gid":33,"mode":"600"}]' + [ "$(inbox_defaults --set-json 'policy.inboxDefaults=[{"gid":11,"mode":"600","acl":[{"gid":22,"perm":"r"}]}]')" = '[{"acl":[{"gid":22,"perm":"r"}],"gid":11,"mode":"600"}]' ] || err "$chart: an operator inboxDefaults entry must render as given" expect_render_failure "$chart" "$v" "Sessions CORS/internal secret without sessionsUrl" "need proxy.sessionsUrl" --set proxy.sessionsUrl= # Control principals alone (desktop enrolment): no Sessions proxy needed. out=$(render "$chart" "$v" --set proxy.sessionsUrl= --set-json 'proxy.sessionsCorsOrigins=[]' --set secrets.sessionsInternalSecret.name=) From e15817e84465b7b1be046633c2cb883d8dc67111 Mon Sep 17 00:00:00 2001 From: Khaliq Date: Tue, 17 Nov 2026 03:13:02 -0800 Subject: [PATCH 7/7] fix(relaygate): the inboxDefaults default lives in the template, applied only when unset Matching by value let an explicit copy of the default naming an undefined gid be dropped silently. Now any inboxDefaults the operator sets fails the render on an undefined gid; the chart default applies only when the key is absent and is the only entry ever dropped. Co-Authored-By: Claude Opus 5.5 --- charts/relaygate/templates/relaygate.yaml | 16 +++++++-------- charts/relaygate/values.yaml | 25 +++++++++++------------ scripts/ci/charts.sh | 1 + 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/charts/relaygate/templates/relaygate.yaml b/charts/relaygate/templates/relaygate.yaml index 07c38dff..80767ad8 100644 --- a/charts/relaygate/templates/relaygate.yaml +++ b/charts/relaygate/templates/relaygate.yaml @@ -11,27 +11,27 @@ metadata: {{- include "relaygate.labels" . | nindent 4 }} data: policy.json: | - {{- /* inboxDefaults keeps the chart default even when an override replaces groups (Helm merges maps). Only that - default entry is dropped when the policy lacks its groups, so a policy without gid 11 or 22 still loads; an - operator's own entry naming an undefined gid fails the render, never loosens to relaygate's 660 fallback. */ -}} + {{- /* inboxDefaults: the chart's default (gid 11, 660, acl 22:r, mirroring the local- inbox rule) applies only + when policy omits the key, and is dropped when policy.groups lacks gid 11 or 22 so such a policy still loads. + Any inboxDefaults the operator sets that names an undefined gid fails the render: it never loosens to + relaygate's 660 fallback. */ -}} {{- $policy := deepCopy .Values.policy }} - {{- if hasKey $policy "inboxDefaults" }} - {{- $chartDefault := toJson (dict "gid" 11 "mode" "660" "acl" (list (dict "gid" 22 "perm" "r"))) }} + {{- $inherited := not (hasKey $policy "inboxDefaults") }} + {{- if $inherited }}{{ $_ := set $policy "inboxDefaults" (list (dict "gid" 11 "mode" "660" "acl" (list (dict "gid" 22 "perm" "r")))) }}{{ end }} {{- $gids := list }} {{- range ($policy.groups | default list) }}{{ $gids = append $gids (toString .gid) }}{{ end }} {{- $kept := list }} - {{- range $policy.inboxDefaults }} + {{- range ($policy.inboxDefaults | default list) }} {{- $missing := list }} {{- if not (has (toString .gid) $gids) }}{{ $missing = append $missing (toString .gid) }}{{ end }} {{- range (.acl | default list) }}{{ if not (has (toString .gid) $gids) }}{{ $missing = append $missing (toString .gid) }}{{ end }}{{ end }} {{- if not $missing }} {{- $kept = append $kept . }} - {{- else if ne (toJson .) $chartDefault }} + {{- else if not $inherited }} {{- fail (printf "relaygate: policy.inboxDefaults entry for gid %v names gid(s) %s that policy.groups doesn't define; define them or remove the entry" .gid (join ", " (uniq $missing))) }} {{- end }} {{- end }} {{- $_ := set $policy "inboxDefaults" $kept }} - {{- end }} {{- $policy | toPrettyJson | nindent 4 }} --- {{- end }} diff --git a/charts/relaygate/values.yaml b/charts/relaygate/values.yaml index 8ffa802f..1cb08147 100644 --- a/charts/relaygate/values.yaml +++ b/charts/relaygate/values.yaml @@ -52,19 +52,18 @@ policy: streamOverrides: [] # Inboxes no prefix covers (Desktop agents enrolled with a device token are # named cursor-, claude-, codex-...) follow the registered agent: owned by it, - # in its gid, with this per-gid mode/ACL (else 660, no ACL). Mirrors the - # local- inbox rule: local agents DM each other, the pit may read, never - # write. A name no agent has is still refused. relaygate#43; older images - # ignore it. - # A policy override that omits inboxDefaults inherits this entry (Helm - # merges maps), including its 22:r ACL, even if the override's local- rule - # drops that ACL: set inboxDefaults to match your own groups, or [] to opt - # out (desktop inboxes then get 660, same group only). This default entry is - # left out of the rendered policy when policy.groups lacks gid 11 or 22, so - # such an override still loads; an entry of your own that names a gid - # policy.groups doesn't define fails the render instead. - inboxDefaults: - - { gid: 11, mode: "660", acl: [{ gid: 22, perm: "r" }] } + # in its gid, with a per-gid mode/ACL from inboxDefaults (else 660, no ACL). + # relaygate#43; older images ignore it. + # Left unset, the chart renders the default below, mirroring the local- inbox + # rule (local agents DM each other, the pit may read, never write), and + # leaves it out when policy.groups lacks gid 11 or 22. A policy override + # that doesn't set inboxDefaults gets this default, including its 22:r ACL, + # even if the override's local- rule drops that ACL: set inboxDefaults to + # match your own groups, or [] to opt out (desktop inboxes then get 660, + # same group only). An inboxDefaults you set that names a gid + # policy.groups doesn't define fails the render. + # inboxDefaults: + # - { gid: 11, mode: "660", acl: [{ gid: 22, perm: "r" }] } # Sessions (with the Sessions proxy): local sessions readable by the pit, # pit sessions private to the pit. Overrides can't change a session's group. sessionDefaults: diff --git a/scripts/ci/charts.sh b/scripts/ci/charts.sh index 3ce6a448..a5ffd9e4 100755 --- a/scripts/ci/charts.sh +++ b/scripts/ci/charts.sh @@ -1029,6 +1029,7 @@ for chart in "${charts[@]}"; do # An operator's own entry naming an undefined gid fails closed rather than falling back to relaygate's 660. expect_render_failure "$chart" charts/relaygate/ci/proxy-values.yaml "inboxDefaults ACL names an undefined gid" "policy.inboxDefaults entry for gid 11 names gid(s) 44" --set-json 'policy.inboxDefaults=[{"gid":11,"mode":"600","acl":[{"gid":44,"perm":"r"}]}]' expect_render_failure "$chart" charts/relaygate/ci/proxy-values.yaml "inboxDefaults for an undefined gid" "policy.inboxDefaults entry for gid 33 names gid(s) 33" --set-json 'policy.inboxDefaults=[{"gid":33,"mode":"600"}]' + expect_render_failure "$chart" charts/relaygate/ci/proxy-values.yaml "explicit copy of the default inboxDefaults without gid 22" "policy.inboxDefaults entry for gid 11 names gid(s) 22" --set-json 'policy.groups=[{"gid":11,"name":"local"}]' --set-json 'policy.inboxDefaults=[{"gid":11,"mode":"660","acl":[{"gid":22,"perm":"r"}]}]' [ "$(inbox_defaults --set-json 'policy.inboxDefaults=[{"gid":11,"mode":"600","acl":[{"gid":22,"perm":"r"}]}]')" = '[{"acl":[{"gid":22,"perm":"r"}],"gid":11,"mode":"600"}]' ] || err "$chart: an operator inboxDefaults entry must render as given" expect_render_failure "$chart" "$v" "Sessions CORS/internal secret without sessionsUrl" "need proxy.sessionsUrl" --set proxy.sessionsUrl= # Control principals alone (desktop enrolment): no Sessions proxy needed.