Skip to content

Security & IAM

This is the canonical answer. Other pages summarize it and link here; if they appear to disagree, this page is correct.

“Is the agent read-only?” has three different answers depending on which plane you mean. Conflating them is the most common misreading of this project’s security posture.

Plane What it governs Can the agent write?
Kubernetes RBAC (the KSA) Everything the agent does against a cluster’s Kubernetes API No for workloads and cluster state — read-only in every configuration apart from a leader-election housekeeping Role confined to its own namespace, and it cannot read Secret values. Enforced by RBAC and <agent>-kube-proxy.
GCP IAM (the GSA) GKE/Google Cloud control-plane calls, including via the gke MCP No write to infrastructure, with the default read-only permission set — the one qualification is the Trace-console permissions the Trace role carries, under Roles per set; the only other set the install offers is custom, whose roles you choose yourself. Enforced by IAM, chosen at install time.
The GitOps path Changes to your infrastructure-as-code repository Yes — by opening a pull request a human must review and merge. Enforced by the credential proxy, which refuses the agent the GitHub write verbs (merge, approve, REST mutation, workflow and release triggers, repo administration).
  • Workloads and cluster state cannot be mutated through the Kubernetes API by this agent. The KSA’s only write grant is the housekeeping Role kubeagents:leader:<namespace>:<name>: write on leader-election leases, confined to the agent’s own namespace, plus get/patch on pods there only when the deployment runs more than one replica (spec.deployment.availability.replicas). That is when the leader-election wrapper that labels its own pod actually runs. The operator runs the gateway as a single replica whatever spec.deployment.availability.replicas asks for, so today the Role grants leases alone on every install. Beyond that it holds no write verb (see Kubernetes RBAC). No other setting widens this.
    • A kubectl write the command policy refuses also ends the run’s work on it. The runtime halts the turn at the first such refusal by default (permission_refusal_halt_after), and the worker is told to end its card (blocked, or completed when the card asked for a pull request) with the refusal quoted. The halt is enforced; the close is the worker’s to follow.
  • GCP control-plane mutation is enforced off by default. The default read-only permission set binds read roles, so a write to infrastructure fails at IAM. The one qualification is roles/cloudtrace.user, whose Trace-console permissions (analysis-report tasks and trace scopes) IAM does grant; Roles per set says which paths reach them and which cannot. The install no longer offers an admin bundle: custom is the only way to widen this, and it requires you to name every role.
    • If you do grant write roles that way, the gke MCP server’s cluster-management tools are still refused: the agent’s MCP client reaches that server only through the credential proxy, which relays its read-only tools and refuses the rest. Each profile’s config also offers the model only that server’s read tools, so create_cluster, patch_k8s_resource and the other write tools are not offered either.
  • Persona rules are guidance, not enforcement. A prompt-injection or reasoning failure is bounded by IAM, not by SOUL.md. Keep the default read-only set if “read-only on the cloud plane” must be an enforced property of the deployment rather than an intended behaviour of the model (see Configuring read-only mode).
  • The intended write path is always GitOps — the agent proposes, a human merges, your reconciler applies. The second half is enforced rather than intended: the credential proxy refuses gh pr merge, gh pr review --approve, mutating gh api calls, workflow and release triggers, and repository administration, so the actor that opens a pull request cannot also complete it. See Secure write path and Credential isolation for the rule ids.
  • The chat front door holds no infrastructure tools at all. Chat ingress terminates at the Planning Agent (the pod’s default Hermes profile), whose config pins every surface to routing, kanban-delegation, and per-user memory tools only: no GKE, file, or GitOps write tools. A prompt injected through chat must still be delegated to the Platform Agent, where the IAM and RBAC boundaries above apply. See ChatOps.
    • The experimental platformFrontDoor flag gives that up on purpose: it points chat ingress straight at the Platform Agent’s toolset, so this row does not hold on an install that has turned it on. It also hands that profile’s config.yaml to the agent, so the security and approval keys in it (security.*, approvals.*) stop being restored from the image on every restart. It is off by default and unsupported.
  • Cluster Agents are scoped-down, not scoped-up. Each per-cluster Cluster Agent profile shares the Platform Agent’s identity path: the same gateway Pod and KSA, and the same credential broker for every proxied kubectl and gcloud, so the same RBAC and IAM ceilings apply. Its config template exposes only the read-only gke and developer_knowledge MCP servers, with no platform_control and no GitOps write path, and its KUBECONFIG is pinned to one cluster. It proposes fixes back over the kanban card; only the Platform Agent can turn them into PRs.
    • The management cluster now has a Cluster Agent too, so one of these profiles is scoped to the cluster kube-agents itself runs in and can read the harness’s own namespace, including the namespace holding platform-agent-secrets. How far that reach goes is set by the GSA’s permission set, not by the Kubernetes RBAC row above. A Cluster Agent does not reach its cluster as the KSA: cluster_agent_profile.create_profile runs gcloud container clusters get-credentials (through the credential broker, or answered by the shim after one relay read when the kube-api proxy is in use) and pins the resulting kubeconfig. Its Kubernetes API calls therefore authenticate as the broker’s GSA (the kube-api proxy runs as the same identity), and the kubeagents:minimal:* ClusterRole does not bound them.
    • On an install that has armed the scoped service account pool, kubectl under such a kubeconfig authenticates as its project’s pool member instead. That is moot today, since the pool is suspended and off by default.
    • On the default read-only set, whose two container.* roles are roles/container.clusterViewer and roles/container.viewer, that means the harness’s own workloads, their logs, ConfigMaps and events, and not its Secrets. On a custom set that names an admin role it means the full Kubernetes API on that cluster, Secrets included, so on such an install this profile can read the agent’s own credentials. That reach is accepted on purpose on the default set: the management cluster’s workloads fail like any other cluster’s, and the agent that triages an event has to be the one scoped to the cluster that raised it.
    • If it is not acceptable on your install, most sharply if you have widened the GSA through custom, add the cluster’s name to spec.scope.exclude.clusters on the PlatformAgent; the next reconcile then prunes the profile. Name the cluster by project, location and name; the older RECONCILE_EXCLUDE bare-name variable still removes the profile for one release, but the broker doesn’t enforce it. On an installer-managed install, put the triple in SCOPE_EXCLUDE_CLUSTERS in install.env and run upgrade.sh --upgrade-mode=full, which renders it onto the PlatformAgent; an edit made on the PlatformAgent itself is refused at the next full upgrade until it is recorded there.
    • The credential broker and kube-proxy then refuse every route to the cluster’s Kubernetes API, for every caller. That bounds what the agents run, not the GSA: the management project always holds the agent’s roles, so the identity itself still reaches the cluster.
    • Excluding it removes the Cluster Agent and, with it, stall-watch’s reads of that cluster, which follow the same profile roster. The per-cluster fleet audits and fleet answers leave it out too. The daily upgrade-readiness watch, the Saturday upgrade-readiness-weekly-review (whose findings on it reach the findings queue and the weekly brief), the networking audit’s subnet usage and the GCE audit’s instance listing still cover it, through control-plane reads only.

The end-state design goes further: agents stay read-only on cloud APIs in every configuration, and the create_cluster tool is withdrawn. Removing the gke-admin bundle closed the one-word path to a writable GSA, and the tool list above keeps create_cluster out of the model’s reach. Neither gets there on its own: custom can still be pointed at admin roles, and the credential behind the gke server can still call the tool. That part is a target, not current behaviour.


The rest of this page details the two enforced planes.

The agent uses GKE Workload Identity to bind its in-cluster KSA to a GSA, so no static GCP key lands in the cluster on a standard install. Clusters without Workload Identity can use the chart-only litellm.vertex.credentialsSecretRef escape hatch covered under The Vertex AI gateway is a separate identity below.

flowchart LR
subgraph K8s["GKE cluster"]
Pod["Platform Agent pod"] --> KSA["KSA<br/>kubeagents-platform-agent"]
end
subgraph IAM["GCP IAM"]
KSA -->|Workload Identity| GSA["GSA<br/>kubeagents-platform-gsa@PROJECT.iam.gserviceaccount.com"]
GSA -->|IAM roles| Res["GCP / GKE resources"]
end

The IAM side of the binding is provisioned by the kube-agents-iam Terraform module, instantiated by the terraform/examples/full-install composition the installer drives. It grants roles/iam.workloadIdentityUser on the GSA to the KSA member <project>.svc.id.goog[kubeagents-system/kubeagents-platform-agent] (the KSA half is the composition’s agent_ksa_name, kubeagents-platform-agent by default). The KSA-side annotation iam.gke.io/gcp-service-account: kubeagents-platform-gsa@<project>.iam.gserviceaccount.com is applied by the operator from spec.security.serviceAccountAnnotations on the PlatformAgent CR.

GKE resolves Workload Identity by Pod IP, so every container in a Pod shares one cloud identity. The shell sandbox, where everything the model writes runs, is therefore a Pod of its own: the <agent>-shell StatefulSet runs under its own KSA, <agent>-shell, with no iam.gke.io/gcp-service-account annotation. The metadata server answers it with an unbound <project>.svc.id.goog principal that no IAM policy names. The credential broker runs in a separate Deployment, <name>-credential-proxy, under the annotated KSA above, and the sandbox reaches credentialed commands only through it (Credential isolation has the Pod anatomy). This layout cannot be turned off: spec.harness.experimental.shellSandbox.enabled: false parks the CR in Degraded with ShellSandboxCannotBeDisabled and changes nothing about the running workload.

spec.security.workloadIdentityFederation (platformAgent.security.workloadIdentityFederation in the chart) is the optional hardening on top. The broker then takes its cloud identity from an audience-scoped projected token mounted in its Pod alone, exchanged through Workload Identity Federation for an impersonated kubeagents-platform-gsa token, rather than from the metadata server. Nothing creates the pool itself — not the chart, not the provisioning scripts, not the Terraform modules. The one-time gcloud commands are in designs/agent-shell-sandboxing.md.

The install grants the agent GSA one of two permission sets. Both entry points choose from the same vocabulary, and read-only is the default in each. The installer asks the question, or takes --permission-set / --custom-roles, and records the answer in install.env as PLATFORM_AGENT_PERMISSION_SET before generating terraform.tfvars. A hand-driven Terraform composition takes the same two values in its permission_set variable, with custom requiring a project_roles list; setting project_roles explicitly overrides permission_set either way.

Permission set PLATFORM_AGENT_PERMISSION_SET Use it when
read-only read-only (default) Auditing / monitoring only — no write to infrastructure.
custom custom You supply the exact roles via PLATFORM_AGENT_CUSTOM_ROLES.

The default read-only set binds read roles, with one qualification under the Trace role:

  • roles/container.clusterViewer, roles/container.viewer — read-only GKE.

    roles/container.viewer carries container.thirdPartyObjects.list and .get, which let the fleet-audit collectors list the Config Connector objects on a cluster. The collectors find the Config Connector kinds through the API server’s discovery, which needs no grant. A custom set needs those two permissions or a Kubernetes RBAC grant of list on the Config Connector kinds. The collectors connect through gcloud container clusters get-credentials, so an RBAC grant names the agent’s Google service account as a User subject (its email). Without that grant the read fails, no fix whose object is on that cluster gets the note about Config Connector, and the audit’s log has a warning that names the clusters it could not read.

    A custom set also needs container.namespaces.list or a Kubernetes RBAC grant of list on namespaces. Without it, an object that takes its project from its namespace has no known project, so it matches a fix only when one cluster runs Config Connector, and no warning appears.

  • roles/compute.viewer — read-only compute, reservations, machine types, and quota advice. The readiness report’s lb-connection-draining, orphan-node-objects, and surge-capacity rules read backend services, instances, and regional quotas with it (saying unknown when absent). The security-patch-orchestrator surge-quota check reads regional quotas and managed instance group sizes with it (checks_unevaluated when absent).

  • roles/monitoring.viewer, roles/logging.viewer — read-only metrics and logs.

  • roles/gkehub.viewer — read-only fleet membership and rollout sequencing (gkehub.rolloutSequences.list), for the readiness report’s rollout-sequence precheck, which lists the fleet host project’s RolloutSequences.

  • roles/recommender.viewer — read-only Cloud Recommender recommendations and insights (recommender.*.list on recommender.googleapis.com), used for corroborating evidence in the cost and upgrade-readiness audits, the standalone upgrade-readiness report, and the cost audit’s informational uncovered-recommendations list. The credential broker holds gcloud recommender recommendations list to the five cost and GKE diagnosis recommenders (google.compute.instance.MachineTypeRecommender, google.compute.instance.IdleResourceRecommender, google.compute.disk.IdleResourceRecommender, google.compute.address.IdleResourceRecommender, and google.container.DiagnosisRecommender) and gcloud recommender insights list to google.container.DiagnosisInsight, refusing every other recommender and insight type. Projects without this grant degrade cleanly into collector notes rather than failing or skipping the audit.

  • roles/cloudtrace.user — trace reads (cloudtrace.traces.get and .list), for the observability skill’s trace helpers through the credential broker’s relay. Google’s Trace User role also carries create, delete and update on Trace-console objects, analysis-report tasks and trace scopes, and no predefined Trace role grants the two reads without them, so a narrower grant is a custom role of your own.

    • The sandbox’s route to Google is the broker. It forwards a relayed Trace read as a GET only, its one relayed POST is a Cloud Logging read, and its gcloud allowlist carries no trace command, so nothing the model’s code sends through it uses those permissions.
    • A token minted on the annotated ServiceAccount itself carries every role bound to the identity, these permissions included. Only the credential broker Pod runs as it. The gateway Pod, and any AgentPlugin code it imports, reach the identity only through the broker’s verbs and relay. The sandbox boundary and AgentPlugin notes below say what bounds those paths.
  • roles/iam.serviceAccountUser — act as service accounts when running jobs.

  • roles/iam.securityReviewer — read IAM policy for review.

  • roles/mcp.toolUser — call the GKE MCP server.

  • roles/serviceusage.serviceUsageConsumer — consume API quota for Developer Knowledge MCP queries.

One permission sits beside the set rather than in it. The capacity-obtainability skill’s future-window probe, gcloud beta compute advice calendar-mode, needs compute.advice.calendarMode to ask when a TPU or GPU shape is predicted obtainable. No viewer role carries it. The predefined roles that carry it, such as roles/compute.futureReservationUser and roles/compute.admin, also carry reservation writes. ENABLE_CALENDAR_MODE_ADVICE=true in install.env (the composition’s enable_calendar_mode_advice) has the IAM module create a project custom role, kubeAgentsCalendarModeAdvice, that holds that one permission. The module binds it to the agent’s service account next to whichever set is in force. It is off by default; without it the calendar-mode call is refused, and the agent has no window evidence to plan from.

The role is bound in the host project only, and the scope’s per-project grants never carry it. A project that already holds a hand-made role of that id refuses the first apply until the role is imported into the install’s Terraform state. Do not also list the role in PLATFORM_AGENT_CUSTOM_ROLES: the plan refuses one grant managed from two places, because removing the list entry later would revoke the permission for an apply. The installing identity needs iam.roles.create for it (and iam.roles.update and iam.roles.delete later), which Editor lacks; see Prerequisites.

roles/container.viewer is project-wide and unconditioned, so it reads Kubernetes objects in every cluster in the project. The grants of the scope’s read roles, per project or inherited from a declared folder or organisation, extend that to every cluster in the scope. The scoped service account pool is where that narrowing is designed to land. It is suspended, so today nothing narrows it; the pool section says why. spec.scope.exclude.clusters doesn’t narrow the grant either. The credential broker and kube-proxy refuse an excluded cluster’s Kubernetes API to every caller, but the identity’s roles still reach it.

A binding on a folder or organisation named in spec.scope is inherited by every project beneath it, which is what makes a container worth declaring and also what a grant there reaches.

A Shared VPC host or a Metrics Scope named there inherits nothing: each resolves to projects, and every one of them needs its own binding of the read roles. The Terraform composition makes those bindings after resolving the selector at plan time, so a project attached or linked after the last apply is unreadable until the next one. The lookups themselves need compute.projects.get in the host project, the two Resource Manager reads roles/monitoring.metricsScopesViewer carries in the scoping project, and resourcemanager.projects.get in each monitored project it names; the read roles carry all of them between them.

The custom set binds exactly the roles listed in --custom-roles, carried as the composition’s project_roles list; none of the built-in role bundles are added. The list is space- or comma-separated, and the installer prompts for it and requires a non-empty value when this set is selected. A custom set that should keep the fleet audits’ Config Connector note needs the grants named under Roles per set for roles/container.viewer. It also needs container.clusters.get (in roles/container.clusterViewer) for the credential fetch; without it, the audit cannot read the cluster’s Config Connector objects, and the audit’s log names the cluster.

If that list names a role like roles/container.admin, the installer says so at the point of choice — it is the authority the removed bundle granted, reached the long way round — and continues. It is your call to make, not the installer’s.

Projects, folders, organisations and selectors in scope

Section titled “Projects, folders, organisations and selectors in scope”

Every scope member gets less than the host project. The members are:

  • a project named in spec.scope.projects (through SCOPE_PROJECTS in install.env, or the composition’s scope variable);
  • a folder or organisation named in spec.scope.folders or spec.scope.organizations (SCOPE_FOLDERS, SCOPE_ORGANIZATIONS);
  • every project a Shared VPC host or Metrics Scope named in spec.scope.sharedVpcHosts or spec.scope.metricsScopes (SCOPE_SHARED_VPC_HOSTS, SCOPE_METRICS_SCOPES) resolves to at plan time, the scoping project included. A Shared VPC host not otherwise in scope gets roles/compute.viewer alone, for the lookup. The networking audit also uses it to read the host’s firewall rules, subnets and other Compute objects, with no cluster read there.

What a member gets is the read subset of the set above, intersected with whatever the host project was actually granted, and nothing else: roles/container.clusterViewer, roles/container.viewer, roles/compute.viewer, roles/monitoring.viewer, roles/logging.viewer, roles/gkehub.viewer, roles/recommender.viewer and roles/iam.securityReviewer. The install is refused at plan time when the intersection carries neither roles/container.clusterViewer nor roles/container.viewer, the two roles that list and get clusters (roles/iam.securityReviewer lists but cannot get).

The roles that stay in the host project are roles/iam.serviceAccountUser, roles/mcp.toolUser, roles/serviceusage.serviceUsageConsumer, roles/cloudtrace.user and any role a custom set adds. The observability helpers read the install’s own traces, and the Trace role’s Trace-console permissions go nowhere else. So a custom list carrying roles/container.admin at home carries no container.clusters.impersonate anywhere else.

Beyond the agent’s grants, the install creates one Log Router sink in each project named in spec.scope.projects or resolved from a Shared VPC host or Metrics Scope, while the drift detector is on. It exports the project’s GKE admin-activity audit records into the management project’s drift topic, where the subscription retains them for 31 days. A project a SCOPE_EXCLUDE_PROJECTS entry names or a glob there matches, or one TF_VAR_drift_pubsub_source_exclude_projects names, gets none, and a folder’s or organisation’s members get none.

Nothing here grants a write anywhere. What does widen is how much one credential can read. roles/container.viewer in each scoped project reads Kubernetes objects in every cluster there, the way it already does at home. A folder or organisation carries the same set plus roles/cloudasset.viewer, bound on the container itself and so inherited by every project beneath it. That is what lets a project created under a declared folder later be discovered and read with no change to the install, and is also why an organisation is wide.

roles/cloudasset.viewer is wider than cluster discovery: it lets the one credential search and export the asset inventory and the IAM policies of every resource under the container, not only its GKE clusters. So a container is declared only where reading all of that with one account is acceptable.

A Shared VPC host or a Metrics Scope inherits nothing: the read roles land in the projects it resolved to when Terraform last planned. So whoever can attach a service project to the host or link a project into the Metrics Scope chooses where the next full upgrade binds them. An exclude.projects entry that names a Shared VPC service project by ID, or a monitored project by its project number, withholds that grant.

Two projects keep theirs. A monitored project excluded by ID keeps it, because the reconcile has to name the project with the agent’s own credentials before the exclusion can match. The scoping project keeps it however it is excluded, because the reconcile reads it to resolve the selector.

Removing a project, folder, organisation, Shared VPC host or Metrics Scope from the scope revokes its bindings on the next full upgrade, and uninstalling revokes them all, because Terraform owns them.

There used to be a third set, gke-admin, which bound roles/container.clusterAdmin and roles/container.admin. It was removed rather than deprecated because it removed a ceiling rather than widening one:

  • GKE authorizes an action if either IAM or Kubernetes RBAC allows it (Access control). A GSA holding roles/container.admin is authorized by IAM whatever the KSA’s RBAC says, so the read-only Kubernetes footprint below stops constraining anything the agent reaches through that identity.
  • roles/container.admin is the one predefined GKE role that carries container.clusters.impersonate — roles/container.clusterAdmin does not. GKE grants IAM roles at the project level; a cluster is not a resource an IAM policy attaches to, so “an IAM role grants privileges across all clusters in the project”. The impersonation therefore cannot be narrowed to one cluster.

custom remains, so a deployment that genuinely needs broad roles still has a supported path — it just has to name each role, which makes the grant explicit and reviewable. Setting PLATFORM_AGENT_PERMISSION_SET=gke-admin, or permission_set = "gke-admin" in terraform.tfvars, now fails with an error rather than being silently downgraded. Re-running the install does not strip roles it no longer grants, so an existing GSA has to be brought back by hand — see below.

A Terraform install can provision one service account per GCP project in the agent’s scope. The credential broker then mints a short-lived token for the account of the project a kubectl request’s target cluster lives in, rather than running it on the agent’s own identity. Two clusters in one project share an account: the project is the IAM unit the scope is declared in, and the unit an estate of one cluster per project is cut in.

The members are derived, not listed. With scoped_pool_enabled set on the kube-agents-iam module, or on terraform/examples/full-install, which passes it through, the module creates one account per project. The projects are the host project, each project in scope.projects, and each project a Shared VPC host or Metrics Scope selector resolves to, less an exact exclude.projects entry. That is the resolved set the plan can list, which is not quite the set the scope’s read roles are bound in:

  • The host project gets an account and no scope binding, since it already carries the agent’s own roles.
  • A project named in scope.projects and in exclude.projects keeps its binding and gets no account.
  • A monitored project excluded by its ID keeps its binding, because the reconcile has to name it before it can match the entry, and gets no account.
  • A folder’s or organisation’s member projects are listed at plan time while the pool is armed, with the same Cloud Asset Inventory search the reconcile runs. They get their accounts on that apply and no drift audit-log sink (which projects get one is said above), and nothing else: the container’s grant and discovery stay zero-touch.
  • A project created under the folder between applies is discovered and gets its profile at the next reconcile, and every kubectl for it is refused until the next apply adds its account.
  • A project added to scope.projects gets its account on the apply that grants its roles.

The listing is one answer from an eventually consistent index with no grace at plan time. A project the index leaves out on one plan loses its account on that apply and gets a new one, under a new unique ID, on the next. So a project whose account must not move is pinned in scope.projects, and the plan warns when a container answers no member at all.

The identity that applies needs roles/cloudasset.viewer on the container for the listing, which the installer’s container preflight probes while the pool is armed. install.sh enables the Asset API in the host project before such a plan; an upgrade that adds the first container and arms the pool in one pass is refused at the plan with the enable command named. A cluster in a project with no account is refused rather than served by a wider credential, with a refusal naming the project and the cluster.

Upgrading an install that armed the pool under the per-cluster field. The CRD update prunes spec.security.scopedServiceAccounts from the stored PlatformAgent, scopedServiceAccountPool.enabled defaults to false, and the operator renders CREDENTIAL_PROXY_SCOPED_SA_POOL=0: every cluster read goes back to the agent’s own identity, which still carries roles/container.viewer, with no Event or condition saying so. An install that drives the kube-agents-iam module directly with scoped_clusters loses that variable, and its next apply destroys the per-cluster accounts. To stay armed across the upgrade, set scoped_pool_enabled (or SCOPED_SA_POOL_ENABLED=true) in the same apply, and expect new per-project accounts in place of the per-cluster ones. No known install had armed the pool.

The accounts are created in the host project, whose service-account quota is 100 by default and is shared with the agent’s own accounts and everything else there. scoped_pool_max_accounts is the bound you declare from the headroom that quota has free; its default is the quota itself, so a large pool at the default can still meet the quota mid-apply. The module refuses a plan whose derived set exceeds the declared bound, and an estate above the quota raises it first and the bound with it.

The narrowing that was to go with it is suspended. The agent’s own GSA was to drop roles/container.viewer whenever the pool was populated, keeping roles/container.clusterViewer — able to enumerate clusters and run get-credentials, unable to read anything inside one. The two changes are coupled because neither is safe alone: narrowing the agent while the pool grants nothing breaks every read, and arming the pool while the agent stays wide leaves the ceiling the pool exists to remove. Both are off, and a test holds the two halves together.

The module grants the agent roles/iam.serviceAccountTokenCreator on each pool member as a resource, never at project level. At project level that role would let the agent mint a token for any service account in the project, which would make the pool decorative.

The mapping reaches the broker through spec.security.scopedServiceAccountPool on the PlatformAgent CR: enabled, and one serviceAccounts row per project with its projectId and serviceAccountEmail. The operator renders the rows into the credential-proxy ConfigMap and sets CREDENTIAL_PROXY_SCOPED_SA_POOL on the broker container from enabled alone. That variable is written in both directions, so which credential mode an install is in is readable from the Deployment rather than inferred from what is absent.

What the pool does not cover. It scopes kubectl, and only kubectl, through the credential broker. gcloud also goes through the broker but stays on the agent’s own identity: it names its target in argv, and deciding scope from argv would put a parser where the boundary belongs. So does the forge work the version-control verbs ask the broker to do. The sandbox’s own git is local and holds no credential, and there is no gh in it.

The gke MCP server goes through the broker too, on the broker’s own credential rather than a pool member. What bounds it is the broker’s per-tool allowlist, which relays the server’s read-only tools only, and then the size of that grant. What bounds gcloud and the forge work is the size of the agent’s own grant, which is the other half of why roles/container.viewer was to come off it.

Independently of the GCP permission set, the operator grants the agent KSA a read-only footprint on the Kubernetes API, plus one namespaced housekeeping Role. It creates three bindings (see platformagent_manifests.go):

Binding Role Grants
kubeagents:minimal:<namespace>:<name> custom minimal ClusterRole Cluster-wide read access (get/list/watch) to audit resources (nodes, pods, deployments, configmaps, services, etc.; secrets only when spec.security.disallowSecretsRead is false or an existing install’s role already holds it), excluding cluster RBAC (while <agent>-kube-proxy strips Secret data fields). It also reads the GitOps reconcilers’ sync objects (Argo CD Applications, Flux Kustomizations and Git and OCI sources, Config Sync RootSyncs and RepoSyncs), whose inline Helm values and substitutions it can therefore read.
kubeagents:local:<namespace>:<name> custom namespaced Role Read access (get/list/watch) to PlatformAgent CRs in the agent’s own namespace only.
kubeagents:leader:<namespace>:<name> custom namespaced Role Housekeeping in the agent’s own namespace only: write on coordination.k8s.io leases (leader election), plus get/patch on pods only above one replica, which the operator does not render today.

For the default CR (platform-agent in kubeagents-system) the bindings resolve to kubeagents:minimal:kubeagents-system:platform-agent, kubeagents:local:kubeagents-system:platform-agent, and kubeagents:leader:kubeagents-system:platform-agent.

The Kubernetes minimal and local roles carry no write verbs (create, update, patch, delete) and grant no read access to cluster RBAC. On a new install, the minimal role omits secrets by default; an existing install keeps the secrets rule its role already holds. With spec.security.disallowSecretsRead: false, the role grants get/list/watch on secrets so <agent>-kube-proxy serves redacted Secret metadata while KUBE_PROXY_REDACT_SECRETS=true strips .data, .stringData, and kubectl.kubernetes.io/last-applied-configuration. (The GCP IAM read-only permission set independently provides cluster-viewer read via Cloud IAM for audits connecting through gcloud container clusters get-credentials.)

The kubeagents:minimal:<namespace>:<name> binding covers the agent ServiceAccount and the gateway ServiceAccount (<agent>-gateway-agent). Model-executing containers mount no default-audience token and reach the API server through <agent>-kube-proxy, while the broker command policy refuses Secret reads on /v1/exec and agent-api-auth uses its token only for event and CR watches. It also reads the cluster JWKS with it, to verify the broker’s token at the audit-report store listener. Set spec.security.disallowSecretsRead: true (--disallow-secrets-read=true in install.sh) to omit secrets, or false to add secrets on a new or upgraded install.

The only write grant anywhere in Kubernetes RBAC is the leader Role, and it is confined to the agent’s own namespace: leader-election leases, plus get/patch on pods there when the deployment resolves to more than one replica. The leader labels its own pod so the Service routes to it; at one replica that code never runs and the rule is not rendered. The count that matters is the effective one: the operator caps the gateway at one replica whatever spec.deployment.availability.replicas asks for (the ReplicasLimited condition reports it), and spec.deployment.scaleToZero: true resolves to zero, so no install renders the pods rule today.

The agent cannot modify Deployments, Services, or namespaces, and it cannot read Secret values. If a resource it proposes needs a Secret, it references the Secret by name rather than reading its contents.

Verify the bindings on a running cluster:

Terminal window
kubectl describe clusterrolebinding kubeagents:minimal:kubeagents-system:platform-agent
kubectl describe rolebinding -n kubeagents-system kubeagents:local:kubeagents-system:platform-agent
kubectl describe rolebinding -n kubeagents-system kubeagents:leader:kubeagents-system:platform-agent

The RBAC above is what the operator creates. Alongside it, two cluster-scoped ValidatingAdmissionPolicy objects reject some agent RBAC at apply time, whoever applies it. One source, k8s-operator/config/admission/agent-rbac-policy.yaml, and which installs apply it depends on how you install:

Install method Ships the policies?
The install engine — install.sh, or Terraform + Helm directly (Methods 0/1) Yes on Kubernetes 1.30+ — templates/agent-rbac-admission-policy.yaml, gated on admissionPolicy.enabled (default on) and on the cluster version.
Manual make install && make deploy (Method 2) No — apply the source yourself; INSTALL.md Method 2 Step 4 has the command.

They are outside the kustomize overlay on purpose: its namePrefix rewrites each policy’s name but not the spec.policyName its binding refers to, which would leave the bindings pointing at nothing and the policies inert with no error. A plain kubectl apply has no such transform.

They need Kubernetes 1.30 or later, where the policy API reached v1. The chart template checks the cluster’s version as well as the values gate, so on 1.29 it renders nothing rather than failing the install. That also means an install there is not backstopped at admission and nothing says so at the time.

What they govern is narrower than “agent RBAC”, and the gap is worth knowing before you rely on them. Policy 1 selects only objects carrying the kube-agents/tier label. Nothing the operator creates carries it — the operator stamps the four app.kubernetes.io/* labels and no tier — so on a default install with no GitOps overlay, policy 1 matches nothing at all. It is a backstop on the RBAC your overlay writes, not on the RBAC the operator mints. Policy 2 does see the operator’s kubeagents:minimal:* ClusterRoleBinding, whose subject ends in -agent, and deliberately exempts it: the operator has no namespace-tier path, so the one case policy 2 denies is one it cannot produce.

Policy Governs Denies
kube-agents-agent-readonly Role / ClusterRole labelled kube-agents/tier Any verb outside get/list/watch; any rule reaching secrets; a ClusterRole for the developer-team tier.
kube-agents-agent-binding-scope RoleBinding / ClusterRoleBinding whose subject is a *-agent ServiceAccount A ClusterRoleBinding to developer-team-agent.

What they do not cover, stated plainly because a backstop misread as complete is worse than none:

  • They cannot check the role a binding points at. CEL in a ValidatingAdmissionPolicy sees only the object being admitted, so an unlabelled write Role bound to an agent ServiceAccount is admitted. Closing that needs a cross-object webhook, which is not built.
  • The content policy is label-selected. kube-agents-agent-readonly only looks at objects carrying kube-agents/tier. A hand-written manifest that omits the label is not examined at all; pull-request review is what catches that. The binding-scope policy is not evadable that way: it keys on the ServiceAccount being privileged, which the binding cannot omit.
    • Nor is it evadable by adding something: its one exemption, for the operator’s own reconcile, matches on request.userInfo.username, which the API server fills in from the authenticated request and no manifest can carry. That distinction is load-bearing rather than pedantic: matchConditions are ANDed, so a false one drops the object from the policy altogether. An exemption an author could satisfy from inside the manifest would be a bypass of the whole rule rather than a carve-out from it.
  • Policy 2 denies exactly one ServiceAccount name. A cluster-scoped binding to any other agent ServiceAccount is admitted. Combined with the label point above, this means an unlabelled ClusterRole granting * on *, bound to the agent’s own ServiceAccount, is admitted by both policies on a default install. Pull-request review on the GitOps repository is the control for that, which is what the branch-protection guidance shipped with the example overlay is for.
  • Policy 2 only examines kind: ServiceAccount subjects. A binding whose subject is a kind: Group — system:serviceaccounts:team-x, say — is not selected. The subject is unforgeable for the kinds the policy looks at; choosing a different kind steps outside them.
  • They govern agent RBAC, not the operator’s own. The controller’s ClusterRole and Role below are unlabelled and out of scope by design.

The admission policy on the A2A gateway’s pods

Section titled “The admission policy on the A2A gateway’s pods”

The A2A gateway creates session pods (one per delegated task, or one per conversation on the session route), so its Role allows create on pods in its namespace. RBAC cannot limit what such a pod runs as. A third ValidatingAdmissionPolicy, kube-agents-a2a-gateway-pod, holds every pod the gateway’s ServiceAccount creates to the session pod shape:

  • It runs as the session ServiceAccount, <name>-a2a-session, which holds no RBAC.
  • automountServiceAccountToken is false, and its projected tokens are only for the bus and the credential broker’s session audience.
  • It mounts no Secret and no host path, uses no host namespace, host port or fixed node, and runs no init container.
  • It may read one Secret into its environment and no other: ANTHROPIC_API_KEY from key api-key of <name>-inference-key-a2a-session, the session’s inference key, not marked optional. No envFrom from a Secret. The name follows the gateway’s own, so one agent’s gateway can’t hand its session pods another agent’s key.
  • It meets Pod Security “restricted”: non-root, seccomp RuntimeDefault, no added capabilities, no privilege escalation, and no Unconfined AppArmor.
  • It carries exactly the session labels, so the session network policies select it and no other workload’s policies or Services do.
  • It leaves scheduling alone except for runtimeClassName: gvisor. Under gvisor, it also admits GKE’s injected sandbox.gke.io/runtime=gvisor node selector and NoSchedule toleration. No other runtime class, node selector, affinity, positive priority, scheduler, or toleration is allowed beyond what the API server and GKE add to every pod. A default PriorityClass with a positive value, a default GKE ComputeClass (which adds a node selector to every pod), or any other mutating webhook that adds a scheduling field, refuses every session pod.

The source is k8s-operator/config/admission/a2a-gateway-pod-policy.yaml. The chart installs it on the same terms as the two policies above: admissionPolicy.enabled and Kubernetes 1.30 or later. Method 2 applies it by hand. Where the chart installs it, the chart also sets A2A_GATEWAY_POD_POLICY on the operator. It is a signal for operator features that must run only where this policy is installed, and it says the policy was rendered, not that it still holds.

It does not cover an install where it is not applied: there, the gateway’s create on pods is as wide as its Role. It selects the gateway by its ServiceAccount name, <name>-a2a-gateway. Because it is a cluster singleton without per-install parameters, it permits both runtimeClassName: gvisor and an unset runtime class; a compromised gateway on a gVisor install could omit runtimeClassName to spawn an unsandboxed session pod. Custom runtime classes other than gvisor are denied unless the policy is customized or disabled.

The admission policy on the web console’s writes

Section titled “The admission policy on the web console’s writes”

The web console’s ServiceAccount holds get and patch on the PlatformAgent, and RBAC cannot limit patch to fields. A fourth ValidatingAdmissionPolicy, kube-agents-web-console-cr, refuses any update by that ServiceAccount that changes something other than the console’s own kubeagents.x-k8s.io/ annotations and spec.integration.forges, repositories and github. The rest of the spec, the chat integrations’ settings among it, and the labels, finalizers and owner references stay out of the console’s reach.

The source is k8s-operator/config/admission/web-console-cr-policy.yaml. The chart installs it with admissionPolicy.enabled on Kubernetes 1.30 or later, where the console and its environment page are on. It selects the console by its ServiceAccount name, <release>-web-console.

Inside forges, it keeps each existing forge’s host, port, scheme, provider, credentialsRef, caBundleRef and identity, and the namespace of a forge with a credentialsRef. A forge the console adds may carry no credentialsRef or caBundleRef, and a GitHub forge it adds must sit at a host a GitHub forge already uses. The install’s GitHub host, where the broker spends the GitHub App token, stays as it is.

While the declaration has a forge the operator refuses in a way that could move that host, the console may not change forges at all until an administrator fixes it. The same holds while GitHub forges name two different CA bundles, because the broker trusts the first one’s for that host. Adding a repository on a forge with a credential still widens the paths that forge’s token may reach.

The operator controller is a separate identity

Section titled “The operator controller is a separate identity”

Everything above describes the agent. The controller-manager that reconciles PlatformAgent CRs runs under its own KSA: kubeagents-controller on a kustomize install, <release>-operator-sa on a Helm install. Its permissions are the +kubebuilder:rbac markers in the controller. make manifests renders them into k8s-operator/config/rbac/role.yaml as two objects, which the chart copies: a ClusterRole, and a Role (kubeagents-manager-role under kustomize, <release>-operator-namespaced-role under Helm) bound in the install namespace and in the profile namespace (<install namespace>-profiles). Each marker carries the reason its rule exists; this section gives the same reasons in prose.

Every write verb on a namespaced kind is the Role, and the ClusterRole holds reads. The controller writes each kind it renders in two namespaces only: the namespace of the PlatformAgent it reconciles, which both install paths make the install namespace, and that namespace’s profile namespace. The Role carries create, update, patch and delete on every one of them. Those are Secrets, ConfigMaps, ServiceAccounts, Services, PVCs, Pods, ResourceQuotas, Deployments, StatefulSets, Jobs, Leases, NetworkPolicies, FQDNNetworkPolicies, PodDisruptionBudgets, Roles and RoleBindings, and the dispatcher’s DispatchJobTemplate params. It also carries create and patch on Events and the create-only dry run of PodTemplates. A RoleBinding binds it in each namespace, and the ClusterRole carries no write verb on any of them.

The read verbs (get, list, watch) stay in the ClusterRole, cluster-wide, for two reasons. The controller watches the rendered kinds it caches through cluster-wide informers for drift. And the agent’s minimal role above grants cluster-wide reads, which Kubernetes refuses to let a subject grant without holding them; Jobs, ResourceQuotas, Pods and Secrets, which the controller reads uncached or by name, keep their reads for that reason alone. No read verb is in the Role: a read there is refused wherever the Role is not bound, and the controller reads the dispatcher’s DispatchJobTemplate params in a profile namespace.

The controller itself reads Secrets by name only. Controller code never starts a Secret informer or lists Secrets, and tests/test_operator_secrets_grant.py fails if that changes; the same file pins the verb set of each document in role.yaml, and the chart’s copy is held to it by make chart-check.

The validating webhook, where it is enabled, refuses a PlatformAgent created in any namespace but the operator’s own, naming that namespace and this Role as the reason. One that exists in another namespace anyway, created while the webhook was off, needs the same Role and RoleBinding there and in <that namespace>-profiles. Without them its reconcile fails on the first write with forbidden, and the controller reports Degraded/RBACIncomplete on that agent naming the namespace. An update of it is admitted with a warning that names both namespaces. A profile namespace made by hand on a kustomize install needs them too; make deploy applies config/profiles, which carries them.

What the controller does with those verbs: on every install it reads the values of the Secret keys the agent pod consumes as environment. It digests them onto the pod template, so that rotating one rolls the pod (PlatformAgent CRD). Which Secrets those are is decided by the rendered pod spec, so a CR-supplied or plugin-supplied SecretKeyRef widens it to that Secret too. The digest is an HMAC-SHA256 keyed by the UIDs of the Secrets read, so the annotation cannot be used to verify guesses at a value. The controller also asks whether the shell sandbox’s authorized-keys Secret exists, without reading it, and it creates and renews the kube-proxy TLS Secret on every install.

The controller creates and repairs the Secrets it generates for the A2A stack: the NATS credentials, config and TLS certificates, the callout, task-signing and session-signing keys, the door and inject tokens, and the MCP access token. Every read is by name and uncached.

Every rule in the ClusterRole is there for one of four reasons. The custom resources (PlatformAgent, AgentPlugin and AgentProfile, with status and finalizer subresources where they have them) are watched and written in every namespace, because nothing fixes the namespace a CR is created in. The rendered kinds are what the controller creates for an agent, in the agent’s namespace or its profile namespace, and watches cluster-wide for drift; the ClusterRole holds their reads and the Role their writes. They are Deployments and StatefulSets, ServiceAccounts, Services, ConfigMaps, PVCs, Pods (the A2A session pods), NetworkPolicies and FQDNNetworkPolicies, PodDisruptionBudgets, leases, batch Jobs (the bus provisioning run), ResourceQuotas (the session-pod bound), and the agent’s Roles and RoleBindings.

The dispatcher’s DispatchJobTemplate (a fourth custom resource, written by the operator alone) is a rendered kind too: its get and list are in the ClusterRole like the others’, its writes in the Role. The create-only dry run of PodTemplates that defaults it is in the Role alone. Each verb the controller writes a custom resource with has a caller, and the controller never creates or deletes a PlatformAgent, so those two verbs are not granted. Events are create and patch in the Role, for the Warnings it records on the PlatformAgent (CRD reference).

The escalation-prevention reads are read-only grants the controller holds for the agent’s sake. Kubernetes refuses to let a subject grant a permission it does not hold, and the agent’s audit ClusterRole above grants cluster-wide reads, so the controller holds the same reads in order to apply that role. Those are nodes, namespaces, PersistentVolumes, pod logs, events (reads), Secrets (reads, as above), DaemonSets and ReplicaSets, metrics, HorizontalPodAutoscalers, CronJobs, Ingresses, RuntimeClasses and CRDs. The GitOps reconcilers’ sync objects are in the same set: Argo CD Applications, Flux Kustomizations and Git and OCI sources, Config Sync RootSyncs and RepoSyncs. tokenreviews: create is held for the same reason: the controller grants it to the split credential broker.

Four of these the controller also reads itself: a DaemonSet, by name, for its port; the callout’s ReplicaSets, listed in its namespace; PodMetrics (metrics.k8s.io), listed for sizingProfile: auto; and the Secrets named above, by name.

The controller’s own reads are the few it does by name or in one namespace. They are the agent namespace’s LimitRanges for sizing, the kubernetes Endpoints for the egress policy, a RuntimeClass to validate the sandbox’s, and a StorageClass (get only) to learn whether a data claim can expand. It also gets the A2A bus StatefulSet’s ControllerRevisions (get only) to tell which AgentProfiles every bus server has loaded. The dispatcher Job’s admission policy and its binding are read by name (get) to confirm they are in place. So are the AgentSchedule creator policy and its binding (kube-agents-agentschedule-creator), and the controller creates a SelfSubjectReview to learn its own username, the one identity that policy may exempt.

The RBAC rule is bounded by the escalation check, not by names. The controller holds every verb on ClusterRoles and ClusterRoleBindings, and unscoped list and watch on Roles and RoleBindings. It writes the per-agent objects named above: kubeagents:minimal:<namespace>:<name>, kubeagents:tokenreview:<namespace>:<name> and kubeagents:a2a-callout-tokenreview:<namespace>:<name> cluster-wide, plus the namespaced local, leader, gateway, callout, dispatcher and scope-publisher roles. Every name carries the agent’s namespace and name, so resourceNames cannot pin them, and the informers that watch them for drift need unscoped list and watch. What bounds the grant is the API server’s escalation check: no subject may author or bind a role conferring permissions it does not itself hold. The controller holds no escalate, the verb that waives the check.

One cluster-scoped permission reaches past that: bind on the built-in system:auth-delegator ClusterRole, granted by name. It lets the controller bind the A2A auth callout’s ServiceAccount to that role, which is what permits the callout to create TokenReviews and so validate the ServiceAccount tokens bus clients present. It ships on every install. bind is one of the three RBAC verbs that let a subject hand out authority it does not exercise itself (bind, escalate and impersonate). Held here in its resourceNames-scoped form, it permits granting that one role and confers none of its permissions on the controller.

It is needed because system:auth-delegator also carries subjectaccessreviews: create, which the controller does not hold; without bind the API server refuses the binding with attempting to grant RBAC permissions not currently held. Binding the role kube-apiserver ships is the conventional pattern for a TokenReview client and keeps the grant auditable by name. A narrower alternative, a controller-authored ClusterRole carrying only tokenreviews: create, is not what ships today.

The controller verifies at startup, and every five minutes after on its own ticker, that the roles bound to it grant every permission the markers declare. The namespaced write verbs are probed in its own namespace, in the namespace of every PlatformAgent it reconciles, and in that agent’s profile namespace once it exists; the rest cluster-wide. A shortfall is reported as a Degraded/RBACIncomplete condition on each PlatformAgent, the signature of an image deployed ahead of its manifests; the operator page has the cadence and the make deploy guard that prevents it. Verify the shape on a running cluster:

Terminal window
# The Helm install's controller; a kustomize install's is kubeagents-controller.
SA=system:serviceaccount:kubeagents-system:kube-agents-operator-sa
kubectl auth can-i create secrets --as="$SA" --all-namespaces # no
kubectl auth can-i create deployments.apps --as="$SA" --all-namespaces # no
kubectl auth can-i create secrets --as="$SA" -n kubeagents-system # yes
kubectl auth can-i create deployments.apps --as="$SA" -n kubeagents-system-profiles # yes
kubectl auth can-i get secrets --as="$SA" --all-namespaces # yes: the reads the agent's minimal role needs
kubectl auth can-i list deployments.apps --as="$SA" --all-namespaces # yes: the informers
kubectl get role,rolebinding -A -l app.kubernetes.io/name=kube-agents-operator

Unlike the agent, the controller has no GCP identity: no install path creates a controller GSA or Workload Identity binding for it.

The Vertex AI gateway is a separate identity

Section titled “The Vertex AI gateway is a separate identity”

With MODEL_PROVIDER=vertex_ai the LiteLLM gateway gets its own KSA (kubeagents-litellm) bound to its own GSA (kubeagents-litellm-gsa), holding exactly one role, roles/aiplatform.user on the serving project, and nothing else. It is deliberately not the agent’s identity: the gateway is a network-exposed proxy that forwards attacker-influenceable prompt content, so it is scoped to calling models and cannot touch GKE, logging, or the GitOps path.

With model_provider = "vertex_ai" the full-install composition instantiates the kube-agents-iam module a second time for the gateway (the GSA, roles/aiplatform.user on the serving project, and the Workload Identity binding), and the Helm chart renders the annotated KSA. Because the pair is Terraform-managed, switching away from vertex_ai removes it on the next apply and leaves no orphan. The exception is an install with VERTEX_MANAGE_SERVING_PROJECT=false, for a serving project the installing identity cannot administer: there the operator makes the roles/aiplatform.user grant by hand, Terraform never owns it, and the operator removes it.

On clusters without Workload Identity, a chart install can instead set litellm.vertex.credentialsSecretRef to mount a static GCP service-account key at /var/run/secrets/vertex/sa.json via GOOGLE_APPLICATION_CREDENTIALS. It can also set litellm.vertex.projectSecretRef for VERTEXAI_PROJECT, and the mounted key takes precedence over the KSA’s Workload Identity binding.

In that mode Terraform does not manage the key’s service account or its bindings, and nothing in the chart restricts what roles that account holds. The operator must mint the key for a dedicated service account holding only roles/aiplatform.user on the serving project (never the agent’s own GSA) and rotate or revoke the Secret when switching providers. Rotating the Secret does not roll the gateway; restart it with kubectl rollout restart deployment/litellm -n kubeagents-system.

The other providers give the gateway no GCP identity at all. It authenticates with an API key from platform-agent-secrets. For sap, any other LiteLLM provider slug and an openai_compatible gateway behind OAuth2 client credentials, it uses the contents of a Secret you create and name with --litellm-env-secret, which the install never creates, stores or rewrites (the credentials Secret). With openai_compatible the key is optional and is read from OPENAI_COMPATIBLE_API_KEY in platform-agent-secrets, and the gateway pod receives none of the Gemini, OpenAI or Anthropic keys, so nothing it sends to your server can carry one.

Cross-project Google Chat is an impersonated identity

Section titled “Cross-project Google Chat is an impersonated identity”

When CHAT_PROJECT_ID (chat_project_id in Terraform) names a project other than PROJECT_ID, the chat-pubsub module creates a dedicated service account kubeagents-chat-gsa@<chat_project_id>.iam.gserviceaccount.com in the Chat project. That account holds roles/pubsub.subscriber and roles/pubsub.viewer on the Chat subscription and no other IAM roles.

The module grants the Platform Agent’s GSA (kubeagents-platform-gsa@<project_id>.iam.gserviceaccount.com) roles/iam.serviceAccountTokenCreator on kubeagents-chat-gsa as a service-account resource, never at project scope. The operator renders spec.integration.googleChat.serviceAccountEmail as GOOGLE_CHAT_SERVICE_ACCOUNT on the credential broker Deployment (and drops it from the stateless exec tier), and the broker’s GoogleChatRelay mints short-lived tokens for kubeagents-chat-gsa scoped to https://www.googleapis.com/auth/chat.bot and https://www.googleapis.com/auth/pubsub. Because the Chat service account lives inside the Chat project, its outbound Chat API calls carry the Chat app’s owning project identity and its Pub/Sub subscription bindings stay inside the Chat project’s organization domain.

When CHAT_MANAGE_PROJECT=false (chat_manage_project = false), Terraform creates nothing in CHAT_PROJECT_ID. An administrator of the Chat project creates kubeagents-chat-gsa, the topic, the subscription, and the roles/iam.serviceAccountTokenCreator binding out of band (A Google Chat app in another GCP project or organization), and removes them when the install is retired.

Callers authenticate to the gateway by key. Its master key, in the litellm-master-key Secret the chart generates, is read by the gateway container alone and is the only key that reaches LiteLLM’s admin routes. Any other caller reaches the inference routes only, admitted as the caller class its key names, or as keyless when it sends no key or a placeholder; an unknown key is refused. Caller authentication has the rules.

The gateway is the one point every provider request transits, and the chart can make it redact those requests. litellm.redaction.enabled=true (LITELLM_REDACTION_ENABLED=true in install.env, or the Terraform example’s litellm_redaction variable) runs the shared AuditRedactor as a LiteLLM pre-call hook. It masks the built-in credential shapes and masks or pseudonymises IP literals and any operator-named identifiers before the body leaves the cluster. It is off by default, and it covers request bodies and, through the same switch, the files the agent writes to its volume (below). A pseudonymised identifier is one the agent can no longer act on; Inference gateway owns the rules, the actions and that limitation.

Egress when model data must stay off hosted providers

Section titled “Egress when model data must stay off hosted providers”

With MODEL_PROVIDER=openai_compatible every model request goes from the gateway to a server you run, and the gateway’s NetworkPolicy gains one rule, derived from that server’s URL. The rule names the server’s namespace on its pod port for an in-cluster Service, or the CIDRs you list on the URL’s port for a private address (Inference gateway has the forms). That keeps prompts off a hosted model. It does not make the install offline. A fully disconnected cluster is not supported: Google APIs have to be reachable, and Private Google Access is enough for that. Its private.googleapis.com and restricted.googleapis.com ranges are outside the private ranges the generated policies exclude, so their existing 443 rules already reach them.

What else leaves the cluster, and whether you can turn it off:

Destination Who calls it Required How to turn it off
Google APIs (container, developerknowledge, IAM and STS, Logging, Monitoring, and so on) The agent’s gke and developer_knowledge MCP servers, <name>-kube-proxy, the credential broker’s gcloud and kubectl, Workload Identity, GKE’s own agents Yes Cannot be turned off. Use Private Google Access.
The image registry The nodes, when they pull images Yes Mirror the images into a registry the nodes reach privately: Private / custom registry.
GitHub (github.com, api.github.com) The token minter and the broker’s version-control verbs, for GitOps on GitHub No Install without GitOps, or put the GitOps repository on a GitLab or Gitea instance on your own network (GitLab, Gitea).
Slack, Google Chat, Microsoft Teams The chat integrations No Leave them off (--enable-slack, --enable-google-chat and platformAgent.integration.teams.enabled unset). The agent is then reached from a terminal or through the A2A console (<name>-a2a-console, over kubectl port-forward).
Microsoft’s Bot Framework key endpoint (login.botframework.com) The Teams inbound receiver, for the keys it verifies Microsoft’s tokens with No Leave spec.integration.teams.inbound off; the receiver then does not run.
DuckDuckGo The agent’s web toolset (web.backend: ddgs), on in every profile except the Chat Agent’s No No install setting reaches them: toolsets come from the profile configs baked into the agent image. Add web to agent.disabled_toolsets in those configs and build your own image, or block the traffic at the VPC firewall. A blocked call fails that one tool call, and the agent carries on without it.
raw.githubusercontent.com LiteLLM, for its model-price table at startup No Not fetched with openai_compatible, which sets LITELLM_LOCAL_MODEL_COST_MAP=True. With other providers a failed fetch falls back to the table in the image.

The install itself runs from a workstation, not the cluster, and that machine reaches the internet for Terraform providers, the installer’s own tools and the cert-manager chart on charts.jetstack.io (SKIP_CERT_MANAGER=true skips that chart on a cluster that already runs cert-manager).

Each A2A session pod is its own bus identity

Section titled “Each A2A session pod is its own bus identity”

docs/designs/spec-nats-deployment.md is canonical for the identity map, the grant sets and how they are derived; this section is the summary.

The chatops gateway spawns a pod for a delegated task, which runs that one task, or for a conversation on its session route, which keeps one pod for the whole conversation. That pod takes each of the conversation’s turns, holds its bus credential the whole time, and is reaped at the idle TTL after the last user message, or at the 4-hour maximum lifetime. The idle TTL is 30 minutes by default, and 5 for a DM conversation with one message so far. That pod is where model output actually executes. Any other chat message is answered in the agent pod instead, as ChatOps describes.

The pod runs as <agent>-a2a-session, a KSA that holds no Kubernetes RBAC and no Workload Identity binding. The token exists so the message bus can be told who is connecting, not so the pod can talk to the API server or to GCP. A NetworkPolicy denies it the API server anyway, and automountServiceAccountToken is false so no default-audience token rides along beside the bus one.

Under the session pods’ cluster view (on by default on the session route, or with the operator’s A2A_SESSION_CLUSTER_VIEW=true) the pod also projects a second audience-bound token for <name>-kube-proxy and the credential broker. <name>-kube-proxy accepts that audience from <agent>-a2a-session under read-only-dry-run mode (get/list/watch with Secret redaction, plus server-side ?dryRun=All validation). The broker maps that audience to a session role that reaches its exec route for gcloud reads only and refuses every other route and executable. The pod still holds no API-server credential and the ServiceAccount still has no RBAC; the view is the proxy’s and broker’s, not the pod’s.

A session is limited to a small number of concurrent broker commands (CREDENTIAL_PROXY_SESSION_MAX_CONCURRENT_COMMANDS, default 2), so it cannot hold the command pool the platform agent’s shell shares. Under a custom IAM set with an admin role, <name>-kube-proxy’s read-only-dry-run policy and Secret redaction remain the boundary on session kubectl calls. The view is a temporary aid until the profile path replaces it.

Every connection to the bus’s client listener is TLS. The operator mints a CA and a serving certificate for the bus’s Service, the bus refuses a client that connects in the clear, and every client it renders trusts that CA through a ConfigMap carrying its public half. The console’s websocket listener serves the same certificate, and the console server dials it verified against that CA; the browser’s own leg to the console server is the kubectl port-forward tunnel. The certificates renew themselves; a renewal restarts the bus once a year. docs/designs/spec-nats-deployment.md has the certificate source, the rotation and what happens on upgrade.

Every session pod shares that one KSA, so the KSA alone cannot tell two conversations apart. What can is the pod.

The pod’s bus credential is a projected ServiceAccount token with a dedicated audience, which the kubelet binds to the pod it mounts it into. When the pod presents it, the bus’s auth callout runs a TokenReview, and the API server reports that pod’s name and UID in fields the client cannot set. The gateway names each pod after the conversation it spawned it for, so the attested pod name is the addressee. The permissions minted for the connection are built from that name: its own task’s events, its own three JetStream consumers, its own reply inbox. Nothing else on the bus, including the pods running beside it.

Two consequences worth stating plainly:

  • The model harness can read the credential, and that is accounted for. The session adapter is PID 1 and the harness is its child at the same UID, so anything the adapter holds — an environment variable, a mounted file — is readable through /proc. No amount of care in how the child’s environment is built changes that. What changed is not reachability but worth: the credential a harness can lift now authorises exactly the session it is already running as. Before this, every session pod held one shared password that could publish events for any addressee and read the whole task plane.
  • Revocation has two clocks, and the pod is only the first one. Deleting the pod stops the API server authenticating its token, so a new connection is refused. That is not instantaneous, but it happens within about forty seconds of a zero-grace delete. The API server stops vouching for the token about ten seconds after the delete, which is its own success cache. The bus’s auth callout then remembers a successful check for thirty seconds more, so a reconnecting fleet costs one check per token rather than one per attempt. Neither window is the token’s one-hour lifetime.
    • A connection that is already open is the second clock and a longer one. The callout signs the grants into a user JWT at connect and the bus holds them until that JWT expires, so deleting the pod does not close the socket. Reaping a session bounds its bus access at the grant TTL, not at the pod’s lifetime.
    • This matters much less than it would have before per-session credentials, since the grants a stale session keeps reach only its own already-dead task. But it is the real bound, and shortening it means shortening the grant TTL rather than reaping faster.

Four of the files a kanban worker writes to the agent’s volume are redacted inside the image, independently of that gateway switch. Upstream Hermes already formats agent.log through its RedactingFormatter and passes the terminal-output spill under cache/terminal-output/ through the same engine. The image adds the worker transcript, because a worker that hand-rolls an authenticated curl after a helper script fails otherwise leaves the access token there in plaintext for the hour it is valid.

The ya29. access-token shape is registered alongside the engine’s built-in credential prefixes, so a bare token is masked wherever the engine runs, not only inside an Authorization header. The 💻 $ completion line and the tool preview mask a terminal command or execute_code source before rendering it.

A worker’s stdout and stderr, which the dispatcher points at the board’s logs/<task>.log, are redacted line by line on the way to that file, and that redaction is forced: security.redact_secrets: false does not reopen it. It runs only in a process with HERMES_KANBAN_TASK set and a non-terminal stdout, holds a partial line until its newline, and does not see writes that bypass sys.stdout.

The audit file the tool_call_audit plugin and the chat_message_audit hook append to, logs/audit.jsonl under each profile, is redacted twice before the write. The emitters themselves run AuditRedactor over arguments, results and message text and a pseudonymised principal. Then the sink applies, as one line, the same engine RedactingFormatter runs, Hermes’ redact_sensitive_text, forced so that security.redact_secrets: false does not reopen it. The record no longer passes through Hermes’ logger, so the formatter itself is not in its path, and the same two layers cover the line an emitter prints to its stdout when the file cannot take it.

The operator’s rules, and the session store, follow the gateway switch. With litellm.redaction.enabled=true the chart projects the gateway’s redaction.yaml into the agent pod read-only at /etc/kube-agents-redaction/redaction.yaml, and the file’s presence there is the switch. The operator admits no path-valued variable through spec.deployment.env into the agent container, and the agent cannot write under /etc.

The image then runs the operator’s IP and named-identifier rules after the credential masking above in every file that masking reaches. It also redacts, through the same forced redactor, what Hermes persists to state.db (message content, reasoning and tool calls). The same applies to what the kanban board stores: a card’s title and body, a worker’s result and summary, a comment’s body and a block’s reason. Each process reads the rule file once at start: a long-lived process keeps the rules it started with while each new worker process reads the current file, so roll the pod to move them all.

A file that does not parse stops the process at import, as it stops the gateway. The image parses it with the grammar it shipped with, so keep the chart and the agent image at one version when the switch is on. With the switch off, the default, state.db and the board are written as before: a command that carried a token is still there verbatim after the transcript has masked it. Nothing already on a volume is rewritten either way, and the OTel plugin’s live.db is not covered.

A session pod writes its own state.db and agent.log to an emptyDir that lives as long as the pod. The gateway builds that pod itself and does not project the rule file into it, so only the image’s credential masking applies there.

read-only is the install default, so a fresh install already runs in this posture. To pin it explicitly, or to bring a deployment provisioned with the removed gke-admin set back to it:

  • With the installer (recommended) — accept the default option in its permission-set menu, or pass it explicitly (a re-run reconciles the change through one terraform apply):

    Terminal window
    curl -fsSL https://raw.githubusercontent.com/gke-labs/kube-agents/<RELEASE_VERSION>/install.sh | bash -s -- \
    --permission-set=read-only
  • With a hand-driven Terraform composition — set permission_set = "read-only" in terraform.tfvars and apply.

  • On an existing GSA provisioned with the old gke-admin set — re-running the install will not strip roles it no longer grants, so swap the admin roles for viewers by hand:

    Terminal window
    PROJECT_ID="your-gcp-project-id"
    GSA_EMAIL="kubeagents-platform-gsa@${PROJECT_ID}.iam.gserviceaccount.com"
    # Remove the admin roles
    for role in roles/container.clusterAdmin roles/container.admin roles/monitoring.admin; do
    gcloud projects remove-iam-policy-binding "${PROJECT_ID}" \
    --member="serviceAccount:${GSA_EMAIL}" --role="${role}"
    done
    # Add the read-only roles -- all twelve, not just the three removed above.
    # add-iam-policy-binding is idempotent, so naming one the GSA already holds
    # costs nothing.
    for role in roles/container.clusterViewer roles/container.viewer roles/compute.viewer \
    roles/monitoring.viewer roles/logging.viewer roles/gkehub.viewer roles/recommender.viewer \
    roles/cloudtrace.user roles/iam.serviceAccountUser roles/iam.securityReviewer \
    roles/mcp.toolUser roles/serviceusage.serviceUsageConsumer; do
    gcloud projects add-iam-policy-binding "${PROJECT_ID}" \
    --member="serviceAccount:${GSA_EMAIL}" --role="${role}"
    done

    The twelve are local.read_only_roles in terraform/examples/full-install/main.tf.

The Kubernetes RBAC above is already read-only in every mode, so no cluster-side change is needed. Neither is the GitOps path affected: the agent proposes pull requests under every permission set, because what makes it propose rather than apply is Kubernetes RBAC, not the IAM set.

Because the agent’s Kubernetes RBAC is read-only, remediations are proposed rather than applied:

  1. The agent invokes the submit-suggestion skill with a proposed diff — or, for a scheduled fleet audit, the fleet-audit skill with a validated findings file.
  2. The skill’s helper commits to a topic branch and asks the credential broker to publish it; the broker — not the helper — calls Minty for a short-lived GitHub App token.
  3. A Pull Request is opened against your GitOps repository. fleet-audit publishes its report as one GitHub issue per audit stream — the ledger, rewritten in place each run — and opens a narrow Pull Request only for a finding whose fix is a manifest, linked back to that ledger. One more machine-owned issue exists. chat-delivery-watch, a scheduled script with no model in the loop, opens, edits and closes a single issue labelled agent:delivery-watch in that repository (or the one CHAT_DELIVERY_LEDGER_REPO names) when scheduled reports stop reaching chat. It creates that label if it is missing; the relay design has the reasoning.
  4. A human reviews and merges; a GitOps controller (Argo CD, Flux) reconciles the change into the cluster.

Onboarding opens one more machine-owned issue. When nobody has written to the agent in chat a day after its first inventory sweep, the delivery stage files the first-run report once, as an issue labelled agent:onboarding. It goes to that repository when it is on GitHub, or else to the install’s one managed GitHub repository (or the one ONBOARDING_LEDGER_REPO names). That stage is a script with no model in the loop. It creates the label if needed and never rewrites the issue; the onboarding design §3 has the timing.

Both paths share the same guardrails. The helper stages the paths it is named, or, named none, only files the working copy already tracks, never git add . or git add -A, and pushes to main, master, and production are hard-blocked. The submit-suggestion path carries one the audit path does not: a file the agent never staged itself is refused by name rather than swept into the change.

A gitops or managed repository that sets baseBranch adds that branch to the blocked pushes and pins that repository’s pull requests to it. The credential broker refuses one opened onto any other branch, and pull requests opened before the field was set keep their base. The only branch the version-control verbs will delete is a spent one of the agent’s own: under platform-agent/, with no open pull request, and still at the revision a closed or merged pull request from the same repository carried. That means one this install opened, whenever its credential can name its own login.

The agent never has direct write access to running infrastructure — see Declarative workflow.

Set KUBEAGENTS_WRITE_MODE to none to stop the agent proposing changes. Set it in the chart value platformAgent.deployment.env (on the Terraform install, through extra_helm_values); edit the PlatformAgent’s spec.deployment.env directly only on an install without the chart, because a chart apply can replace that list. A change applies once the operator has rolled the broker, the one component that reads it; the gateway Pod rolls with it.

At none the credential broker refuses every branch push and branch delete and every pull request write, including comments and reactions, with the code WRITE_MODE_NONE, and the refusal tells the agent the install is explain-only. Issues and reads are unaffected, so an audit still publishes its report issue. Unset or propose is the default: the agent pushes branches and opens pull requests. Any other value is treated as none.

With KUBEAGENTS_DIAL set to on, the broker also reads the autonomy dial’s level, and the stricter of the two applies: at Explain the broker refuses what none refuses, and the refusal’s detail names the dial. The broker keeps the last level it was given for as long as its Pod lives; a new broker Pod, which every operator roll makes, reads Explain until it is given one.

The level is set through the broker’s POST /v1/dial route, which only the agent Pod’s chat role may call, so no command the agent runs in the sandbox can move it. Per-kind, per-repository clean-merge track-record summaries are reported to POST /v1/track-record under the same chat-role-only guard, and the broker deterministically stamps (or strips spoofed) track-record lines directly on fix pull request bodies on the forge. Below Auto-merge proven fixes the broker also withholds the kube-agents/auto-merge commit status and refuses any write that adds the kube-agents:auto-merge label, with the code DIAL_AUTOMERGE_OFF. session-kv reports the stored level (defaulting to Propose fixes) on startup and every minute while KUBEAGENTS_DIAL is on, and the Slack Home tab raises or lowers it.

  • No direct cluster writes. Enforced by RBAC (above) and by the persona’s automation-first stance — the agent does not kubectl apply; a change you asked for becomes a pull request, and a diagnostic request gets its fix in the reply rather than on your repository. On an explain-only install the broker refuses that pull request. See Platform Agent and Declarative workflow.

  • No merging its own work. The agent may open pull requests, issues, and comments; the proxy refuses the verbs that would let it merge, approve, trigger a pipeline, or administer the repository. This is what keeps the review gate a gate rather than a convention. See Credential isolation.

  • The sandbox’s native CLIs reach nothing. helm, yq and OpenTofu’s tofu run natively in the sandbox, outside the command and kube-proxy policies that govern gcloud and kubectl. They hold no credential, so helm install has no cluster to talk to and tofu plan or apply has no cloud identity. Where the sandbox’s NetworkPolicy is enforced it allows only DNS, <name>-kube-proxy, and the credential broker out, so tofu init cannot download a provider plugin either. On a cluster without a NetworkPolicy implementation that policy is inert (Credential isolation), and the skills’ own rules are what keep the agent to tofu fmt. The agent uses tofu only for its fmt subcommand (tofu fmt -check -diff, then tofu fmt), which needs neither.

  • No credential in the sandbox but the broker’s token. API keys, chat tokens and the cloud identity live in the credential broker Pod; the sandbox’s one ServiceAccount token is bound to the broker’s audience, which only <name>-kube-proxy and the broker accept. The agent container has no gcloud, kubectl, gh or git at all. The sandbox Pod gets a broker wrapper for gcloud, routes stock kubectl through <name>-kube-proxy, reaches repositories through the broker’s verbs, and keeps a credential-less local git.

    • The sandbox files a confirmed report about kube-agents itself through the broker’s feedback verb: the public form needs no credential, and the broker reads the public tracker to find the issue. This is the sandbox’s one write to a public destination, bounded as Credential isolation describes.
    • One carve-out: the agent container carries a bus credential of its own, an audience-bound ServiceAccount token projected into the container. Beside it sit NATS_URL and A2A_BUS_USER, naming the principal it authenticates as, and NATS_CA_FILE, naming the CA it trusts the bus by. No password: the bus resolves the token through an auth callout. All three env names are appended after the plugin env merge and blocked from spec.deployment.env by SensitiveEnvVars; the credential appears and disappears with the A2A stack, and the sandbox Pod never gets it.
    • From the other direction, the reservation has two halves. By source, two shapes of user-authored volume on extraVolumes or sidecarVolumes are refused. The first is a projection of the a2a-bus audience under any name, which would hand a second container this same token. The second is a secret volume or projected secret source naming one of the seven <agent>-a2a-* Secrets. Those carry the $SYS password, the callout issuer seed, the bus’s TLS keys, the dispatcher’s task-signing seed and the gateway’s session-signing seed rather than this token. Only those two source fields are matched, the ones that mount a Secret into the container; a csi.nodePublishSecretRef hands it to a node plugin instead and is not matched.
    • By name, a2a-bus-token is reserved across all five user-authored volume and mount fields, and the mount half is the one that matters most. A sidecars[].volumeMounts, initContainers[].volumeMounts or extraVolumeMounts entry naming the operator’s own rendered volume is a second workload wearing the agent’s bus identity, and it needs no user-authored volume at all. On an install running the A2A surface the render drops the same entries again, plus any mount naming a volume the source half already dropped. See PlatformAgent CRD § Reconcile behavior. That is a guard against a misconfigured CR rather than a boundary: ServiceAccount tokens are pod-scoped, so a container already running in that Pod is not held out by it.

    This is a filesystem, environment and identity boundary for the Pod that runs model-authored code, and for the gateway. Everything the agent executes runs in the <name>-shell Pod, whose ServiceAccount carries no iam.gke.io/gcp-service-account annotation, so the link-local metadata server at 169.254.169.254 answers it with a principal IAM grants nothing. The gateway Pod runs as <name>-gateway-agent, which carries none either, and its NetworkPolicy does not open the metadata path. The Workload Identity-annotated ServiceAccount is the credential broker’s alone. What each control costs and what is still open are on Credential isolation, which owns the topic.

  • Cloud API reads go through the same broker. A script in the sandbox that needs a Cloud Monitoring, Managed Prometheus, Cloud Trace, Cloud Billing Catalog or GKE cluster read sends GET /v1/gcp/<host>/<path> to the credential broker. The broker checks the host, method and path against the read-only allowlist in agents/platform/scripts/api_policy.py, forwards it on its own identity with only its own headers, and returns the upstream response unchanged. The one edit is that a GKE cluster answer is cut down to each cluster’s name, location, status and id. Token endpoints are refused before the table is read, redirects are not followed, the route is open to the shell role only, and a refusal is a 403 naming a gcp.api.* rule.

    • A read of one project’s log entries is the one POST: the broker checks its JSON body and forwards its own copy of it.
    • Widening the table is a pull request. The table holds Monitoring timeSeries and metricDescriptors, Managed Prometheus queries, Cloud Trace traces, Cloud Billing Catalog services and skus, GKE clusters, and Cloud Logging entries:list. The design and its security review are in designs/gcp-api-relay.md.
  • A shipped skill cannot be rewritten through the agent’s own tools. The agent’s own skill_manage tool refuses every write action that would touch a skill the image ships for that profile (a stat on the read-only template tree, per profile). The file tools (write_file, patch, delete_file, move_file) refuse any target under a profile’s skills/ or scripts/ tree. So the gateway’s copy of a shipped skill, the one the prompt reads, cannot be rewritten from the agent’s tools between two restarts. That is where an agent that hits a gap in a skill would otherwise patch its own instructions.

    • The shell sandbox’s copy of the same trees is root-owned and mounted read-only in the sandbox Pod, so what runs there cannot rewrite it either. That covers a shell command, execute_code, or a file tool writing through a symlink made in the sandbox, which the gateway-side guard cannot see (Agent shell sandboxing).
  • The prompt material baked into the image is the material it was built with. A SKILL.md is instructions the agent follows, a SOUL.md is the persona it follows them as, and a skill’s scripts/*.py runs with the agent’s credentials, so all three are part of the trust boundary. Ownership is the barrier: the trees below are root-owned while the agent runs as uid 10000, so the agent cannot rewrite what the entrypoint installs into every profile on the next boot.

    • The image’s specialist templates: /opt/platform-template, /opt/cluster-template, and /opt/tse-template in full, persona, config and skills alike.
    • The shared skill tree at /opt/hermes/skills.
    • The Hermes plugins at /opt/hermes/plugins, Python imported into the agent’s own process.
    • The shared scripts at /opt/defaults/scripts, which include the manifest checker itself, in the sidecar as well as the agent container.
    • The Chat Agent’s config template at /opt/chat-template, which every boot back-fills absent keys into the live default profile from.

    That sits beneath readOnlyRootFilesystem, which the operator already sets on every container it builds. Ownership is what still holds for the image run outside this operator, for a container given a writable root filesystem, and during the build itself. A build-time manifest is the detection half: the build writes a SHA-256 of every file in each baked skill tree into that tree, and the entrypoint re-checks it at startup before any of it is copied to a profile. Container entrypoint is canonical for what happens when it does not match. The personas, plugins, shared scripts and config template get the barrier but not the hash: they are covered against the agent, not against a corrupted layer.

    What this does not cover:

    • the per-profile copies on the agent’s $HERMES_HOME volume, legitimately rewritten after the copy by profile scaffolding and by the hourly cluster reconcile, so they have no fixed checksum to compare against;
    • the rest of /opt/defaults, the Chat Agent’s own default profile, which stays agent-owned and is still read back from the image after the boot copy. cron/jobs.json is read by the cron reconciler, plugins/ by profile scaffolding and by the OTel config generator, and onboarding/ by the onboarding plugin;
    • the rest of /opt/hermes (gateway/, tools/ and the venv interpreter), whose ownership comes from the Hermes base image and which this build does not assert;
    • skills a plugin brings in, which arrive from an OCI image rather than this one;
    • tampering by anything running as root inside the pod.

    The first three are residue that only the read-only root filesystem closes. Read it as an integrity check on the image, backed by an ownership barrier, and not as a runtime sandbox.

  • Network isolation and egress boundaries. The Platform Agent is protected by NetworkPolicy objects the operator renders, among them *-gateway-netpol over the agent Pod, <name>-credential-proxy over the broker and <name>-shell over the sandbox; no static copy of any of them ships:

    • Ingress: Restricted to essential Hermes API (8642), Envoy Credential Proxy API (8643), and conditionally dashboard (9119) ports from pods within the agent’s own namespace (podSelector: {}). Two metrics ports are also open: the event watcher’s Prometheus metrics port (9095) and the chat plugin’s (9097), from pods in the gke-gmp-system namespace, where GKE Managed Prometheus’s collectors run, and from the operator’s own pods (its namespace and app.kubernetes.io/name: kube-agents-operator). The operator reads the watcher’s accepted-event counter and per-cluster up gauge, and the chat plugin’s inbound-message counter, into status.usage.
      • On every install, with the A2A stack, a rule in *-gateway-netpol admits the credential broker’s Pods, and nobody else, to the audit-report store listener on 8700 in agent-api-auth. It is a rule in the gateway policy rather than a policy of its own, so an operator rollback drops it rather than leaving a policy behind. spec.networkPolicy.enabled: false removes it with that policy, and the listener’s own token check (audience, issuer, the broker’s ServiceAccount and a broker Pod’s name) is then the whole control.
      • The watcher’s listener serves /metrics and /healthz unauthenticated; its series carry cluster, project, location, namespace and event-reason labels and no pod names or event text, the same class of exposure as the LiteLLM gateway’s /metrics. The chat plugin’s serves /metrics alone, also unauthenticated: one counter under a closed platform vocabulary and the process start time, no sender, text or space. The rule is rendered whether or not the chart’s PodMonitoring for the gateway pod (platformAgent.podMonitoring) is, so that switching the scrape off is the one thing that stops it.
    • The credential broker’s own policy (<name>-credential-proxy, ingress only) admits the sandbox, the gateway, the A2A gateway, and (unless operator.mcpServer.enabled is false) the A2A MCP server’s pods on the credentialed port 8765. Under sizingProfile: auto in-cluster it also admits sibling broker pods on 8765 so warm-standby pods can check active peer health on /healthz. On port 8766, it admits the gke-gmp-system namespace and the operator’s own pods for unauthenticated /metrics; /control/* endpoints (bearer-authenticated against <name>-credential-proxy-control) are enabled only under sizingProfile: auto in-cluster and return 404 otherwise. Credential isolation is canonical for that pod and lists the peers that join the credentialed port under a condition.
      • Above one replica the agent’s own Role would hold get and patch on the pods of its namespace, which on a chart install is the operator’s, so it could label a pod to match the operator’s selector. The operator runs the gateway as a single replica today, so no install renders that grant. Where one did, it would gain /metrics on the watcher, chat plugin, and broker ports (8766 still requires the operator’s bearer Secret for /control/*). Those counters are integers under closed label vocabularies and nothing else, and the collector never has a route to 8765.
    • The exec tier’s policy (<name>-credential-proxy-exec-tier, ingress only, rendered when spec.deployment.credentialProxy.exec.replicas is above 0) admits the sandbox, the session pods under the cluster view and the profile namespace on 8765, and the same metrics readers on 8766. The gateway and the agent pod have no route to it. Credential isolation is canonical for those pods.
    • Egress (Internal Services): DNS on TCP/UDP port 53 to CoreDNS/NodeLocal DNS pods, the cluster’s DNS ClusterIP, and the metadata address 169.254.169.254/32. On a Cloud DNS for GKE cluster that address is the resolver rather than kube-dns; Credential isolation is canonical for why a resolver peer at a metadata address reaches no token. The operator does not detect Cloud DNS, so the resolver peer is unconditional. The metadata server’s credential ports (80, and the Workload Identity daemon’s 988) are not allowlisted: the gateway Pod holds no Google identity.
      • The DNS ClusterIP is the one discovered from the kube-system/kube-dns Service (or set by annotation, the typed field or the operator environment). The classic 10.96.0.10/32 is rendered only when discovery and every override yield nothing, because a fixed literal cannot know which ClusterIP a cluster’s service range yields (newer GKE clusters allocate from public space, e.g. 34.118.224.0/20).
      • Also allowlisted: LiteLLM Gateway and Standalone Replay pods (app: litellm and app: standalone-replay on TCP ports 80, 4000, and 8080), vLLM inference servers (app: gemma-server on TCP ports 80 and 8000), and GitHub Token Minter pods (app: github-token-minter on TCP port 8080).
      • When the agent is exporting telemetry, the resolved collector’s namespace on TCP ports 4317/4318 (gke-managed-otel by default). The operator omits that rule entirely when status.telemetry.otlpEndpointSource is None, meaning discovery found no collector and the agent exports nothing.
      • One further rule covers the Hindsight memory API (app.kubernetes.io/name: hindsight and app.kubernetes.io/component: api on TCP port 8888, so it does not also reach the Postgres pod, which carries the same name label). It is rendered unconditionally and matches no pod on an install that did not choose a Hindsight-backed memory provider.
    • Egress (Control Plane, Fleet & External): Allowlisted to the internal Kubernetes Control Plane API server: the resolved control plane endpoints, falling back to 10.96.0.1/32 when discovery yields nothing, on TCP ports 443/6443/8443. Remote private fleet cluster CIDRs and PSC endpoints are configured via kubeagents.x-k8s.io/apiserver-cidr / kubeagents.x-k8s.io/custom-egress-cidrs. External HTTPS destinations are 0.0.0.0/0 and ::/0 on TCP port 443, excluding 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 and 169.254.0.0/16, and fc00::/7, fe80::/10 and ff00::/8, to block internal lateral movement. The rule is omitted when an FQDNNetworkPolicy is applied in its place.
    • The operator’s own policy (<release>-operator-netpol, chart-rendered, ingress only) admits the gke-gmp-system namespace, and platformAgent.monitoringScraperNamespace when set, on the manager’s plain-HTTP metrics port 8080, and nothing else on that port. There it serves every PlatformAgent’s status.usage and status.phase as gauges (Observability). The health port 8081 stays open for the kubelet’s probes, and the webhook port 10250, when the webhooks render, for the API server. Rendered with the listener, behind operator.metrics.enabled.
    • Defense-in-Depth Layering: Environments requiring stricter egress control over HTTPS (443) should combine this with Private Google Access / VPC Service Controls CIDR blocks or FQDN-based egress filtering (e.g., FQDNNetworkPolicy on Dataplane V2).
    • Everything in this bullet assumes the cluster enforces NetworkPolicy. On a cluster with neither Dataplane V2 nor the Calico addon, every policy named here is accepted by the API server and enforced by nothing. The installer refuses such a cluster unless told to enable Calico or to install without enforcement; an install made through the Terraform composition that chose the latter carries kubeagents.x-k8s.io/network-policy-enforcement: absent-accepted on the PlatformAgent. The annotation records that choice, and the operator reads it: the A2A console requires NetworkPolicy enforcement, so no A2A console runs while it is set. Whether the cluster enforces today is the cluster’s own datapathProvider and networkPolicy.enabled, which the prerequisites table shows how to read. Installing without NetworkPolicy enforcement lists what is unenforced.
    • How the egress boundary can move. Three PlatformAgent spec fields move it from the CR:
      • spec.networkPolicy.enabled: false stops the operator generating a policy at all and deletes the policies it manages (<name>-gateway-netpol, <name>-fqdn-netpol, and litellm-policy when LiteLLM is present). That leaves the agent and LiteLLM pods with whatever egress the cluster’s other policies allow. The NATS ingress policy is not governed by this flag.
      • spec.networkPolicy.additionalEgress appends caller-supplied CIDR and port rules to the generated policy, bounded at 32 rules and by a /12 (IPv4) / /48 (IPv6) prefix floor.
      • spec.security.egressAllowlist (live only behind egressPolicy: Allowlist and the split broker) adds extraRules to the second policy selecting the same pod. It is metadata-guarded and refused loudly when a rule reaches a metadata address, but has no width floor of its own (see Credential isolation).
      • That floor bounds how wide a peer range may be, not which host it reaches. 169.254.169.254/32 clears a /12 trivially, so a rule can put back the ALTS DirectPath port 8080 that the metadata rule omits, and 10.0.0.0/12 on 10250 reaches every kubelet in that range. A rule that omits ports altogether opens every port to its peers.
      • All three are PlatformAgent spec fields, so write access to the CR is write access to the egress boundary; treat it the way the AgentPlugin note below asks you to treat plugin creation. The agent cannot take that route against itself: its own ServiceAccount holds get, list, and watch on platformagents and no write verb.
      • A fourth route is dynamic discovery, for litellm-policy only (the gateway policy opens no metadata path): its metadata-daemon port is resolved by the operator from the kube-system/gke-metadata-server DaemonSet (defaulting to 988, with non-standard ports logged). Write access to that DaemonSet is confined to cluster administrators with kube-system privileges; the agent’s ServiceAccount has no permissions to modify DaemonSets. See PlatformAgent CRD.
  • One agent per cluster, in the operator’s namespace. The admission webhook rejects a second PlatformAgent CR in the same cluster, so a cluster can’t accumulate agents with overlapping scope, and rejects one created outside the operator’s namespace, where its write Role is bound. See PlatformAgent CRD.

  • Human sign-off for destructive ops. Cluster deletion, tenant offboarding, and broad IAM revocation always require explicit human approval, regardless of any “just do it” phrasing.

  • Unattended runs waive the prompt, not the checks. approvals.cron_mode: approve skips the interactive approval prompt for scheduled runs, because no human is at the keyboard to answer it. The hardline floor (rm -rf /, mkfs, fork bombs, and nine more), the sudo-stdin guard, and any approvals.deny globs still apply. A low risk job has no content check beyond these and the cron risk gate below: a command that pipes a download into a shell, or names a host with look-alike Unicode letters, runs unprompted.

    • In addition, the cron risk gate refuses two content evasions. Raw terminal escape and C0/C1 control sequence injection (_ESC) and pure-ASCII lookalike TLDs (e.g. kubernetes.io.evil-cdn.co) are refused unconditionally. execute_code is unconditionally blocked during cron runs so autonomous watchdogs cannot reach subprocess via embedded Python. Agentic jobs declared as "high" risk on the roster (as well as unannotated dispatches, defaulting fail-closed to "high") apply a fail-closed read-only command policy (cron_command_policy_block). It requires every command segment to be an allowlisted inspection command and refuses mutating verbs, chained commands, substitutions, or file writes. low risk retains the configured cron_mode (denylist-only floor).
    • The Planning Agent also cannot execute code: code_execution is in its disabled_toolsets. These command-execution gates apply to agentic cron runs, where a model chooses commands through the tool surface. The no_agent pollers below run no agent loop and issue no tool calls, so their risk tier is an input classification, not a command gate. See Autonomous watchdogs.
  • A pull-request comment can wake the agent, and write access is what decides whether it may. github-repo-watcher polls the agent’s own open pull requests and spawns a worker turn when a comment addresses it with /agent … or an @-mention. That is unattended ingress from a thread anyone with a GitHub account can write in. So the trust decision is the commenting account’s write access to the repository, resolved by the forge, and re-checked by the worker before it posts rather than left to the prompt. A comment from anyone else cannot direct the agent, but it is not kept away from the model either, and that distinction is the one to hold on to.

    • Such a comment normally earns one canned refusal posted by the sweep, with no worker turn spent. Refusals are bounded at PR_AGENT_MAX_PER_TICK (3) a tick and PR_AGENT_MAX_REFUSALS_PER_PR (10) a pull request, past which the refusal is dropped rather than posted, silently, and in the per-pull-request case for good. A request the per-tick cap dropped is still unanswered, so it reaches the worker on a later dispatch; the only verdict available to it there is the same refusal.
    • Untrusted comment text reaches the model routinely: the whole thread travels with any request on that pull request, because a question is only answerable against the discussion around it. An untrusted account can therefore put words in front of the model. What it cannot do is make the agent act on them. An unresolved permission lookup is held for the next tick rather than treated as either answer, and cannot be refused at all: a refusal is permanent, and a proxy fault must not silence a maintainer.
    • Three things bound the blast radius even for a trusted reviewer. The request runs within the authority the agent already has and cannot widen it, redirect it at another repository, or overturn a refusal. A change goes on that pull request’s own branch through the same submit-suggestion path and its guardrails, never to main and never as a second pull request. And agent:ignore on a pull request stops the agent posting there at all.
    • Comment text is data, never instruction. docs/designs/pr-comment-conversation.md is canonical for the trigger grammar, the marker scheme, and the per-tick and per-pull-request bounds.
  • An issue can wake the agent too, and its text is sanitized before the model sees it. github-repo-watcher polls unaddressed open issues and files a card that dispatches github-issue-resolver. Anyone with a GitHub account can open an issue, so the title, body, and every comment are unattended ingress on the same footing as the pull-request thread above, but the handling differs. resolver.py strips control, zero-width, and bidirectional characters and rewrites counterfeit delimiters before wrapping the text in <untrusted_title> / <untrusted_body> / <untrusted_comment> boundary tags, so the demarcation is enforced in code rather than asked for in a prompt.

    • An issue that asks the agent to change something is escalated to status:escalation-needed rather than acted on. But that is the agent’s reading of the issue and nothing grades it for them; what actually confines the resolver is that its investigation step is read-only and its only writes are a comment and a label. Issue text is data, never instruction. agents/platform/skills/github-issue-resolver/SKILL.md is canonical for the boundary rules.
  • stall-watch reads the controller status and event text of every cluster with a Cluster Agent and hands a stall to that agent through an alert. Every thirty minutes a no_agent script runs the Cluster Agent’s stall_report.py, through the shell sandbox, over the non-system namespaces of every running or reconciling cluster that has a Cluster Agent profile. Those clusters are in the management project or in any other project a Cluster Agent profile’s identity names (one spec.scope brought in, or one manage-cluster onboarded directly).

    • The read covers every cluster in the resolved scope that isn’t excluded, with or without a Cluster Agent profile. That’s the member projects the scope publisher lists, plus the management and explicit projects, listed live. A stall on a cluster with no profile raises no alert. It’s said once in chat, by cluster name, while it stays stalled.
    • The management cluster is included unless spec.scope.exclude.clusters (or, for one more release, RECONCILE_EXCLUDE) names it, in which case the watch neither reads it nor alerts for it. So the exclusion keeps every model turn off that cluster rather than moving one to another profile.
    • The watch also does not read a namespace that spec.harness.stallWatch.excludeNamespaces names or that carries the annotation kubeagents.x-k8s.io/stall-watch: exempt, and the same annotation on an object leaves that object’s rows out of the alerts (spec.harness.stallWatch). Anyone who can patch a namespace or an object can set that annotation. So on a shared cluster a tenant can silence the watch for its own objects, and so can the agent where its permission set lets it patch them.
    • For a Gateway it reports as not programmed, the script also reads the GatewayClass and the Deployments labelled as the Gateway’s proxy, so a gateway switched off on purpose is not reported. It reads them in the Gateway’s namespace and, for Envoy Gateway, in envoy-gateway-system.
    • The tick issues no model-chosen command: the kubectl reads are fixed by the script, they run through the shell sandbox and authenticate as the credential broker’s GSA under its permission set, and Secret contents are never read. What it reads is untrusted: condition reasons, spec paths, referent names and event messages are all text whoever can write to those namespaces chooses. The inject record it sends the Session KV server, and so the alert and the card the Planning Agent files from it, carry only object names, heuristics and durations, never that text.
    • The Cluster Agent reads it again when it runs gke-stall-detection on the card, as tool output, where its read-only skill and preflight bound what it does, and it may quote it in the report posted to the alert’s thread. Each alert starts two model turns: the Planning Agent’s, which sees the object names inside the brief it copies onto the card, and the Cluster Agent’s. At most three alerts are raised per tick, whatever the number of namespaces a tenant fills with stalls. The entry declares risk: high for that reason.
  • upgrade-readiness-watch reads cluster versions daily and, on a report day, the budgets, workloads, admission webhooks, pods, nodes and the other objects the readiness rules read, of every cluster in scope. Once a day a no_agent script runs the fleet-upgrade-verification skill’s version table through the shell sandbox: gcloud cluster and server-config reads over the management project and every project a Cluster Agent profile’s identity names. On an install with a declared scope, that means those of them the scope lists and the install could read. The report script refuses a project outside it or one listed but unread, and the tick writes the project and the remedy to the agent’s log.

    • When a cluster is below a version its release channel offers that the watch has not reported, or reported more than a week ago, the same tick runs the readiness report with the read set a run on request has. Per project, that is three gcloud list reads projected to the fields the rules read (compute backend-services list, compute instances list, container operations list) beside the server config per location and compute regions describe per Standard cluster region. Per cluster in those projects, it is one get-credentials and the kubectl reads the readiness rules make, plus gcloud logging read over seven days of the Admin Activity log when a registered rule reads it.
    • The report enumerates by project, so it lists and grades the versions of clusters spec.scope.exclude.clusters excludes, but skips their in-cluster reads: no get-credentials and no kubectl for them, since the credential broker refuses their Kubernetes API.
    • The kubectl reads cover PodDisruptionBudgets, Deployments and StatefulSets; webhook configurations with their Services, EndpointSlices and Namespaces; DaemonSets, CronJobs, PersistentVolumeClaims, NetworkPolicies and Namespaces; every pod; the nodes; and StorageClasses and PersistentVolumes. Each kind comes in pages through kubectl get --raw, and the nodes through a jsonpath projection of name, providerID, Pod CIDR, labels, taints, cordon state, node info, allocatable and conditions.
    • Nothing is mutated. The report, which names the budgets and the fail-closed webhook configurations and Services it graded, is written under the Platform Agent profile’s data directory on the gateway pod. The kubeconfigs stay in the sandbox login’s home. Chat receives one short message per tick. For each version reported, it names up to five blocked clusters, each with the first budget, webhook configuration, maintenance exclusion, node pool or readiness rule that blocks it. Each name is set as code, on one line, and cut short when long. A reply in that thread reaches the Planning Agent with the message attached, so those names reach its turn, and the entry declares risk: high for that reason.
  • upgrade-readiness-weekly-review reads the budgets, workloads, admission webhooks, pods, nodes and storage objects of every cluster in scope every Saturday, whatever its version, and upgrade-readiness-weekly-brief is a model turn over what it wrote. Once a week a no_agent script runs the same readiness report as the daily watch, one run per project on its roster. The roster is the projects the Cluster Agent profiles name and the management project, or UPGRADE_READINESS_PROJECTS, with the declared scope refusing a project outside it. Per project that is the three gcloud list reads plus compute regions describe per Standard cluster region and, per cluster not excluded, the get-credentials, the kubectl reads and the conditional gcloud logging read the watch’s bullet above lists.

    • It registers each blocker and risk on the findings queue through the Session KV server’s /v1/findings route on the agent pod. The budget, pool, exclusion and webhook names are the queue’s object, and the report’s fields and text are the detail. Tenant-written names therefore reach the queue, the report under upgrade-readiness/weekly/ on the agent volume, a copy under /opt/data/upgrade-readiness/weekly/ in the shell sandbox, and the brief in chat. They reach the brief by queue id (which embeds the namespace and object names) and in the one clause each line builds from them.
    • An hour later the brief job reads that copy and the queue as data and composes one message. Its turn holds the terminal tool alone and no MCP server (the entry’s enabled_toolsets carries no_mcp), so register_findings, update_finding and the rest of platform_control are not in it, nor the file tools’ writes. So nothing a tenant-written name says can make it register or decide a finding. The queue reads it needs are made before the turn by a pre-run script whose output the scheduler puts above the prompt. At risk: high its terminal is held to read-only inspection commands. The message carries the ids and object names and cites the report’s path for the rest.
  • sa-role-watch says when the agent’s GSA holds more than read-only. Every hour a no_agent script reads, through the shell sandbox and the credential broker, the PlatformAgent and its ServiceAccount in the agent’s namespace and then gcloud projects get-iam-policy for the management project and every project in the resolved spec.scope. It names in chat each role that the read-only set does not carry, bound to the GSA the ServiceAccount’s Workload Identity annotation names, and to the one the broker impersonates when federation is armed. It speaks when the role appears, again once a day from 12:00 UTC while it is held, and when it goes.

    • The installer warns about an admin role in a custom set only when the set is chosen; this catches one granted any time after. It reads project-level bindings only, so a role granted on a folder, the organisation or a group the account belongs to is not seen, and a custom set chosen on purpose is reported like any other grant. It changes nothing.
    • Its drift lines carry only account emails, project IDs and role IDs. An annotation or CR value that does not look like a service account email is refused rather than quoted, and a conditional grant is marked as one without the condition’s free-text title. A role bound to allUsers or allAuthenticatedUsers, which every account holds, is named for the agent’s accounts and marked public. Its failure lines quote one line of the failing command’s error output inside a code span, cut short and with backticks replaced so the text cannot leave it. So nothing a policy author writes, and no formatting a command’s output carries, reaches the Planning Agent’s turn that posts it, and the entry declares risk: low.
  • Bounded recovery. The agent retries a transient blocker through its recovery ladder (roughly five iterations or ~10 minutes) before escalating to a human instead of looping indefinitely; an authorization denial is reported at once, not retried.

  • Read-only log access by default. Every built-in permission set grants the agent roles/logging.viewer, not admin — it cannot tamper with the audit-log sinks. (The Terraform engine adds its roles as non-authoritative google_project_iam_member bindings, so a legacy roles/logging.admin grant made outside it is not removed automatically; audit and revoke such grants yourself.) Stronger environments should route an immutable log copy to a separate security project (see User attribution).

  • AgentPlugin create/update is an administrative privilege. Treat the permission to create an AgentPlugin as equivalent to running code inside the agent pod, because that is what it does. The plugin’s OCI image is mounted into the agent container and Hermes imports it, so the plugin executes with the gateway Pod’s ServiceAccount, <name>-gateway-agent, and its access to the credential proxy. The controls below constrain what a plugin can declare in the CR; none of them sandbox the plugin code itself. Restrict agentplugins RBAC to the same set of principals you would trust to change the agent’s container image.

    The controls that do apply, and their exact scope:

    • Opt-in agentRef targeting. A plugin must set spec.agentRef to a PlatformAgent.metadata.name in its own namespace. Plugins whose agentRef does not match are ignored — a plugin cannot attach itself to every agent by omitting the field.
    • spec.targetProfile chooses which agent’s toolset the plugin sits beside. It does not widen the trust boundary, since plugin code already runs in the agent pod with its ServiceAccount, whichever profile loads it, but it does decide the company it keeps. A plugin left on the default profile loads into the Planning Agent, which is deliberately stripped of terminal, file, and code-execution tools. Targeting platform loads it into the Platform Agent instead, alongside gcloud, kubectl, and the GitOps write path, and makes its skills resolvable to the agent that holds them.
      • Review a plugin that targets a privileged profile with that in mind, and note that spec.config cannot reach the agent subtree from either place, so a plugin still cannot raise its own retry or iteration budget.
    • Name restriction. metadata.name must match ^[a-z][a-z0-9]*$ (max 56 characters), enforced by a CEL rule on the CRD. The name becomes both the mount directory and the module identifier Hermes imports.
    • Config subtree allowlisting. Only the top-level keys approvals, platforms, and platform_toolsets are merged from spec.config; every other key is dropped and logged. This keeps a plugin out of agent (including agent.disabled_toolsets), leader_election, logging, and plugins. It does not make the merge safe in general — see the two caveats below.
    • Caveat: allowlisted subtrees still carry security weight. approvals governs approval gating and platform_toolsets gates which toolsets a platform surface exposes. A plugin may set values under both. Allowlisting bounds where a plugin can write, not how much authority it can grant itself.
    • Caveat: list merges are additive. When a plugin supplies a list under an allowlisted key, its entries are unioned into the operator’s list rather than replacing it. A plugin can therefore add a toolset to platform_toolsets but cannot remove one the operator configured.
    • spec.env overrides operator-set variables. Plugin-supplied environment variables take precedence over variables of the same name set by the operator, and secret references resolve against any Secret in the agent’s namespace. Four names are exceptions: the operator appends CREDENTIAL_PROXY_URL, AGENT_SHARED_STATE_SETUP, PATH, and PYTHONPATH after the merge, so a plugin’s copy of any of them loses. The first keeps a plugin from redirecting the credential proxy. The second keeps it from switching off the container-startup setup that populates $HERMES_HOME (see Container entrypoint), which would surface as plugins mounted but never enabled, far from the plugin that caused it.
      • Secrets referenced this way land in the agent container’s environment: this is a supported way to supply a plugin its own API token, not a preservation of the credential-proxy boundary, which only covers the credentials the proxy itself brokers. See Credential isolation.

The install enforces Customer-Managed Encryption Keys (CMEK) for GKE database encryption:

  • Automated Cloud KMS Setup: On a cluster the install creates, the gke-cluster module’s enable_database_encryption (default true) creates a dedicated Cloud KMS keyring and crypto key, grants the GKE service agent roles/cloudkms.cryptoKeyEncrypterDecrypter, and creates the cluster encrypted.
  • Existing clusters: Terraform cannot mutate a cluster it did not create, so the installer (install.sh) runs a gcloud pre-step before the apply: it ensures the keyring, key, and service-agent binding exist and updates the live cluster’s database encryption. Clusters that are already encrypted are left alone.
  • ALLOW_UNENCRYPTED_SECRETS Override: When installing onto an existing cluster or local test environment where CMEK must stay off, export ALLOW_UNENCRYPTED_SECRETS=true to skip that pre-step.

The install configuration written during installer execution (install.env) is hardened as follows:

  • File Permissions: State files are created with strict POSIX permissions (umask 077 and chmod 600), preventing non-owner access. The terraform.tfvars the installer generates from it gets the same 0600 treatment, and is regenerated on every run so the two cannot disagree.
  • PERSIST_SECRETS_ON_DISK: By default (PERSIST_SECRETS_ON_DISK=true), credentials entered during installation are stored in install.env for non-interactive re-runs. Set PERSIST_SECRETS_ON_DISK=false to prevent writing sensitive credentials to disk.
  • Secrets also live in Terraform state. Every credential passed through the composition is stored in plaintext in the Terraform state, which the installer keeps in a GCS bucket (<project>-kube-agents-tfstate, versioned). Restrict that bucket’s IAM to the administrators who may read the credentials; see the composition README’s warning.