Repository navigation
Description
MU1's control plane holds the Ed25519 session-signing key, the credential KEK and the shared exchange
token. It currently runs in namespace default, where the harness ServiceAccount holds unrestricted
pods/exec. That combination lets a process with code execution in the harness pod read all three
secrets, which defeats the mechanism behind the design's "the harness cannot mint a token" property.
Found by the whole-branch review of the MU1 branch. Documented honestly in spec §8.2 rather than left
implicit; this issue is the follow-up that closes it.
Why it is exploitable
Four facts compose:
| Fact | Where |
|---|---|
Harness SA has pods/exec: ['create'] in default, no resourceNames |
deploy/knative/service.yaml:113-127 |
Control-plane Deployment also runs in default |
deploy/knative/control-plane.yaml:138 |
| All three secrets are injected as env vars | deploy/knative/control-plane.yaml:200-214 |
| Harness egress to the API server on 443/6443 is deliberately allowed | deploy/knative/harness-egress-policy.yaml:91-99 |
So: kubectl exec into deploy/sh-control-plane, read /proc/1/environ, mint an api-scoped token
for any subject, create a session as them, exchange it, and receive their real provider credential.
readOnlyRootFilesystem and runAsNonRoot do not help; both tiers run the same image, so a shell is
present.
The harness needs pods/exec — it is how agent code runs in sandbox pods — and the sandbox pool lives
in default, so the grant cannot be narrowed by namespace. The control plane is the thing that has to
move.
Why it is not urgent (but must land before the auth flip)
control-plane.yamlis not in the base kustomization, so no existing deployment gets the control
plane at all. Pinned by a test.SH_REQUIRE_AUTHdefaults tofalse, so the authenticated path is not in use.- The exposure requires code execution in the harness pod specifically — the semi-trusted,
model-influenced tier — not the sandbox tier where model code actually runs. It is not reachable
directly from prompt injection.
It becomes real the moment a deployment turns SH_REQUIRE_AUTH=true in earnest. This should be
treated as a blocker on that flip, not on MU1's merge.
Proposed fix
Move the control-plane Deployment, Service and ServiceAccount into the sh-credentials namespace the
manifest already ships for its Secrets. Concretely, and this is deliberately a list rather than a
one-line change:
control-plane.yaml— Deployment, Service and ServiceAccount namespaces.control-plane.yaml— both RoleBindings' subject namespaces follow the SA.control-plane.yaml— the pod-phase Role backing/resourcesmust stay scoped to the workload
namespace (default), so its RoleBinding becomes cross-namespace: Role indefault, subject in
sh-credentials. This is the part most likely to be got wrong.control-plane.yaml— thesh-control-plane-egress-from-harnessNetworkPolicy breaks. A bare
podSelectorin an egress rule only matches pods in the policy's own namespace, so it needs a
namespaceSelectorforsh-credentialsalongside the existingpodSelector. That policy was added
in the MU1 branch specifically to unblock this hop; moving the namespace without updating it
re-breaks the exchange with a 503.service.yaml—SH_CONTROL_PLANE_URLbecomes
http://sh-control-plane.sh-credentials.svc:8080.demo-multiuser.sh— needs a second namespace variable, not a changed one. It currently uses
$NS(defaultdefault,lib.sh:14) for 11 operations that would split across two namespaces: the
three Secret creations, the teardown delete,rollout statusand the port-forward move to the new
namespace, while everyksvcoperation stays indefault.packages/knative-server/test/control-plane-manifest.test.ts— the namespace assertions and the
NetworkPolicy composition cases.deploy/knative/SMOKE.md— any namespace-qualified commands.
Then create the Secrets in the new namespace, and confirm make demo-multiuser still passes end to end
on a live cluster — the manifest tests cannot catch a cross-namespace RBAC or NetworkPolicy mistake.
Guard already in place
The MU1 branch ships a CI tripwire so this cannot be forgotten, in
packages/knative-server/test/control-plane-manifest.test.ts (describe block
"SH_REQUIRE_AUTH=true must not ship while the control plane is collocated"):
- a conjunction test that fails only when
SH_REQUIRE_AUTH=trueand the control-plane
Deployment is still indefault. Either half alone is legitimate — today ships'false'+default,
the end state is'true'+sh-credentials— so only the combination is refused. Both halves are read
from the manifests, not written as literals. - a canary test pinning the current shipped state, which fails if either half changes on its own. So
a namespace move that forgot the flag, or a flag flip that forgot the namespace, both surface here.
Whoever flips the default gets a failing test whose message names the exposure, the fix, the
namespaceSelector trap in step 4 above, and spec §8.2 — instead of a silent regression.
When this issue is fixed, both cases need updating in the same change: the canary's expected
namespace, and the conjunction's notion of which namespace counts as collocated.
Alternatives considered
- Narrow the harness Role's
pods/execwithresourceNames— brittle: pool pod names are
generated, so the list cannot be written ahead of time. - Mount the secrets as files instead of env vars — does not help.
execreads the filesystem too. - Leave it and rely on the tiering — rejected. The whole thesis of the design is moving the crown
jewels out of the model-influenced pod, and this puts them oneexecaway.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
docs(spec): link §8.2's collocation item to its tracking issue
pdettori commentedon Sep 17, 2026
Epic: rossoctl/rossoctl#2546 (Stream 1 — multi-tenancy/session isolation)
Status update (2026-09-17)
Still open. #249 (MU1 control plane) merged with the control
plane deployed to the
defaultnamespace, which is what this issue flags. No PR againstthis issue has been opened yet — it remains a hardening follow-up on top of a merged,
opt-in feature (
SH_REQUIRE_AUTH=falseby default), so it's not gating anything else inStream 1.
Assisted-By: Claude (Anthropic AI) [email protected]
pdettori commentedon Oct 15, 2026
Status check, 2026-10-14. I propose closing this as not planned, with one caveat.
Every fact in the table is about
deploy/knative/(service.yaml,control-plane.yaml,harness-egress-policy.yaml), which ADR-0041 deprecates (security and breakage fixes only, removal no earlier than the end of October 2026).On the first-class path the namespace split already exists.
deploy/k8s/base/control-plane.yamlruns the control plane asmoca-control-planein namespacemoca, with its credentials Secret in a separatemoca-credentialsnamespace bound to that ServiceAccount. I have not checked whether the harness ServiceAccount there can stillpods/execinto the control plane; a grep forpods/execunderdeploy/k8sanddeploy/vmfound nothing.The caveat:
docs/migrating-from-knative.mdlinks this issue for people who run the control plane on the deprecated path during the migration window. If this is closed, the guide should state the exposure itself instead of pointing here.If anyone still on the Knative path wants the fix before removal, say so here or in #490.
docs: state the deprecated path's control-plane exposure in the migra…
pdettori commentedon Oct 15, 2026
Closing as not planned. The exposure is specific to the deprecated
deploy/knative/path (ADR-0041) and will not be fixed there. #538 merged: the migration guide now states the exposure and the remedy (move the control plane out of the harness namespace, and the three things that move gets wrong) instead of pointing here.