Skip to content

docs: state the deprecated path's control-plane exposure in the migration guide - #538

Merged
pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:docs/migration-guide-control-plane-exposure
Oct 15, 2026
Merged

pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:docs/migration-guide-control-plane-exposure

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

  • Replace the bullet in "During the window" that pointed at Move the MU1 control plane into its own namespace — the harness SA can exec into it today #248 with the exposure itself: on deploy/knative/ the control plane shares namespace default with the harness, whose ServiceAccount holds pods/exec: create with no resourceNames. Code execution in a harness pod can read the session-signing key, the credential KEK and the exchange token.
  • Say that it will not be fixed on the deprecated path, and what to do: move the control plane to its own namespace and drop pods/exec from the harness Role, or move to deploy/k8s, which already keeps the control plane in moca and its credentials in moca-credentials.
  • Add a status-log row.

This lets #248 be closed as not planned: every fact in it is about deploy/knative/ (ADR-0041).

Not verified

I did not inspect the deploy/k8s RBAC beyond a grep for pods/exec under deploy/k8s and deploy/vm, which found nothing. The namespace split is read from deploy/k8s/base/control-plane.yaml.

Follow-up

ADR-0041 and the RA1 spec still say "follow-up owed: #248". Both are historical records, so I left them. Say if you want them amended.

Refs #248.

🤖 Generated with Claude Code

…tion guide

The guide pointed at rossoctl#248 for the control-plane namespace collocation
on deploy/knative. That path is deprecated (ADR-0041) and the fix will
not land there, so say what the exposure is and what to do about it
instead of linking an issue we intend to close.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori pdettori added the ready-for-ai-review Request automated AI code review from clawgenti label Oct 15, 2026

@ingpaolodettori-dev ingpaolodettori-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a clearer statement than the #248 pointer. I checked the facts against main: the harness Role grants pods/exec: create in default with no resourceNames, the control plane is collocated with its three secrets as env vars, and deploy/k8s splits the control plane (moca) from credentials (moca-credentials) with no pods/exec grant. All accurate.

One blocker: the remediation tells operators to remove pods/exec from the harness Role. That breaks the Knative harness, which reaches sandbox pods through that grant (see inline). Two nits on precision.

Author: pdettori (MEMBER, maintainer) · Areas: Docs · .claude/.vscode: none · Commits: 1, signed-off · CI: passing

Comment thread docs/migrating-from-knative.md Outdated
can therefore `kubectl exec` into the control plane and read its Ed25519 session-signing key, the
credential KEK and the shared exchange token, which defeats the "the harness cannot mint a token"
property. It will not be fixed on this path. If you run the control plane there during the window,
move it to its own namespace and remove `pods/exec` from the harness Role yourself, or move to

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must-fix: removing pods/exec from the harness Role breaks the deployment. The Knative harness runs agent code in the sandbox pool through pods/exec (KAGENTI_SANDBOX_POOL_SELECTOR in service.yaml, Role serverless-harness-sandbox), and the pool lives in default. As #248 says, the grant can't be narrowed, so the control plane is what has to move. Since the Role is namespace-scoped, moving the control plane out of default is enough on its own.

Please drop the pods/exec advice. Also name the parts a bare namespace move gets wrong, or link #248's list: the /resources pod Role stays in default and needs a cross-namespace RoleBinding, sh-control-plane-egress-from-harness needs a namespaceSelector (otherwise every exchange returns 503), and SH_CONTROL_PLANE_URL in service.yaml changes.

Comment thread docs/migrating-from-knative.md Outdated
in the same namespace (`default`) as the harness, and the harness ServiceAccount holds
`pods/exec: create` there with no `resourceNames`. A process with code execution in a harness pod
can therefore `kubectl exec` into the control plane and read its Ed25519 session-signing key, the
credential KEK and the shared exchange token, which defeats the "the harness cannot mint a token"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the harness already holds the exchange token by design (service.yaml mounts SH_EXCHANGE_TOKEN into the harness from the same Secret), so exec doesn't newly expose it. What exec adds is the signing key and the KEK. Maybe: "…read its Ed25519 session-signing key and the credential KEK (the exchange token is already in the harness), which defeats…"

Comment thread docs/migrating-from-knative.md Outdated
- If you run the control plane on the deprecated K8s path during the window, #248's
namespace-collocation consideration still applies to it, unchanged by the deprecation.
- **Control-plane exposure on the deprecated K8s path.** `deploy/knative/` runs the control plane
in the same namespace (`default`) as the harness, and the harness ServiceAccount holds

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: setup-k8s.sh --namespace rewrites namespace: default, so "the same namespace (default unless you passed --namespace)" is more exact. The collocation holds either way.

Drop the advice to remove pods/exec from the harness Role (the harness
needs it to reach sandbox pods), say the control plane is what moves,
list the three things a bare namespace move gets wrong, and correct
the exposure list and the namespace wording.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
@pdettori

Copy link
Copy Markdown
Member Author

Thanks, all three addressed in 9ce51d8.

  • must-fix: you are right, and the original advice would have broken the Knative harness. I dropped the "remove pods/exec" remedy. The bullet now says the grant cannot be narrowed because the harness needs it to reach its sandbox pods, so the control plane is what moves, and that the Role is namespace-scoped so a move alone closes the exec path. It also names the three things a bare move gets wrong: the sh-control-plane-pods Role and its cross-namespace RoleBinding, the namespaceSelector on sh-control-plane-egress-from-harness (otherwise every exchange returns 503), and SH_CONTROL_PLANE_URL.
  • nit, exchange token: the exposure now lists the signing key and the KEK, with a note that the exchange token is already mounted in the harness (service.yaml:81).
  • nit, --namespace: reworded to "default, unless you passed --namespace to setup-k8s.sh".

I confirmed the names above against deploy/knative/ but did not try a namespace move on a cluster.

@ingpaolodettori-dev ingpaolodettori-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. 9ce51d8 addresses all three comments from the 240f9da round. I checked the new text against deploy/knative/ at this head:

  • must-fix (drop the pods/exec removal): fixed. The bullet now says the grant can't be narrowed and that the control plane is what moves. "The Role is namespace-scoped, so that alone closes the exec path" is right: serverless-harness-sandbox is a Role in the harness namespace (service.yaml:111-127), not a ClusterRole. The three names hold up: sh-control-plane-pods (control-plane.yaml:135), sh-control-plane-egress-from-harness (:316, a podSelector-only to peer), and SH_CONTROL_PLANE_URL (service.yaml:75).
  • nit (exchange token): fixed. service.yaml:81 does mount SH_EXCHANGE_TOKEN into the harness.
  • nit (--namespace): fixed. setup-k8s.sh:149 seds namespace: default.

One suggestion inline: the "three things" list is incomplete. That's partly on us, because our previous comment listed only those three. #248's checklist has more, and one of the missing items breaks every exchange.

Approving, since the suggestion is non-blocking.

pods, so it cannot be narrowed; the control plane is what has to move. If you run it there during
the window, move it to its own namespace (the Role is namespace-scoped, so that alone closes the
exec path), or move to `deploy/k8s`, which keeps the control plane in `moca` and its credentials
in a separate `moca-credentials` namespace. A bare namespace move gets three things wrong:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: "three things" undercounts, and that's partly our fault, since our last comment named only these three. A bare move following this list still misses two things from #248's checklist:

  1. The credential-store RoleBinding subject. sh-control-plane-credentials in sh-credentials binds subject sh-control-plane in namespace default (control-plane.yaml:117-128). Once the SA moves, the control plane loses get/create on the per-user credential Secrets, so exchanges fail even with the NetworkPolicy fixed. Move the MU1 control plane into its own namespace — the harness SA can exec into it today #248 step 2: "both RoleBindings' subject namespaces follow the SA."
  2. The Secrets. secretKeyRef is same-namespace, so sh-session-token-key, sh-credential-kek and sh-exchange-token (control-plane.yaml:235-246) have to be created in the new namespace. sh-exchange-token also has to stay in the harness namespace, because the harness mounts it from there (service.yaml:81).

Suggest rewording to "A bare namespace move also has to update:", listing these, and linking #248 for the full checklist (it also covers setup-k8s.sh and the manifest test). That keeps the guide from implying the list is exhaustive.

@pdettori
pdettori merged commit 70321d1 into rossoctl:main Oct 15, 2026
14 checks passed
@pdettori
pdettori deleted the docs/migration-guide-control-plane-exposure branch October 15, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ai-review Request automated AI code review from clawgenti

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants