mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #123] [MERGED] feat: add single-tenant API key authentication #194
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#194
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/123
Author: @yingdi-shan
Created: 8/4/2026
Status: ✅ Merged
Merged: 8/19/2026
Merged by: @yingdi-shan
Base:
main← Head:feat/single-tenant-auth📝 Commits (7)
4fee387feat: add single-tenant API key authenticationb28eba1docs: document API key setup in READMEbc0ad47fix: derive sandbox access tokens from shared seed326ebfbrefactor: simplify shared authentication secrets131e0dcfix: harden managed secret loading52a66c7fix: enforce authentication boundariesc9f4d91fix: preserve sandbox metrics auth📊 Changes
66 files changed (+2397 additions, -811 deletions)
View changed files
📝
Cargo.lock(+1 -1)📝
Cargo.toml(+1 -0)📝
README.md(+18 -5)📝
config/default.toml(+1 -1)📝
crates/aenv/src/client/files.rs(+3 -18)📝
crates/aenv/src/client/mod.rs(+1 -1)📝
crates/aenv/src/grpc/mod.rs(+5 -17)📝
deploy/docker-compose.yml(+8 -2)📝
deploy/k8s/base/agentenv-daemonset.yaml(+6 -1)📝
deploy/k8s/base/gateway-deployment.yaml(+5 -0)📝
deploy/k8s/base/kustomization.yaml(+5 -0)📝
deploy/k8s/run.sh(+163 -10)📝
docs/src/SUMMARY.md(+1 -0)📝
docs/src/concepts/proxy.md(+17 -0)📝
docs/src/concepts/sandboxes.md(+1 -1)📝
docs/src/configuration/env-vars.md(+7 -8)📝
docs/src/configuration/reference.md(+3 -3)📝
docs/src/deployment/docker-compose.md(+37 -9)📝
docs/src/deployment/docker.md(+12 -0)📝
docs/src/deployment/kubernetes.md(+18 -3)...and 46 more files
📄 Description
Summary
AENV_API_KEY, then/run/secrets/api-key, then an atomically generated$AENV_HOME/secrets/api-key.envdAccessToken = hex(HMAC-SHA256(seed, sandboxID))trafficAccessToken = hex(HMAC-SHA256(seed, "sandbox-traffic-" + sandboxID))Credential boundaries
X-API-Key: deployment control-plane credential shared by the gateway and runtime nodes.e2b-traffic-access-token: sandbox-scoped application proxy credential.X-Access-Token: secure envd credential, accepted only for the matching sandbox envd port.The API key is independent from both sandbox credentials. Rotating an API key does not rotate sandbox tokens; rotating the runtime seed rotates both per-sandbox credentials.
Proxy routing strips AgentENV credentials before forwarding application requests and preserves application
Authorization.Deployment behavior
Secret/agentenv-auth. The existing optionalagentenv-runtime-secrets/sandbox-access-token-hash-seedcontract is unchanged, avoiding seed migration during upgrades.Out of scope
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.