diff --git a/AGENTS.md b/AGENTS.md index 736257a9..d841e064 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -339,6 +339,7 @@ agentlab roadmap-test # the fake pro (a fixture board) registered with muster agentlab organizations-test # platform.organizations: two Organizations, alice and bob each an editor of one by group: each creates and runs an agent in their own; every surface (Kubernetes, kagent API, Slack; the Dev Portal proven by the browser suite's organizations.spec.ts) gives each the same agents; the negative cross-organization tests per surface and boundary (Kubernetes RBAC, kagent API and A2A, muster, agent-manager's tools by organization name (an organization's namespace as namespace, the other organization, organization with namespace and no cluster: each refused), the other organization's model, in-cluster 443 through the egress gateway); the profile tests (object-count quota, a PolicyException that does not lift the sandbox policies, the credential provider's grants, each component's Secret reads (ate-controller, both credential providers, the connectivity hooks); the cleanup of an Orphaned organization: its delete refused while MissingFromGit, erased once its delete pull request merged; an earlier failed run's fixtures removed first) agentlab organizations-test --part credentials # an organization admin's model without a key through muster (no ModelConfig, no Secret value, a pending operation); input_required, -32042 (url mode, an elicitationId) and a plain result with the link (structuredContent valid against its outputSchema) per MCP client generation; a declined and a dismissed elicitation ending the call with nothing written; completion notifications only to the initiating client; a viewer (agent-platform:user only, a third person) refused by RBAC and their save refused; a Secret another consumer references refused 409; the connector's and the egress policy's confirmations listing their one consumer and the origins; the other admin's save refused 403 after their admin binding is removed (access reviews before and after, nothing written) and the same operation saved at the same ETag once it is back (a SKIP below agent-manager 2.24.0-rc.2); the save through agent-manager's credential API (strong ETag, a missing If-Match 428 and a stale one refused, another person and an anonymous read refused, a cancel; the other admin's own operation a SKIP below agent-manager 2.24.0-rc.2, agent-manager#360) with a second POST and each generation's retry the same receipt as a pull request opened as the person with the Secret SOPS-encrypted; Flux applying and decrypting it (the Secret's SHA-256, the ModelConfig); no value in agent-manager's or muster's logs; a tenant MCP server's sign-in attributed to its key; delete_organization's erasure; each missing prerequisite a SKIP naming its fix agentlab organizations-test --part admins # spec.admins: create_organization writes them and no RoleBinding, the operator binds them to agent-platform:admin and follows update_organization (a replace, an empty list); a binding to agent-platform:admin by anyone else refused at admission; add_organization_member refuses the admin role; create_organization refused to a person without create on Organizations; a switch-off of spec.capabilities.agentPlatform.enabled refused at admission (agent-platform-organization-switch-off, decision D10) +agentlab organizations-test --part public # each organization's public namespace (agent-platform-operator 0.7.0-rc.1 and agent-manager 4.2.0-rc.3 or later, refused by name below them): both namespaces labelled and the operator's agent-platform:everyone binding; an editor of agentlab-b refused a write into its public namespace; alice, no member of agentlab-b, lists its public agent (list_agents with public: true), starts a Session on it (organization and public: true), sees its public MCP server through muster, and her agent whose toolset names that server calls it as her; an empty public namespace named nowhere; in mode commit, in a proof repository, a public write refused while agentlab-b's content path has no kustomization file, then that kustomization.yaml added (a merged pull request) and the write under /public only; with klaus-gateway 4.21.0-rc.3 or later her Slack start of the public agent; the move (move_agent, agent-manager 4.2.0-rc.9 or later, else a SKIP): the admin moves a private agent of agentlab-b to its public namespace (the dry run names the admin's own Session and counts or states others'), alice starts a Session on it, the admin moves it back and alice's start is refused with public: true and without, bob's move refused by the API server with nothing deleted; the MCP server fixture runs in a container (--mcp-fixture-binary: a static Linux agentlab on macOS) agentlab coding-test # platform.coding: the coding Harness from the values, agent-manager's guards, a coding agent's sandbox floor (uid split, forwarder paths, a write tool refused, no credentials, DNS canary, egress), a workspace Session's MCP call audited by muster as the person, nothing in the sandbox running between turns, the instruction fixture, suspend/resume, the turn's usage, a share refused, no muster call of the actor accepted after delete_session agentlab coding-test --step egress # one stage of coding-test and the stages it builds on (here create and the sandbox turn); the rest listed as skipped by the step agentlab coding-test --part devctl # platform.devctl: a coding agent opens a pull request as the person, waits for its CI (one pr_wait), merges it (pr_merge) and waits for its release (release_wait) through devctl's MCP server; one pr_wait with a progressToken beside it diff --git a/HACKS.md b/HACKS.md index 743c18f2..3305b4d8 100644 --- a/HACKS.md +++ b/HACKS.md @@ -1189,3 +1189,20 @@ so it holds across node restarts. Asking for a `containers.conf` edit would add a per-machine setup step and change every other container on the machine. `agentlab status` shows each node's `pids.current/pids.max`. On Docker the nodes have no limit and nothing changes. + +### U53. `agent-platform-values.yaml.tmpl`: muster may call the public part's MCP server fixture over plain http — ACCEPTED +From muster 5.68.0-rc.1 (giantswarm/muster#1996; agent-platform 4.190.0-rc.2 +on) every call to an organization's `MCPServer` goes through a guarded +outbound transport that refuses an address in the cluster and plain http +unless the platform lists the host in `muster.outbound.privateHosts`. +`organizations-test --part public` serves its MCP server fixture (the fake +pro, anonymous, in a container on the `kind` network) to an organization's +namespaces at the Service `agentlab-public-mcp` of the platform namespace, +plain http, so muster would never connect to it. **Fix:** with +`platform.organizations` on a chart from 4.190.0-rc.2 (`config.MusterOutboundChartFloor`; +an older muster's closed schema refuses the key), the lab renders that one +host into `muster.outbound.privateHosts`; the part refuses to start, naming +the fix, when muster's `config.yaml` does not list it. The exception is the +lab's own fixture Service: an organization's writer cannot list a host, and +the rest of the guard stays on. A real destination would be served over +https with a public address. diff --git a/docs/agents.md b/docs/agents.md index a94704f7..589408d9 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -854,6 +854,139 @@ outsider. The verdicts: A successful run deletes both organizations. A failed run keeps them for diagnosis, and the next run deletes them first. +### The public part + +`organizations-test --part public` proves that an organization shares +agents and MCP servers with every person on the installation through its +public namespace (giantswarm/giantswarm#39646, the organization-sharing +plan). agent-platform-operator keeps it beside the organization namespace +from its 0.7 line, reports it in +`status.capabilities.agentPlatform.publicNamespace` and binds the +installation's "everyone" (`tenants.platform.users`, `system:authenticated` +by default) there to `agent-platform:platform-user` (RoleBinding +`agent-platform:everyone`). agent-manager's tools reach it with `public: true` +from 4.2.0-rc.3. The part refuses, by name and version, an +agent-platform-operator before 0.7.0-rc.1 or an agent-manager before +4.2.0-rc.3: agent-platform runs the operator's 0.7 line from 4.190.0-rc.8 +(`agentlab configure --chart-version`), and a `platform.valuesFiles` overlay +admits the agent-manager release candidate (`gitops.prereleases`, or +`components.agent-manager.versionRange`). A dev build or a local build is +left to the run. + +The part keeps the proof's organizations and members: alice is a member of +`agentlab-a` and no member of `agentlab-b`, bob an editor of `agentlab-b`. +`agentlab-b`'s admin (the lab's admin, by `platform-admins` in `spec.admins`) +publishes in its public namespace: the organization's model, the agent +`agentlab-organizations-public` through `create_agent` with `public: true`, +and the MCP server `agentlab-public-mcp`, which is also in `agentlab-b`'s +organization namespace. The server is agentlab's fake pro (a fixed board) in a +container on the `kind` network, answering without a bearer: muster gives a +server outside its own namespace no identity. muster calls an organization's +server through its outbound guard, which refuses a Service of the cluster over +plain http unless `muster.outbound.privateHosts` lists the host: the lab lists +the fixture's Service there with `platform.organizations` on agent-platform +4.190.0-rc.2 or later (HACKS.md U53), and the part refuses to start, naming +the fix, while muster's configuration does not list it (`agentlab platform` +renders it and rolls muster). The container runs the agentlab +binary, which must be a static Linux executable: on macOS build one +(`GOOS=linux CGO_ENABLED=0 go build -o agentlab-linux .`) and pass it with +`--mcp-fixture-binary`. The verdicts: + +- each organization has its organization namespace and its public namespace, + both labelled with the organization's name and UID, and only the public one + with `agent-platform.giantswarm.io/space: public`; the public one has the + operator's `agent-platform:everyone`, to `agent-platform:platform-user` with + at least one subject, and access reviews as alice allow listing agents and + creating sessions in `agentlab-b`'s public namespace and deny listing agents + in its organization namespace; +- bob, an editor of `agentlab-b`, cannot publish: his agent's create in its + public namespace answers 403, while his create in its organization + namespace and the admin's create in the public namespace are admitted (dry + runs); his `create_agent` with `organization: agentlab-b` and `public: true` + is refused with nothing written, while the admin's is admitted (dry runs); +- alice's `list_agents` with `public: true` lists `agentlab-b`'s public agent + with `organization: agentlab-b` and `public: true`, and names its public + namespace under `publicNamespaces`; +- the same listing names `agentlab-a`'s public namespace nowhere: alice may + list agents there, and it holds no agent and no muster `MCPServer`; + `agentlab-b`'s is named; +- alice's `start_session` of the public agent without `public` reads word for + word as for an organization that does not exist (`not_found`); with + `organization: agentlab-b` and `public: true` it answers `public: true` and + a Session on the public agent that alice created, Ready; +- a turn of that Session answers (kagent API); +- muster lists alice `agentlab-b`'s public server and not the same server of + its organization namespace, which bob lists; +- alice's agent `agentlab-organizations-public-tools` in `agentlab-a`, whose + toolset is `server:/agentlab-public-mcp`: + under that toolset (`X-Muster-Toolset`, the header the agent's runtime + sends) alice's catalogue holds the server's `list_issues`, its call reaches + the fixture, and muster logs the call under alice's subject; under the + toolset that names the server of `agentlab-b`'s organization namespace the + call is refused for alice and answered for bob; +- a turn on alice's agent calls the public server: the fixture records the + call, and in the turn's own window (after her `start_session`, before her + `delete_session`) muster accepts her credential and logs the turn's calls + under her subject; +- where agent-manager runs the organizations in mode commit (as for [The + credentials part](#the-credentials-part)) into one of + `platform.workspaces.github.proofRepositories`, the part's only repository + to write in, two verdicts in this order: + - while `agentlab-b`'s content path (`/agentlab-b`) has no + kustomization file there, the admin's `create_agent` with `public: true` in + mode commit is refused (`conflict`), as agent-manager refuses it, with no + pull request and nothing live. The part then adds the content path's + `kustomization.yaml` through a pull request that it opens and merges with + this host's `gh` login, as the credentials part merges its own: it lists the + path's directories and YAML files and never `public`. The proof's + organizations are applied live, so their content path has no kustomization + file until the part adds it. The file starts with a marker comment, and the + next run removes it the same way before it proves the refusal again. A + kustomization file the part did not write is left as it is: the refusal is + then a `SKIP`, and the next verdict uses that file; + - with the content path's kustomization file, the same write opens a pull + request whose files are all under `/public`, and that + kustomization file on its branch does not list `public`. Nothing is live, + and the part closes that pull request; +- where the lab runs klaus-gateway (`platform.klausGateway`), or the run names + one with `--gateway-image` or `--gateway-binary`, and it is 4.21.0-rc.3 or + later (refused by name below it): alice's Slack roster names the public + agent's tenant `agentlab-b · Public`, and her pick of it from the roster + answers in a Session she created on it, through the host gateway of the + proof's Slack surface. Without klaus-gateway the verdict is a `SKIP` that + says so; +- the move (agent-manager's `move_agent`, giantswarm/agent-manager#531; on an + agent-manager before 4.2.0-rc.9 the three verdicts are a `SKIP` that names + that release): the admin creates the private agent + `agentlab-organizations-moved` in `agentlab-b`, and the admin and bob each + start a Session on it. The move's dry run (`to: public`) names the admin's + own Session and counts bob's, or states that other people's Sessions go + too where kagent does not let the admin count them. The move writes the + agent in the public namespace and deletes it from the organization + namespace, and alice starts a Session on it with `organization` and + `public: true`; +- the admin moves it back (`to: private`), and alice cannot start a Session on + it. Once its HelmRelease and Agent are gone from the public namespace, her + start with `public: true` must be refused, with whatever code, and she must + hold no live Session of it, as she lists her own. kagent still knows a + deleted Agent for a while and answers `conflict: ... Agent does not have a + ready prepared revision` (for at least two minutes in the live runs) where + agent-manager would answer `not_found`; the verdict names the code it saw. + Without `public` her start reads word for word as for an organization that + does not exist; +- bob's move of the agent is refused by the API server (`forbidden`, naming + him, at whatever step: agent-manager's read of the target as him, as in the + live run, or its dry run), with nothing written or deleted: read right after + the call, before the part's cleanup, its HelmRelease is the same object, not + being deleted, and the public namespace holds none. + +The turns and the Slack start need the model's key: on the lab's placeholder +key they are a `SKIP` that says so. `--skip-slack` leaves Slack out. Every run +removes what the part wrote in both namespaces of each organization (the +public agent, the server, the moved agent, the public namespace's model, +alice's agent), also the full proof, so a failed public part leaves nothing +for the proof's rosters and listings to find. + `organizations-test --part cleanup` runs the orphan cleanup check alone, creating the proof agents and a member-owned session directly through kagent without a model turn. The default run includes this check after all other organization checks. The former `--part erasure` spelling remains an alias. See the operator's [glossary](https://github.com/giantswarm/agent-platform-operator/blob/main/GLOSSARY.md) for the distinction between organization deletion and cleanup. The report prints one `PASS` or `SKIP` line per verdict, `[surface] diff --git a/docs/cli.md b/docs/cli.md index 4c0b0052..1b87ccb7 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -290,7 +290,7 @@ one helper — see [Agents](agents.md). | `workspaces-measure` | Measures workspaces on the cluster `--kube-context` and `--muster-url` name (with `--organization`, `--provider`, `--small-repos` and `--large-repo`), through its muster as the person `muster auth login` signed in, their token renewed before it expires: a small and a large workspace created and deleted `--runs` times (default 5): the first sync, a no-op and a changed cycle, `authorize_workspace`, with `--agent` and `--agentgateway-url` a Session's directory set up through `start_session` (from the call and from the first turn to the setup's record) and the on-demand fetch in the Session's sandbox after a push, a first checkout, `git status` and a cold build (its download through the module proxy, `--goproxy`, and its compile, two figures) in the Session's clone on the volume and the same on the node's local disk, the session directory's size; the first run also times one online expansion where the StorageClass allows it; the last reads the claim's capacity, the volume's use, each mirror against the provider's size (the factor against 1.5) and whether the headroom max(4 GiB, 50 %) held. Per figure what it measured from and to, median, p90 and max, with the StorageClass and driver, as JSON and a Markdown table in `state/workspaces-measure-