Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security

- **The connectivity hooks read only the Secrets they write** (giantswarm/agent-platform#1269). The hook ServiceAccount's ClusterRole no longer carries `secrets` or `configmaps`. Each hook gets a Role, at its own events, in each namespace it writes, on the names it reads or writes; only the Substrate bootstrap's `create` is unnamed. The bootstrap's Roles are in `ate-system` and `podcertificate-controller-system`, which the new pre-install / pre-upgrade hook Job `<release>-substrate-namespaces` (weight -4) creates when they are missing. With `agentPlatformOrganizations.enabled` the bootstrap also gets `create` and `patch` on the ConfigMap `agent-platform-operator-ate-api-ca` in the release namespace. The databases hook's Roles are in `postgres.namespace` and every `secretNamespaces` entry, and the sign-in keys cleanup's Role is in the release namespace.
- **Breaking:** **Substrate's credential providers read Secrets only where an actor's grant points** (giantswarm/agent-platform#1269). From Substrate 1.18.0 and the Google access-token plugin 0.3.0, their releases bind the Secret reader ClusterRoles by RoleBinding in every namespace an `allowedNamespaces` entry of `substrate.credentialProvider.namespacePolicies` names (the platform namespace by default), not cluster-wide. With `agentPlatformOrganizations.enabled`, agent-platform-operator (pinned to `0.1.0-rc.13`) binds both readers in every organization namespace. A grant on namespaces of another label keeps them cluster-wide, and an own `credentialProvider.rbac.namespaces` stays as set. The organizations' admission policies admit the operator's binding of each provider's ServiceAccount to its own reader only, and nobody else's.

### Added

- **A namespace's default ModelConfig** (giantswarm/agent-platform#1274). A `kagent.modelConfigs[]` entry with `default: true` carries the annotation `agent-platform.giantswarm.io/is-default-model-config: "true"`; the render fails when more than one entry sets it. Only `true` (or `"true"`) marks the entry. `make verify-default-model-config` asserts the render.
- **`kagent.defaultModelConfig.enabled`** (default `true`, giantswarm/agent-platform#1274). `false` writes `providers: false` to the kagent release, which then renders no `default-model-config` and deletes the one it rendered: an Agent or agent HelmRelease that names `default-model-config` no longer resolves its model, so mark a `kagent.modelConfigs[]` entry `default: true` and point the agents at it first. Anthropic `kagent.modelConfigs[]` entries still inherit `kagent.providers.anthropic.config`. The key does not reach the kagent release.
- **agent-platform-operator joins the platform, off by default** (giantswarm/agent-platform#1268, giantswarm/giantswarm#38891). With `agentPlatformOrganizations.enabled` (kagent and Agent Substrate on), the meta chart installs `components.agent-platform-operator` (pinned to `0.1.0-rc.11`, its CRD `agentplatformorganizations.agent-platform.giantswarm.io` under `crds: CreateReplace`) into the connectivity release's namespace, after the connectivity release, and derives its wiring from the platform's values: the curated copies on, the workers' policies of the flavor, the snapshot bucket, the erasure's kagent and ate-api targets with their audiences, and with the Crossplane AWS store the IRSA role `<store role>-operator`. Its own other values go in the new `agent-platform-operator` block. The operator's pods reach the cluster DNS, the API server, the kagent controller's API port, ate-api-server and, with an S3 snapshot location (the Crossplane AWS store or an existing bucket in `kagent.harness.snapshotLocation`), S3 and STS; the operator verifies ate-api-server with the ClusterTrustBundles of `servicedns.podcert.ate.dev/identity` labelled `podcert.ate.dev/canarying: live`, projected into its pod, so a rotated CA is trusted without a restart. The connectivity chart renders the ClusterRole `agent-platform-tenant-flux` with kagent on, which the operator binds an organization's Helm ServiceAccount to. The switch is the rollout gate, off by default for now: it turns on by default once the capz and s3proxy snapshot stores give the operator access, and the kagent line carries giantswarm/kagent-extensions#27. Before you turn it on in an installation: the kagent line must carry giantswarm/kagent-extensions#27; until it does, the erasure of an organization that holds a person's Session stops at the Sessions' step. The ValidatingAdmissionPolicy `agent-platform-organization-operator-scope` holds the operator's writes of the namespaced kinds its ClusterRole grants (network policies, ResourceQuotas, OCIRepositories, HelmReleases, the curated kagent kinds, WorkerPools) to organization namespaces. Commit mode is not derived yet: an own `agent-platform-operator.commitMode` fails the render. An installation runs an operator release with giantswarm/agent-platform-operator#10 (the pinned `0.1.0-rc.11` is one) before it sets `agentPlatformOrganizations.fluxNamespace`, because the Flux-namespace policy pins the Kustomization's `serviceAccountName` and `targetNamespace` to names only that release writes.
- **agent-platform-operator joins the platform, off by default** (giantswarm/agent-platform#1268, giantswarm/giantswarm#38891). With `agentPlatformOrganizations.enabled` (kagent and Agent Substrate on), the meta chart installs `components.agent-platform-operator` (pinned to `0.1.0-rc.13`, its CRD `agentplatformorganizations.agent-platform.giantswarm.io` under `crds: CreateReplace`) into the connectivity release's namespace, after the connectivity release, and derives its wiring from the platform's values: the curated copies on, the workers' policies of the flavor, the snapshot bucket, the erasure's kagent and ate-api targets with their audiences, and with the Crossplane AWS store the IRSA role `<store role>-operator`. Its own other values go in the new `agent-platform-operator` block. The operator's pods reach the cluster DNS, the API server, the kagent controller's API port, ate-api-server and, with an S3 snapshot location (the Crossplane AWS store or an existing bucket in `kagent.harness.snapshotLocation`), S3 and STS; the operator verifies ate-api-server with the ClusterTrustBundles of `servicedns.podcert.ate.dev/identity` labelled `podcert.ate.dev/canarying: live`, projected into its pod, so a rotated CA is trusted without a restart. The connectivity chart renders the ClusterRole `agent-platform-tenant-flux` with kagent on, which the operator binds an organization's Helm ServiceAccount to. The switch is the rollout gate, off by default for now: it turns on by default once the capz and s3proxy snapshot stores give the operator access, and the kagent line carries giantswarm/kagent-extensions#27. Before you turn it on in an installation: the kagent line must carry giantswarm/kagent-extensions#27; until it does, the erasure of an organization that holds a person's Session stops at the Sessions' step. The ValidatingAdmissionPolicy `agent-platform-organization-operator-scope` holds the operator's writes of the namespaced kinds its ClusterRole grants (network policies, ResourceQuotas, OCIRepositories, HelmReleases, the curated kagent kinds, WorkerPools) to organization namespaces. Commit mode is not derived yet: an own `agent-platform-operator.commitMode` fails the render. An installation runs an operator release with giantswarm/agent-platform-operator#10 (the pinned `0.1.0-rc.13` is one) before it sets `agentPlatformOrganizations.fluxNamespace`, because the Flux-namespace policy pins the Kustomization's `serviceAccountName` and `targetNamespace` to names only that release writes.
- **Air-gapped install from a private TLS registry with credentials: `gitops.mirror`** (giantswarm/agent-platform#1259). `gitops.mirror.registry`, a host or host:port, moves every chart and image source from gsoci.azurecr.io to that registry, the path, tag and digest kept: every component's and the self-management OCIRepository, every string of the values forwarded to a component release (registries, repositories, image references, `oci://` chart URLs), the hook images, and, in the connectivity chart, the model-serving presets' runtime images (the new `modelServing.runtimeImages.registry`) and OCI model images (`modelServing.modelImages.registry`, an own value standing). A per-source key set to another registry is left as written. `gitops.mirror.secretRef` and `gitops.mirror.certSecretRef` set the registry credentials and the CA bundle on every OCIRepository. The bundled engine's two images stay `flux-engine`'s own keys. Only gsoci.azurecr.io moves: a preset's runtime image on another registry or a Docker Hub short name stays as written, and DNS names (`fqdns`, `matchName`, `matchPattern`) are never rewritten; model-manager's registry egress, while it names gsoci, takes the mirror's host without the port and the mirror's port through the new `modelManager.networkPolicy.registry.ports` (default `[443]`). Unset, nothing of the render changes. `make verify-mirror` asserts it.
- **kagent 1.31: the omp Harness relays an MCP server's sign-in link, ListSessions filters by namespace** (giantswarm/giantswarm#37098, giantswarm/kagent-upstream#927, #958). `components.kagent{,-crds}.versionRange` is `>=1.31.0 <1.32.0` (was `>=1.27.0 <1.28.0`). The omp Harness pauses the task at `input-required` with the HITL extension's `url_elicitation_request` when muster sends its sign-in link, as the claude, codex and Go ADK runtimes already do, so klaus-gateway and the Dev Portal show the sign-in instead of muster's text challenge. 1.28.0 runs a Shared subagent binding as an omp task agent and sends an Anthropic tool's Parameters as its input schema; 1.29.0 fails a crashed golden boot at once instead of starting it over, and runs Codex 0.166.0 and oh-my-pi 18.15.0. 1.30.0 gives a Shared child its own skills on the Claude and Codex Harnesses; 1.31.0 serves a selected plugin's MCP servers through the omp MCP bridge, refetches a moved plugin pin, and filters ListSessions by the Agent's namespace, which agent-platform-operator's erasure asks for (giantswarm/agent-platform-operator#8). Both need Substrate 1.17.5, the pinned line.
- **A Secret reference in the kagent namespace needs `get` on the Secret** (giantswarm/giantswarm#38827). With kagent on, the ValidatingAdmissionPolicy `agent-platform-platform-tenant-credential-refs` (`Fail`, bound with `Deny`) refuses, in the kagent namespace only, the creation of an Agent, AgentTemplate, RemoteMCPServer, EgressPolicy, ModelConfig or ModelProviderConfig of any served version, or an update that changes its spec, when a git `credentialRef` of a skill or plugin source, a `headersFrom` Secret, a `destinations[].authentication.secretKeyRef`, the `apiKeySecret` or a ModelProviderConfig's `secretRef` names a Secret the requester may not `get` there. An update that leaves the spec unchanged is admitted; a spec change to an object being deleted is not exempt. The Organizations' namespaces keep the `tenant-credential-` prefix rule; there, `agent-platform-tenant-credential-refs` and `agent-platform-tenant-model-routing` now admit a write to an object being deleted only when it leaves the spec as it is, so a finalizer the writer sets no longer lets a spec change through. `make verify-tenant-rbac` asserts the render.
Expand Down
7 changes: 7 additions & 0 deletions Makefile.custom.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4571,6 +4571,13 @@ verify-hooks-secrets: ## Assert the connectivity hook identity reads only the Se
@HELM="$(HELM)" python3 tests/verify-hooks-secrets.py $(CONNECTIVITY_DIR)
@echo "ok: $@"

.PHONY: verify-secret-readers
verify-secret-readers: ## Assert Substrate's controller and credential providers read Secrets only where granted (giantswarm/agent-platform#1269): from Substrate 1.18.0 and the Google access-token plugin 0.3.0 the meta chart forwards the namespaces their Secret readers are bound in (every allowedNamespaces entry of the derived namespacePolicies) and, with agentPlatformOrganizations.enabled and agent-platform-operator 0.1.0-rc.13, the operator's serviceAccountBindings of both readers in every organization namespace; an older chart, an older operator, a grant on namespaces of another label get nothing forwarded (the readers stay cluster-wide) and an own rbac.namespaces stays. Then on a local API server (tests/apiserver.py) the RBAC of the Substrate and plugin charts that bind by namespace, rendered with the forwarded values, beside the operator's bindings: ate-controller reads only egress-mitm-ca-pool in ate-system, each provider gets a Secret in kagent and in an organization namespace and is refused one in ate-system, kube-system and a workload cluster's namespace and any list (SubjectAccessReviews as each ServiceAccount). Needs PyYAML and openssl. HELM selects the binary. Network: gsoci.azurecr.io, github.com (the envtest binaries, cached in .bin/).
@echo "====> $@ ($(CHART_DIR))"
@python3 -c 'import yaml' 2>/dev/null || { echo "FAIL: PyYAML is not installed (apt: python3-yaml, pip: pyyaml)"; exit 1; }
@HELM="$(HELM)" python3 tests/verify-secret-readers.py $(CHART_DIR)
@echo "ok: $@"

.PHONY: verify-organization-admission
verify-organization-admission: ## Assert what the Agent Platform organizations' role and admission policies decide (giantswarm/agent-platform#1267), with server-side dry runs on a local API server (tests/apiserver.py: envtest's etcd and kube-apiserver, RBAC on, no controllers): with agentPlatformOrganizations.enabled the connectivity chart renders agent-platform:organizations-admin and the agent-platform-organization* ValidatingAdmissionPolicies (Fail, Deny), none with it off, a render failure with kagent off, no workers policies with Substrate off; on the API server, with the CRDs of the operator chart, Flux, kagent, Substrate and Kyverno, organizations-admin creates organizations and binds user, editor and admin in organization namespaces only and holds nothing else there, an editor never writes the OCIRepository, the operator creates only labelled agents-<organization>-* namespaces, writes RoleBindings only in them and Kustomizations and ServiceAccounts in the Flux namespace only when labelled with the organization UID, a Kustomization there only named agents-* running as the ServiceAccount of its own name into the namespace of its own name (each refusal shows the policy's own message), a Flux-namespace ServiceAccount bound by the operator only in the namespace of its name, agent-platform:organization-flux (rendered with fluxNamespace only) letting that ServiceAccount write the organization's kinds in its namespace only and bind no role but user, editor and admin (agent-platform-organization-flux-writes refuses a role whose rules it holds, the role itself included, and a ServiceAccount token Secret; a Flux controller acting as itself is not held), an operator Kustomization with spec.kubeConfig, spec.postBuild.substituteFrom, spec.patches or spec.components, another source than agentPlatformOrganizations.fluxSource (its name required with fluxNamespace, the render fails without it), another key than fluxDecryptionSecret, or a path other than fluxPathPrefix + its parent and organization labels (two DNS labels: not the root, a whole parent or another organization) refused, a fluxPathPrefix that is not ./<segments>/ failing the render, a file in git changing or pruning no RoleBinding its own Kustomization did not apply (organization-admins included), a git-applied organization-admins only with kustomize.toolkit.fluxcd.io/prune: disabled (create and update; its prune refused while the namespace lives, its deletion with the terminating namespace admitted), the operator binding a Flux-namespace ServiceAccount to nothing but agent-platform:organization-flux, only the operator touches the organization labels, organization-admins stays while its namespace lives, RoleBindings bind no system: identity or foreign ServiceAccount, the HelmRelease field lock holds (also for the Flux ServiceAccount), an organization is deleted only with prune: enabled or a terminating parent, the EgressPolicy floor, the operator's copies, and the sandbox shape with a Kyverno PolicyException for agents-* in place. Every refusal names its policy and has an admitted twin. Needs PyYAML and openssl. HELM selects the binary. Network: gsoci.azurecr.io, github.com (the envtest binaries, cached in .bin/).
@echo "====> $@ ($(CHART_DIR), $(CONNECTIVITY_DIR))"
Expand Down
10 changes: 10 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ Every component ships its own CRDs and upgrades them with its release; there is

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.

## \<current\> → \<next\> (the credential providers read Secrets only where bound)

giantswarm/agent-platform#1269: once `components.substrate.versionRange` selects Substrate 1.18.0 or later and `components.google-access-token-credential-provider.versionRange` the plugin 0.3.0 or later, their Secret readers are bound in the namespaces the credential grants name (every `allowedNamespaces` entry of `substrate.credentialProvider.namespacePolicies`) and, with `agentPlatformOrganizations.enabled`, by agent-platform-operator in every organization namespace. The providers already refused an actor a Secret outside its grants in their own process; what changes is that their ServiceAccounts can no longer read any other Secret of the cluster, a workload cluster's kubeconfig on a management cluster among them. An own `substrate.credentialProvider.rbac.namespaces` that leaves out a granted namespace makes the egress gateway answer that namespace's credentials with `403` (`not permitted to read secret <namespace>/<name>`).

### Operator action

- **None** for an installation on the default `namespacePolicies` (the platform namespace) or with the organizations on.
- **An installation whose own `namespacePolicies` name a namespace in `allowedNamespaces`**: the namespace must exist before the ranges move, since the Substrate and plugin releases create a RoleBinding in it; remove a grant of a namespace that is gone. An `agents-*` entry is left to agent-platform-operator while the organizations are on.
- **An installation whose own `namespacePolicies` grant namespaces by a label other than the organizations'**: nothing; the readers stay bound cluster-wide. To narrow them, list the namespaces in `substrate.credentialProvider.rbac.namespaces` (and `google-access-token-credential-provider.rbac.namespaces`).

## \<current\> → \<next\> (no runtime forwards the person's token)

giantswarm/giantswarm#38993: the platform Harness no longer sets `KAGENT_PROPAGATE_TOKEN`. A Session reaches muster with its Actor's JWT, which needs muster to trust the actor JWT and agent-manager to bind the Session (on whenever Agent Substrate is on, from the release that carries `make verify-actor-bearer`). A Session nobody bound (one created through the kagent UI or the controller API, not agent-manager) gets no muster tools.
Expand Down
Loading
Loading