Skip to content

fix(envd): fail closed privileged routes when access token unset - #3535

Open
SashaMIT wants to merge 1 commit into
e2b-dev:mainfrom
SashaMIT:fix/envd-fail-closed-upgrade-when-token-unset
Open

fix(envd): fail closed privileged routes when access token unset#3535
SashaMIT wants to merge 1 commit into
e2b-dev:mainfrom
SashaMIT:fix/envd-fail-closed-upgrade-when-token-unset

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • Secure-by-default hardening for envd auth after /init.
  • When no access token is configured, reject non-allowlisted privileged routes (including POST /upgrade) instead of falling open.
  • Keeps existing behavior when a token is set, and keeps handover pre-init fail-closed for non-init/health paths.
  • Defense-in-depth / secure defaults — not framed as a vulnerability ticket.

Test plan

  • Code review of WithAuthorization branches
  • Existing envd auth tests (if any) still pass
  • Confirm /upgrade returns 401 when token unset post-init

Made with Cursor

After /init, reject non-allowlisted routes (including POST /upgrade)
when no access token is configured, instead of allowing unauthenticated
access. Keeps handover pre-init fail-closed and token-set auth unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant