Skip to content

Commit 48a5ad9

Browse files
authored
feat(helm): render tool approval and the governance mode for muster (#1495)
* feat(helm): add the governance value and render muster's governance configuration governance (trusted, the default, or governed) is the platform's governance mode for tool calls (giantswarm/giantswarm#38902). The meta chart renders it into the muster release as muster.governance (the mode and the servers muster treats as agent-manager and the Platform Manager) from the muster release that reads it (agent-platform.muster.governanceFloor), and holds it back from the connectivity release. An unknown mode or an own muster mode that differs fails the render. The values document muster's mcpserver-editor binding as the connector-admin role. * feat(helm): set explicit tool approval on the connectivity chart's MCPServers mcp-kubernetes ships the Recommended settings (read-only tools Allow, the rest Ask, rule Ask), kagent's session tools Allow all (rule Allow, every tool Allow), each a value (mcp-kubernetes.mcpServer.approval, kagent.controllerRoute.mcp.approval) rendered as spec.approval and validated against the CRD's enums, failing naming the key. * feat(helm): bind muster-approval-binder to agent-manager's ServiceAccount muster takes an agent's tool settings in a Session binding only from a sender allowed to bind toolapprovals in its namespace. The muster chart ships the Role; the connectivity release binds it to agent-manager's ServiceAccount, and only to it. * test(helm): verify governance, connector admins, the binder and tool approval * docs: describe tool approval and the governance mode The chart README names governance, the connector-admin role, the binder and each shipped connector's approval value; README and the toolset presets link the Governing tool calls page. * docs(skills): teach tool approval in the tools, building-blocks and agent-management skills * feat(helm): render muster's approval installation and redirect allowlist From the muster floor that reads governance, the meta chart sets muster.approval.installation from backstage.installationName and adds the portal's /sessions and klaus-gateway's /auth/slack/return to muster.oauth.mcpClient.postLoginRedirectAllowlist. Mark the governance floor as one placeholder value. * test(helm): verify approval installation, redirect allowlist and the floor marker * docs(skills): name approval's prerequisites and the derived redirect allowlist * feat(helm): accept Block as the tool approval rule on the connectivity MCPServers muster accepts Block as spec.approval.rule: tools without their own entry, new ones included, are hidden and refused. The comments say what governed platforms ask on kagent and mcp-kubernetes and that the kubernetes aliases follow the rule. * feat(helm): render muster's governed servers with safe lists and bind the approval binder in muster's namespace muster's new governance shape: governance.governedServers {server, role, safe} for every MCPServer the platform ships (top-level governedServers, keyed namespace/name outside muster's namespace), on trusted too so the role floors hold. governed below the muster floor and the earlier servers shape fail the render. muster.rbac.approvalBinder.subjects names agent-manager's ServiceAccount (the muster chart binds it in muster's namespace); the connectivity chart's own RoleBinding is gone, and an unnamed ServiceAccount the chart does not create fails. The redirect allowlist keeps a non-default port (backstage.publicPort, klaus-gateway's callbackBaseUrl as written) and refuses an invalid callbackBaseUrl; NOTES say when mcpClient.enabled is off. README: Block rule, governed servers, MCP-session retry, upgrade notes. * test(helm): cover governed servers, their coverage, the binder and ported redirect entries verify-tool-approval fails on a shipped MCPServer that is neither governed nor in governanceExempt, a floor on a safe list, a safe entry naming no tool of its server and differing kubernetes maps; it asserts a non-default port in both redirect entries (M1-1), invalid ports and URLs, the binder subjects, meta-to-connectivity overrides and the Block rule. The governance floor placeholder marker is now optional. * docs(skills): describe the Block rule, the governed default, retry over the same MCP session and the upgrade The skills no longer present agent-manager's per-agent tool lists (update_agent_access, set_agent_approval, tools on create_agent) as shipped: they apply once its schema has them. approval.source lists what muster reports (unavailable included). UPGRADE.md names the operator actions for tool approval. * docs: bind tool approvals to the calling client, not the MCP session * fix(helm): refuse a backstage.publicPort above 65535 * test(helm): refuse safe-list entries that look like writes unless annotated A safe entry whose name starts with a write verb (create, delete, exec, set, approve, ...) fails verify-tool-approval unless a '# safe-write: <tool>: <reason>' comment above safe: says why it reads. Also covers publicPort 65535, 65536 and 99999. * docs(skills): describe agent-manager's split update tools and set_agent_approval * feat(helm): turn on agent-manager's tool approval from the floors that bind it agent-manager's muster.toolApproval.enabled follows muster: on from the agent-manager floor whose chart takes the key and muster's agent approval floor (both placeholders until released), off below muster's, an own value standing. The agent-management skill names toolSettings, list_approval_grants and update_agent_access for connectors, and drops a leftover sentence. * feat(helm): call muster's session bindings API on its own port, admitting agent-manager alone From muster's session bindings floor, the meta chart moves muster's session bindings API off the aggregator port (sessionBindings.onMainPort false), lets muster's network policy admit agent-manager's pods alone to its port, points agent-manager's muster.bindingsUrl at it and opens agent-manager's egress to it in both policy flavors. Own values stand. verify-tool-approval covers the derivation. * feat(helm): move the agent chart line to 3.x only with agent-manager's migrate hop and muster's approval floor Agent chart 3.0 removes muster.requireApproval. agent-manager.agentChart.semver reaches agent-manager, its migrate run and the agent-platform-operator, which moves every organization's chart source at once, so a 3.x line now renders only with agent-manager at the release whose migrate rewrites requireApproval to default: Ask, muster at the release that enforces it, agent-manager's tool approval on and the default agent on the same major; a range spanning 2.x and 3.x fails. make verify-agent-chart-line asserts it. * docs: upgrade notes and skill for agent chart 3.0's default: Ask * chore(helm): regenerate schema for tool-approval values * chore(helm): mirror tool-approval defaults in the meta chart, regenerate schema, README and goldens * test(helm): check the unknown governedServers key in the schema and the template * fix(helm): keep the tool approval floors unset until their releases exist and read the agent chart line as migrate does A placeholder floor admitted released musters that do not enforce default: Ask, so a 3.x agent chart line could pass the render against them. The tool approval, agent approval, governance, session bindings and 2.x -> 3.x migrate floors are now unset: a floor without a release admits nothing, what it gates stays off, governed fails and every 3.x line is refused, until the platform release that pins those versions sets them. The line's major is decided as agent-manager's migrate decides it, so ~3.2, 3.1.x and bounded ranges count as 3.x, and a range spanning majors or admitting only pre-releases fails; the check runs with agent-manager off too. The verify scripts exercise the gated paths on a chart copy with test floors. * feat(helm): let the migrate run read organization namespaces On the agent chart 2.x -> 3.x path agent-manager's migrate lists the organization namespaces and reports their releases before the agent-platform-operator moves their sources. Its identity may list namespaces and, with organizations on, read HelmReleases, OCIRepositories and Agents cluster-wide; it writes none of them. * docs: upgrade notes for unset floors, mandatory migrate check and running sessions on agent chart 3.0 * fix(helm): tighten the agent chart line guard, scope the migrate reads to a 3.x line and refuse muster's own governance below the floor The guard refuses a range whose bound admits a pre-release of the next major (Flux would serve it), probes majors 0-99 as migrate does, and names a value that is no semver range. A component range with || is held to its lowest alternative's floor. The migrate identity lists namespaces and reads organization releases, sources and Agents only while the line is 3.x, and lists Agents rather than getting them. With the governance floor unset an own muster.muster.governance fails, and governed says why without an empty floor in the message. * docs: running sessions need approval prerequisites once tool approval is on, and the refused range forms * feat(helm): let agents call the Platform Manager's reads unasked on governed governedServers.giantswarm-platform-manager.safe lists get_info, list_installations, list_actions, get_action and verify_capability. Three of them bring Action records up to date with GitHub as the caller and may post those facts to the review thread or the standup channel; none decides anything. The dry runs share their tools with the commits and keep asking, as do verify_installation, watch_action, deny_action and the floors. * feat(helm): add a migrate preflight that dry-runs the 3.x path before the agent chart line moves The mandatory dry run could not run as the migration's identity on the 2.x line: the namespace list and organization reads rendered only on a 3.x line. agentManager.migration.preflightSemver renders a never-started CronJob <migration>-preflight running migrate --dry-run against that range, and a 3.x preflight range grants the identity the same read-only access the 3.x path needs. Unset, nothing changes. * docs: run the mandatory 3.x dry run through the migrate preflight, and why the floors are not values * feat(helm): make governance a map with roleFloors and drop installation-specific defaults governance mirrors muster's governance configuration: {mode: trusted | governed, roleFloors: {role: [tools]}}; roleFloors renders as muster.governance.roleFloors (added to muster's built-in floors) and a role declared there is a valid governedServers role. A string fails the render with a hint. The default governedServers entry for a vendor's own server and the vendor admin groups as connector-admin and workflow-editor subjects are gone: the editors default to placeholder groups nobody belongs to, and an installation names its own. Tests use generic fixtures, the agent chart line check reads an exact version pin as its major, and private references are removed from templates and tests. * docs: describe governance as a map, the editor placeholders and how an installation adds its own governed servers * fix(helm): default the muster editors to subjects no identity provider can issue, and refuse roleFloors the chart would drop The placeholder editor groups had the org:team shape a Dex GitHub connector emits, so with no groups prefix a real group could match them. The defaults are now ServiceAccount subjects the chart never creates (kube-system/agent-platform-unset-connector-admins and -workflow-editors): nobody holds the Roles until an installation names its own subjects. A non-empty governance.roleFloors below the muster governance floor fails the render instead of being dropped. Tests drop an internal finding id and derive the platform team's names from their fixture. * docs: neutral governed-server example and the fail-closed editor defaults in UPGRADE.md * fix(helm): read a next-major pre-release upper bound as written for Helm releases whose semver skips pre-releases * fix(helm): refuse floors that need the governance wiring while its floor is unset, select muster's own namespace for the session bindings egress, refuse governed mode with muster off - a floor of tool approval, agent approval, the session bindings port or the agent chart 3.x line set while agent-platform.muster.governanceFloor is unset fails the render naming both - networkPolicy.musterSessionBindingsNamespace (set from muster's namespace) selects muster in both policy flavours - governance.mode governed or governance.roleFloors with components.muster off fails the render - verify-agent-chart-line also runs the pre-release bound cases under Helm 3.17 where .bin/ holds it * fix(helm): let migrate rewrite organization releases on the 3.x line under a scope policy, and read every alternative of a range On the 3.x line itself (not a preflight range) with organizations on, the migrate identity may update HelmReleases and write its report ConfigMap cluster-wide, so it rewrites the organization releases agent-manager owns and marks each organization ready for the agent-platform-operator's move of its chart source. The ValidatingAdmissionPolicy agent-platform-organization-migrate-scope holds those writes to organization namespaces and the kagent namespace, to spec.values of an organization's HelmRelease and to the report's name. The agent chart line guard and the connectivity chart's 3.x probe also probe every version a range names, with its next patch and minor, as migrate and the operator do: 3.0.1 || 2.6.0 spans two majors and is refused. UPGRADE.md describes the per-organization cut-over and its hand step. * docs(skills): organizations wait at chart 2.x until migrate marks them ready * fix(helm): grant migrate's organization writes only during the cut-over and hold their metadata The migrate identity's update on HelmReleases and its report ConfigMap in organization namespaces now render only while agentManager.migration.cutover is set on a 3.x line, which UPGRADE.md says to unset once no organization is held. agent-platform-organization-migrate-scope also refuses a change of an organization release's labels, annotations, ownerReferences or finalizers. verify-agent-chart-line pins the connectivity chart's own 3.x probe (an exact pin, a || alternative), and UPGRADE.md states the window up to the operator's rollout, the releases created after a run and the re-run. * fix(connectivity): accept only a boolean true as migration cutover agentManager.migration.cutover was read by truthiness, so the string "false" granted the migration its organization writes. A string now fails the render; verify-agent-chart-line asserts it. * fix(helm): let agent-manager read the default agent's release for its tool approval settings The default agent's release lives in the chart's Flux namespace, not in the kagent namespace agent-manager manages, so a session of the default agent could not read its settings. From agent-manager's tool approval floor the chart derives agent-manager.muster.toolApproval.platformReleases [<Flux namespace>/default-agent], which grants get on that release by name; verify-tool-approval asserts it. * fix(helm): pass the default agent's approval values to agent-manager on a remote target With gitops.target.kubeConfig agent-manager runs on the target cluster and cannot read the default agent's HelmRelease, which stays on the management cluster, so every default-agent session was refused. The chart now renders agent-manager.muster.toolApproval.platformAgents there instead of platformReleases: the Agent kagent/default-agent, the release its Flux labels name (<Flux namespace>/<target>-default-agent) and the release's tools, toolset, default and muster.requireApproval, taken from the values the release is rendered with (agent-platform.defaultAgent.approval). verify-tool-approval asserts it. Without a target nothing changes. * fix(approval): tell agent-manager which Agent the default agent's release renders muster.toolApproval.platformReleases now maps the release to the Agent it renders, so agent-manager binds the default agent through that release only and refuses an Agent whose Flux labels name another or none. * feat(approval): sign the portal in with its own OAuth client and trust only it for muster's sign-in handoff backstage.oidcClientId gives the portal a client of its own at the platform's issuer (secret: portal-dex-client-secret of global.identity.existingSecret, mounted optional as AGENT_PLATFORM_PORTAL_OIDC_CLIENT_SECRET). The portal then also requests the platform client's audience, so muster, the managers and the API server accept its tokens as before; their azp names the portal's client. With such a dedicated client and backstage.signInHandoff on (the default), the meta chart lists that client, and only that one, in muster's approval.handoffClients from agent-platform.muster.handoffFloor (unset until the muster release exists): a click on Open in portal chat then opens muster's approval page or connector sign-in signed in. The shared client is never listed; an own handoffClients naming it fails the render, since agents' delegations and CLIs hold its tokens. The trade-off (a holder of a person's portal token can open that person's approval page without a browser sign-in; the decision still takes the click on muster's page) is documented in docs/authentication.md. * feat(approval): trust the portal's own client for muster's inline approval decisions muster renamed approval.handoffClients to approval.trustedClients: the clients listed there decide a person's approvals inline (POST /approvals/{id}/decision with the person's token) and get sign-in handoff tickets. The chart lists the portal's dedicated client as trustedClients from the new floor agent-platform.muster.trustedClientsFloor (unset until that muster is released), and as handoffClients from handoffFloor below it. An own list under either name stands; naming the shared client fails the render. Docs, the tools skill and verify-tool-approval follow. * fix(approval): bind the portal's workload for muster's inline decisions and trust only its dedicated client From agent-platform.muster.trustedClientsFloor, while muster trusts the portal's client, the muster release binds muster-approval-decider (verb decide on toolapprovals) to the portal's ServiceAccount and nothing else (muster.rbac.approvalDecider.subjects, an own list stands), and the backstage release projects that ServiceAccount's token for audience muster at /var/run/secrets/muster.giantswarm.io/serviceaccount/token, beside its own extra volumes. muster takes a person's portal token on its decision API and handoff endpoint only with that workload token. muster.approval.trustedClients and handoffClients may name only the portal's dedicated client: any other id fails the render (the shared client as before, and now dex-k8s-authenticator, the kagent UI's or klaus-gateway's client, a CLI's), in an own list as well. * fix(approval): list the portal as muster's trusted client only from the trusted-clients floor Drop agent-platform.muster.handoffFloor and its handoffClients branch: a muster below the trusted-clients floor issues handoff tickets without the workload review and the sign-in confirmation, and must not be trusted with them. An own list under either name still stands. * docs: condense tool approval docs * docs: move tool approval docs into the repository * fix(agent-platform): refuse agent chart ranges that admit a major past 99 Document the range grammar agent-platform.agentChart.majors reads and refuse a line that admits an agent chart major of 100 or more as unsupported, as agent-manager's migrate and the agent-platform-operator do. * fix(muster): fail the render for explicit trusted client lists below the floor * fix(muster): bind only ServiceAccounts as approval deciders An own muster.rbac.approvalDecider.subjects list, which an installation sets for a portal deployed as its own release (components.backstage off), now fails the render for any subject other than a ServiceAccount: a bound group or user could approve for any person whose token it holds. The test covers such a portal: an own decider list and trustedClients list stand, and the platform projects no token. * fix(backstage): refuse a second projection of the portal's workload token Where the platform projects the portal's workload token for muster, the portal chart's own projection (backstage.backstage.musterWorkloadToken) or an own volume or mount of that name fails the render instead of a pod declaring it twice. The tests add mixed decider lists, an entry without a kind, and the same with the portal on. * feat: set the tool approval release floors and move the component ranges to the epic releases
1 parent 4bf5906 commit 48a5ad9

40 files changed

Lines changed: 4091 additions & 195 deletions

‎Makefile.custom.mk‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,17 @@ verify-mcp-kubernetes-registration: ## Assert the bundled mcp-kubernetes registr
14781478
@python3 tests/verify-mcp-kubernetes-registration.py $(CHART_DIR) $(CONNECTIVITY_DIR)
14791479
@echo "mcp-kubernetes registration shapes verified."
14801480

1481+
.PHONY: verify-agent-chart-line
1482+
verify-agent-chart-line: ## Assert that agent-manager.agentChart.semver moves to agent chart 3.x only together with agent-manager at agent-platform.agentManager.agentChartV3Floor (its migrate rewrites muster.requireApproval to default: Ask), muster at agent-platform.muster.agentApprovalFloor (enforces it), agent-manager's tool approval on and the default agent's range on the same major; a range is read as agent-manager's migrate reads it (spanning majors or only pre-releases fails, ~3.2 and bounded forms count as 3.x); the placeholder floors are unset (every 3.x line refused) or above the last release without the feature, and the gated paths run on a chart copy with test floors; the 3.x line reaches agent-manager, the migrate run's connectivity release and the default agent's source; the migrate run may list namespaces and, with organizations on, read releases, sources and Agents cluster-wide, and only on the 3.x line itself (not a preflight) update HelmReleases and write its report ConfigMap, held by agent-platform-organization-migrate-scope; every alternative of a || range and every version a range names count (3.0.1 || 2.6.0 spans two majors). Stdlib only. HELM selects the binary.
1483+
@echo "====> $@ ($(CHART_DIR), $(CONNECTIVITY_DIR))"
1484+
@HELM="$(HELM)" HELM_LEGACY="$(if $(filter-out $(HELM_PINNED_VERSION)+%,$(HELM_VERSION)),$(wildcard $(HELM_PINNED)))" python3 tests/verify-agent-chart-line.py $(CHART_DIR) $(CONNECTIVITY_DIR)
1485+
1486+
.PHONY: verify-tool-approval
1487+
verify-tool-approval: ## Assert the platform side of Governing tool calls: the top-level governance and governedServers values render muster's governance configuration into the muster release (muster.governance: mode, governedServers {server, role, safe} per shipped MCPServer, keyed namespace/name outside muster's namespace, an own entry standing) from the muster floor agent-platform.muster.governanceFloor, none below it, governed below it, the earlier servers shape, unknown keys and conflicting or unknown modes failing; coverage: every shipped MCPServer source (meta releases carrying muster.mcpServer, the connectivity chart's MCPServers, agent-platform-mcps' families, and the component charts beside this checkout, COMPONENT_CHECKOUTS) is governed or in governanceExempt, no floor is safe, every safe entry names a tool of its server, the two kubernetes maps agree; the redirect allowlist (portal /sessions with backstage.publicPort, klaus-gateway's return with its port, invalid ports and URLs failing); the connector-admin role binds the Giant Swarm admin groups plus tenants.platformTeam; muster-approval-binder's subjects are agent-manager's ServiceAccount only (muster.rbac.approvalBinder.subjects), none from the connectivity chart; agent-manager's muster.toolApproval.enabled on from its floor and muster's agent approval floor, off below muster's, absent below its own, an own value standing; the connectivity MCPServers carry explicit approval settings (a Block rule renders, overrides reach spec.approval also from the meta chart, null renders none, invalid values fail naming the key). Stdlib only. HELM selects the binary.
1488+
@echo "====> $@ ($(CHART_DIR), $(CONNECTIVITY_DIR))"
1489+
@HELM="$(HELM)" python3 tests/verify-tool-approval.py $(CHART_DIR) $(CONNECTIVITY_DIR)
1490+
@echo "tool approval verified."
1491+
14811492
.PHONY: verify-self
14821493
verify-self: ## Assert self-management's shapes: engine off renders nothing of it; engine on renders the self OCIRepository + suspended HelmRelease, the -6/-5/0 hooks, the identity and the admission policy (CLI day-0 only); engine on with self off (lab, hand-back) renders the -6/-5 hooks at pre-upgrade too and nothing else; the guards and knobs. HELM selects the binary.
14831494
@echo "====> $@ ($(CHART_DIR))"

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Then point any MCP client at `https://muster.<your-domain>/mcp`. Its traffic cro
121121
| [Operator reference](docs/reference.md) | Every component and value: GitOps engine, self-management, serving and runtime slices, network policies, observability, CRD lifecycle |
122122
| [Authentication](docs/authentication.md) | The request path, OAuth discovery, token forwarding and exchange, edge JWT validation |
123123
| [Toolset presets](docs/toolset-presets.md) | Choosing which tools an agent gets |
124+
| [Tool approval](docs/tool-approval.md) | Allow, Ask or Block per connector and tool, the governance mode and who sets what ([chart values](helm/agent-platform/README.md#tool-approval-and-the-governance-mode)) |
124125
| [Serving presets](docs/serving-presets.md) | Adding and benchmarking a model recipe |
125126
| [ChatGPT login](docs/chatgpt-login.md) | Running codex on each person's own ChatGPT subscription |
126127
| [Agent Substrate security](docs/substrate-security.md) | What the agent runtime changes on the cluster, and what protects it |

‎UPGRADE.md‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,61 @@ Every component ships its own CRDs and upgrades them with its release; there is
3030

3131
A CRD version change that needs more than an apply (a stored version dropped, as with kagent's `v1alpha2`) has its own entry below, with the hook that does it.
3232

33+
## \<current\> → \<next\> (agent chart 3.0: `muster.requireApproval` becomes `default: Ask`)
34+
35+
Agent chart 3.0 removes `muster.requireApproval` and the default of `modelConfig.name`. `default: Ask` replaces `requireApproval: true`: muster asks a person before every tool call the agent makes through it, from every client. `agent-manager.agentChart.semver` moves the agents of the whole installation: agent-manager composes new agents on it, its migrate run (the connectivity release's start hook) rewrites the existing releases, and the agent-platform-operator moves each organization's chart source once migrate marks that organization ready.
36+
37+
The render allows the 3.x line only together with `make verify-agent-chart-line`'s conditions: agent-manager at `agent-platform.agentManager.agentChartV3Floor`, muster at `agent-platform.muster.agentApprovalFloor`, agent-manager's tool approval on, and the default agent's range on the same major. **Both floors are unset in this chart** until the releases carrying tool approval exist, so every 3.x range is refused for now; the platform release that pins those versions sets them. The other tool approval floors (`agentManager.toolApprovalFloor`, `muster.governanceFloor`, `muster.sessionBindingsPortFloor`) behave the same: unset, what they gate stays off and `governance: governed` fails. A range admitting two majors or only pre-releases fails.
38+
39+
What migrate does:
40+
41+
| Case | Result |
42+
|------|--------|
43+
| Release owned by agent-manager | Rewritten: `requireApproval: true` becomes `default: Ask`, the key is dropped, an unset `modelConfig.name` becomes `default-model-config` |
44+
| Release with `spec.valuesFrom` | `failed`: move the settings into `spec.values` |
45+
| Pinned, git-owned or platform release | `pending` with a diff to apply |
46+
| Organization namespace | Same rules; GitOps-owned releases get a diff. Annotates the namespace `agent-platform.giantswarm.io/agent-chart-ready-major: "3"` once every release is on 3.x values |
47+
48+
Any `failed` or `pending` release keeps the namespace in the expand phase. The operator moves an organization's source only on that annotation; until then the organization is `Ready=False` (`ChartSourceHeld`) and its releases stay on 2.x, still asking. A release created on the 2.x source after the run is not covered: the operator holds the source and names it until migrate runs again.
49+
50+
### Operator action
51+
52+
- **Before the upgrade (mandatory), with the line still on 2.x:** set `agentManager.migration.preflightSemver: ">=3.0.0 <4.0.0"`, run `kubectl -n <kagent namespace> create job --from=cronjob/<release>-agent-manager-migrate-preflight preflight-1` and read `kubectl -n <kagent namespace> logs job/preflight-1` (a dry run writes nothing). Fix every release it lists that the run will not write (`failed`, and `diff` ones you own in git), organization namespaces included, then unset `preflightSemver`. Also list releases with `valuesFrom` or without the 3.x settings: `kubectl get helmreleases -A -o json | jq -r '.items[] | select(.spec.values.muster.requireApproval != null or .spec.values.modelConfig.name == null or (.spec.valuesFrom // [] | length > 0)) | "\(.metadata.namespace)/\(.metadata.name)"'`.
53+
- **The repair is always `muster.requireApproval: true` to `default: Ask`**, never just deleting the key (that turns asks off); drop `false` and `null`; set `modelConfig.name` where unset. In git, apply it together with moving that release's chart source to 3.x.
54+
- Once the floors are set, move `agent-manager.agentChart.semver` and `components.default-agent.versionRange` to `>=3.0.0 <4.0.0` together with `components.agent-manager.versionRange` and `components.muster.versionRange` at or above the floors. With organizations on, set `agentManager.migration.cutover: true` in the same change (a boolean; without it the organizations' sources stay held).
55+
- Tool approval's prerequisites must hold (muster's OAuth server with Dex sign-in, Valkey; see the next entry): without them muster refuses every call that asks, so a migrated agent cannot call its tools. It never runs them unasked.
56+
- Running Sessions: with agent-manager at `agentManager.toolApprovalFloor`, it binds `default: Ask` for a Session of an agent still on `requireApproval: true` already on 2.x. That agent needs the prerequisites from then on and is asked twice (kagent and muster) until migrated. Sessions from an older agent-manager carry no settings and muster applies the agent's `X-Muster-Tool-Approval: default=Ask`.
57+
- Read the report: `kubectl -n <kagent namespace> get configmap agent-manager-migrate-report -o jsonpath='{.data.report\.yaml}'`. A release with `requireApproval: true` beside tool approval settings is `failed`: set its settings by hand. The run needs list on namespaces and, in organization namespaces, read access and update on HelmReleases and its report ConfigMap (granted only on the 3.x line with `cutover`, scoped by the ValidatingAdmissionPolicy `agent-platform-organization-migrate-scope`); without them it fails before writing.
58+
- **Per organization:** `kubectl get agentplatformorganizations -A -o json | jq -r '.items[] | select(any(.status.conditions[]?; .reason == "ChartSourceHeld")) | "\(.metadata.namespace)/\(.metadata.name)"'` lists those still on 2.x; the report in the organization's namespace names the releases that hold it. Apply each diff in the organization's repository, then run migrate again: `kubectl -n <kagent namespace> create job --from=cronjob/<release>-agent-manager-migrate migrate-2` (also after a failed write, and when the condition names releases created after the run). Once none is held, unset `cutover`.
59+
60+
## \<current\> → \<next\> (tool approval and the governance mode)
61+
62+
muster decides Allow, Ask or Block for every tool call; the chart renders its governance configuration, the approval page's installation name, the redirect allowlist and the approval binder ([chart README](helm/agent-platform/README.md#tool-approval-and-the-governance-mode)). None of it reaches a muster below `agent-platform.muster.governanceFloor`.
63+
64+
### Operator action
65+
66+
- Move `components.muster.versionRange` to the muster release carrying tool approval. `governance.mode: governed` below it fails the render.
67+
- The floors are muster `5.67.0-rc.61` and agent-manager `4.1.0-rc.1`. A pinned BOM moves muster, agent-manager and the MCPServer components to the pins in `examples/customer-bom.yaml`.
68+
- After muster's CRD upgrade, force a reconcile of the releases that render MCPServers (connectivity, agent-platform-mcps, the managers) if any was applied while the old CRD was served (its `spec.approval` was pruned): `flux reconcile helmrelease <name> -n <ns> --force`. Until then muster refuses every server tool. Check with `kubectl get mcpservers -A -o custom-columns=NAME:.metadata.name,RULE:.spec.approval.rule`.
69+
- **Editor defaults changed.** `muster.rbac.mcpServerEditor.subjects` (connector admins) and `muster.rbac.workflowEditor.subjects` default to a ServiceAccount nobody can authenticate as (`kube-system/agent-platform-unset-connector-admins`, `...-workflow-editors`); before, they named two fixed admin groups. Set both to your admin groups (with the OIDC groups prefix); `tenants.platformTeam` is still appended. Until then only cluster admins register servers, author workflows or change tool approval. Keep the lists non-empty: muster's chart fails the upgrade with an empty list while its old `system:authenticated` binding exists (`muster.rbac.mcpServerEditor.allowRemovingBinding: true` drops it). `tenants.platform.editors` keeps its earlier default groups: replace them too.
70+
- **`governance` is a map.** Write `governance.mode: governed` where you wrote `governance: governed`; a string fails the render.
71+
- **No server outside the platform's components is governed by default.** Own servers go in `governedServers` with `governance.roleFloors` (set below the muster governance floor, the render fails):
72+
73+
```yaml
74+
governance:
75+
roleFloors:
76+
exampleManager: [approve_change, merge_change]
77+
governedServers:
78+
example-manager:
79+
role: exampleManager
80+
safe: [get_info, list_changes]
81+
```
82+
- Replace an own `muster.muster.governance.servers.<role>` with `governedServers` entries (the earlier shape fails the render).
83+
- An edge not on 443: set `backstage.publicPort` and remove a hand-written portal entry from `muster.muster.oauth.mcpClient.postLoginRedirectAllowlist`. The allowlist reaches muster only with `muster.muster.oauth.mcpClient.enabled`.
84+
- An agent-manager ServiceAccount the chart does not create (`agent-manager.serviceAccount.create: false`) needs `agent-manager.serviceAccount.name`.
85+
- The connectivity release no longer renders `agent-platform:muster-approval-binder`; the muster release binds `muster-approval-binder` in muster's namespace instead.
86+
- Clients (portal, klaus-gateway, kagent) retry an approved call as the same client of the same person; another client asks anew.
87+
3388
## \<current\> → \<next\> (vm-manager 0.29: guests run only signed code, pods only from signed layers)
3489

3590
`components.vm-manager.versionRange` selects `>=0.29.0 <0.30.0` (the component is off by default). The chart's values are unchanged since 0.27. From 0.28.0 the guest image runs only code from its own signed dm-verity root and sysexts under IPE (giantswarm/vm-manager#266); vm-manager writes the image certificate the guest image artifact carries into each VM's UEFI db, so nothing is configured for it. From 0.29.0 a Kubernetes node runs pods only from container layers whose dm-verity root hash is signed with a trusted key (giantswarm/vm-manager#286). `create_vm` takes two optional arguments: `layer_certificates`, the installation's PEM certificates that layers may be signed with, and `cni_version`, the CNI sysext (default: the newest Cilium the image offers). Release guest images enroll no Giant Swarm layer certificate yet (giantswarm/architect-orb#1084), so a release node trusts only the certificates passed in `layer_certificates`.

‎docs/authentication.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,23 @@ muster aggregates many MCP servers behind `/mcp`. Each server entry in `agent-pl
4444

4545
muster signs no tokens of its own: every downstream server validates against Dex. A kagent agent acts as the person who started its Session: agent-manager binds the Session's Actor to that person at muster, and the egress gateway puts the Actor's JWT on every call to muster, which serves it as the bound person. The runtime never holds or forwards the person's token: the Harness sets no `KAGENT_PROPAGATE_TOKEN`, so no MCP server receives it, and muster refuses a Session nobody bound. model-manager, agent-manager, cluster-manager and mcp-kubernetes receive the person's token with the audience `dex-k8s-authenticator` and act on the cluster with that person's RBAC (install.md, [The identity provider](install.md#the-identity-provider)).
4646

47+
### The portal's own client and sign-in handoff
48+
49+
By default the portal signs in with the platform's shared client (`global.identity.clientId`). `backstage.oidcClientId` gives it a client of its own at the same issuer:
50+
51+
- The identity provider registers it with the portal's redirect URI only (`https://<portal>/api/auth/oidc-agent-platform/handler/frame`); its secret goes into `global.identity.existingSecret` under `portal-dex-client-secret`.
52+
- The portal also requests the platform client's audience (`audience:server:client_id:<global.identity.clientId>`, added to `backstage.extraScopes`), so every component that trusts the platform client accepts its tokens unchanged; `azp` names the portal's client. On Dex, the platform client and `dex-k8s-authenticator` list the portal's client under `trustedPeers`.
53+
- muster keys a forwarded token's session by its client too: a person's connector sign-ins through the shared client are not the portal's, except subject-scoped ones (`spec.auth.grantScope: subject`).
54+
55+
With a dedicated client and `backstage.signInHandoff` on (default), the chart lists that client, and only it, in muster's `approval.trustedClients` (from `agent-platform.muster.trustedClientsFloor`; below it none). The portal then shows a tool approval inline and posts the decision to muster (`POST /approvals/{id}/decision`) with the person's token and the digest of what was shown, and *Open* on a connector sign-in prompt gets a one-time ticket from `POST /handoff-tickets`. A person's portal token is not held by the portal backend alone (the browser, `forwardToken` servers and runtimes hold it too), so muster takes it on these two endpoints only together with the backend's own workload identity: its projected ServiceAccount token (audience `muster`, in `X-Muster-Approval-Client`, checked by `TokenReview` and a `LocalSubjectAccessReview` for `decide` on `toolapprovals.muster.giantswarm.io`). The chart binds muster's Role `muster-approval-decider` to the portal's ServiceAccount (`muster.rbac.approvalDecider.subjects`; an own list stands) and projects the token at `/var/run/secrets/muster.giantswarm.io/serviceaccount/token`. Either token alone decides nothing and mints no ticket. A portal deployed as its own release (`components.backstage` off) gets neither: name its ServiceAccount in `muster.rbac.approvalDecider.subjects` (ServiceAccounts only, any other kind fails the render) and its client in `muster.muster.approval.trustedClients`, and project the token into its pod yourself.
56+
57+
- Trade-off: the portal backend can approve a person's pending requests without muster's browser sign-in, on the person's click only.
58+
- muster refuses tokens naming an acting party, an agent's credential, another client, another workload or another person. A ticketed connector sign-in still asks the browser on muster's page first.
59+
- Only the portal's dedicated client may be listed: the render fails when `muster.muster.approval.trustedClients` or `handoffClients` names any other id (the shared client, `dex-k8s-authenticator`, the kagent UI's, klaus-gateway's or a CLI's).
60+
- `backstage.signInHandoff: false` keeps every decision and sign-in on muster's own pages.
61+
62+
`agentlab portal dev` has no projected token: agentlab mints a lab-only one for the lab portal's ServiceAccount (audience `muster`) on every start and points `muster.workloadTokenFile` at it. Never copy an installation's portal token to a laptop.
63+
4764
## 4. Edge JWT validation and JWKS
4865

4966
agentgateway verifies the JWT itself (`Strict`, against `global.identity.issuerUrl`) on three routes: the kagent controller route ([5](#5-the-kagent-controller-route)), the agent-manager route (`agentManager.route` with its `jwtAuthentication.enabled`, both off by default) and the models Gateway ([6](#6-the-models-gateway)). Each takes its key set from its own `jwtAuthentication.jwks` (`host`, `port`, `path`, `tls`). The agentgateway controller fetches it and pushes the keys to the data plane. A failed fetch refuses every caller with `401 token uses the unknown key`.

0 commit comments

Comments
 (0)