Skip to content

feat: authenticate interpreter requests through envd - #346

Draft
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1791374542-http-interpreter-auth
Draft

devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1791374542-http-interpreter-auth

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Authenticate every protected interpreter request through envd GET /auth, replacing closed #342 with a fresh implementation on main. Reuse the HTTP client connection pool, but do not cache validation results: token changes and envd failures are checked on the next request. Health and CORS preflight remain public, E2B_LOCAL=true is the explicit development bypass, and merged Jupyter isolation is unchanged.

Requires https://github.com/e2b-dev/belt/pull/4374 and e2b-dev/E2B#1955 deployed before the template. Breaking: existing SDK installations must upgrade to the header-forwarding release before using the new template; publishing the SDK alone does not prevent older clients' context operations from returning 401. Tokenless sandboxes are rejected. Health checks alone do not verify envd supports authentication. Related: SDK-363.

Verification: 19 server tests pass on Python 3.10 and 3.12 (including real Jupyter transport); lint, formatting, and compilation pass. Nine updated regression cases fail with the old cache, proving repeated/concurrent requests revalidate and token changes/upstream failures take effect without a cache delay. Removing middleware makes the unauthenticated-context regression fail (200 instead of 401). Actual Firecracker lifecycle testing and latency measurements remain outstanding.

Link to Devin session: https://app.devin.ai/sessions/23861bced08343e59c14adf841498b12
Open in Devin Desktop: https://app.devin.ai/desktop/session/23861bced08343e59c14adf841498b12?variant=devin
Requested by: @mishushakov

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
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