Repository navigation
fix: Keep the deploy token out of the agent harness container - #4527
maciaszczykm wants to merge 23 commits into
Conversation
Soffi AI SummaryThis PR hardens the security posture of the AI agent harness by removing the Plural deploy token from the agent-harness container entirely. Previously, the harness held the deploy token directly, which was a security risk. Now, all Console API calls and AI (LLM) traffic from the agent harness are routed through the MCP server sidecar, which owns the token and injects it into outbound requests. Key changes:
Updated: 2026-10-16 08:29 UTC |
|
so i think the agents could still figure this out. What I think we should do is:
|
[High impact] The PR appears safe to merge; no blocking issues remain from this review. SummaryKeeps the deploy token in the MCP sidecar and bootstrap container. The harness sends Console and AI requests through the sidecar.
Reviews (3) · Last reviewed commit: "drop upstream cookies in the openai stre..." · Reviewed by Greptile |
…ve-plural-client-in-agent-harness-route-through-mcp-server
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
The agent-harness container no longer holds the deploy token. Its Console calls and the agent's AI traffic go through the MCP server sidecar, which adds the token.
/plural/ext/gql: forwards only the harness's own operations. Run-scoped operations must target this run.UpdateAgentMessageandCreateAgentMessageOutputtake message IDs, so Console only checks that the message's run belongs to the cluster. Requests are rebuilt from the checked query and variables. Authenticates withToken <deploy token>and sets thePlural-ClientandPlural-Agent-Runheaders. The sidecar's token proxies dropSet-Cookiefrom upstream responses./plural/ext/ai/: forwards model calls to the Console AI proxy. Agents get the sidecar URL and a placeholder key. The streaming OpenAI proxy also swaps in the token.scmCreds/pluralCredsmove to a newGetAgentRunCredentialsquery, used only byagent-bootstrapandmcpserver.PLRL_DEPLOY_TOKENmoves to a separate<run>-pluralSecret, loaded only byagent-bootstrapandmcpserver. Existing run secrets drop it, except while a pod built before this change still reads it. Pods forceshareProcessNamespace=false.--console-url/--deploy-token.--openai-upstream-url/PLRL_OPENAI_UPSTREAM_URL. The streaming proxy now sends the deploy token, so a custom upstream would leak it. It always targets<console>/ext/ai. Nothing we have sets it.Upgrade the operator and
agent-harnessimages together: the old harness needs the deploy token in its own container.Test Plan
Test environment: https://console.plrl-dev-aws.onplural.sh/
Test image tag: sha-4e95753
Checklist
Plural Flow: console