Skip to content

Remove the secretKeyRef env sources feature - #835

Merged
Zoe Zhao (zoez7) merged 3 commits into
agent-substrate:mainfrom
zoez7:remove-secret-env-sources
Aug 11, 2026
Merged

Zoe Zhao (zoez7) merged 3 commits into
agent-substrate:mainfrom
zoez7:remove-secret-env-sources

Conversation

@zoez7

@zoez7 Zoe Zhao (zoez7) commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

This reverts the ActorTemplate valueFrom.secretKeyRef support added in #20 (issue #15).

We don't want actors to have any access to secrets, they will be injected on the egress route instead. Removing this now so we don't need to copy secrets into substrate resources.

We don't want actors to have any access to secrets: they will be
injected on the egress route instead. Removing this now so we don't
need to copy secrets into substrate resources.

This reverts the ActorTemplate valueFrom.secretKeyRef support added in
agent-substrate#20 (issue agent-substrate#15), surgically rather than via git revert since the
touched files have since evolved:

- EnvVar reverts to a literal-only {name, value} shape; value is now
  required. EnvVarSource and SecretKeySelector are gone from the CRD.
- ate-api no longer reads Secrets: the env resolver, secret cache, and
  the kubernetes.Interface plumbing through NewService/NewActorWorkflow
  are removed. Literal env mapping is folded into
  workloadSpecFromActorTemplate so it still reaches atelet.
- The env redaction in ateinterceptors is kept: it is shared by
  InternalServerUnaryInterceptor and still keeps literal env values out
  of request logs.
- The claude-code-multiplex demo passes ANTHROPIC_API_KEY as a plain
  env value substituted at apply time; its Secret object is removed.

Note: checkpoint requests (pause/suspend) now carry literal env in the
spec since the single builder always maps env; atelet only consumes env
on Run/Restore, so this is inert.
@EItanya

Copy link
Copy Markdown
Collaborator

Can we hold off on this until egress policy merges? We still need some way to get secrets for testing agents which use LLMs

@zoez7

Copy link
Copy Markdown
Collaborator Author

Eitan Yarmush (@EItanya) Do you have ETA for egress policy merge? Once we cut over to substrate resources instead of CRDs, the workflow that rely on the secretKeyRef will break.

@EItanya

Copy link
Copy Markdown
Collaborator

Eitan Yarmush (Eitan Yarmush (@EItanya)) Do you have ETA for egress policy merge? Once we cut over to substrate resources instead of CRDs, the workflow that rely on the secretKeyRef will break.

Ok that’s fair, we can just remove it for now, I will review tomorrow

…ources

# Conflicts:
#	cmd/ateapi/internal/controlapi/workload_spec_test.go
@zoez7
Zoe Zhao (zoez7) merged commit 4b3423c into agent-substrate:main Aug 11, 2026
14 of 15 checks passed
sherod taylor (sherodtaylor) added a commit to sherodtaylor/agent-smith that referenced this pull request Aug 13, 2026
* feat(chart): actor-mode agentEnv for per-agent secret delivery

Replaces the ActorTemplate's non-working secretKeyRef paths + the
iron-proxy sidecar with an explicit per-agent env map that Flux fills
via valuesFrom (Secret → targetPath) at deploy time. This is the R4
gate for the substrate actor-mode canary — the ActorTemplate CRD
supports neither envFrom nor secret volume mounts, and secretKeyRef
delivery waits on upstream agent-substrate/substrate#835, so plain-env
via values is the only path that works today.

Changes:

* actor-template.yaml: drop the ANTHROPIC_API_KEY secretKeyRef and the
  entire iron-proxy sidecar container (image was never digest-pinned, so
  rc14 CRD would reject it; sidecar's own token couldn't be delivered
  either). Add explicit env contract: AGENT_NAME + HOME + IS_SANDBOX +
  matrix non-secret block (URL/BOT_USER_ID/ALLOWED_USERS) + quietHours
  + per-agent range over actor.agentEnv.<name>. Stop rendering fleet
  extraEnv here — the homelab's fleet-wide extraEnv contains
  iron-proxy stubs (GITHUB_TOKEN=proxy-token-github,
  NODE_EXTRA_CA_CERTS=/root/iron-proxy.crt) that would reach the real
  endpoint unswapped in actor mode because sandbox egress bypasses
  iron-proxy (nftables → atunnel → atenet-egress).

* values.yaml: add actor.agentEnv (empty default) with worked
  Flux-valuesFrom example and an explicit warning against wiring the
  iron-proxy stubs into it. Drop actor.ironProxyMode entirely (dead
  code: sidecar path removed, atenet path was always deferred).

* tests/test-chart-render.sh: add an actor-mode fixture that renders a
  brandbot (runtime=actor) alongside an infrabot (deployment) with the
  iron-proxy stubs in fleet extraEnv. Asserts the ActorTemplate has no
  iron-proxy container, no secretKeyRef, no GITHUB_TOKEN, no
  NODE_EXTRA_CA_CERTS; MATRIX_ACCESS_TOKEN comes through as a plain
  literal from agentEnv; deployment-mode agent still gets the fleet
  extraEnv. Guards the R4 contract against regression.

Coordinated with pmbot per the R4 secret-delivery memo. Canary is
Matrix-loop + measurements only; real GitHub access from actor mode is
deferred to the R6 HTTPS_PROXY convergence gate.

Verify:
  bash tests/test-chart-render.sh
  helm template testrls charts/agent-smith -f <fixture with runtime: actor>

* fix(chart): drop stale spec.pauseImage from ActorTemplate

The rc14 CRD moved pauseImage from ActorTemplate into SandboxConfig
(the same schema change that killed -v7). Leaving it on the
ActorTemplate makes the resource fail admission against the live
substrate v0.3.0-rc14 CRD.

Verified: bash tests/test-chart-render.sh (44/44 pass).

* chore: bump chart to 0.3.0-rc15

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018m83PCR1n2c6P9DGdGQLoM

---------

Co-authored-by: devbot <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants