Skip to content

Add auth token to ZMQ env server#1123

Open
teilomillet wants to merge 1 commit intoPrimeIntellect-ai:mainfrom
teilomillet:codex/zmq-env-auth
Open

Add auth token to ZMQ env server#1123
teilomillet wants to merge 1 commit intoPrimeIntellect-ai:mainfrom
teilomillet:codex/zmq-env-auth

Conversation

@teilomillet
Copy link
Copy Markdown
Contributor

@teilomillet teilomillet commented Apr 9, 2026

Summary

  • add optional auth-token framing to the ZMQ env server/client transport
  • generate and wire a shared token automatically in Environment.start_server()
  • add auth rejection and startup wiring tests for the protected path

Testing

  • uv run pytest tests/test_env_server.py tests/test_environment_extra.py
  • uv run pre-commit run --files verifiers/serve/server/zmq_env_server.py verifiers/serve/client/zmq_env_client.py verifiers/envs/environment.py tests/test_env_server.py tests/test_environment_extra.py

Note

Medium Risk
Changes the ZMQ wire protocol (optional extra frame) and makes Environment.start_server() always start auth-protected servers, so mismatched/legacy clients can fail with Unauthorized and break server connectivity.

Overview
Adds optional transport-level authentication to the ZMQ env server/client by introducing an auth_token frame in request/health-check multipart messages and rejecting unauthorized requests before they reach the router.

Environment.start_server() now generates a shared random token and wires it into both the spawned ZMQEnvServer process and the ZMQEnvClient. Tests are extended to cover allowed/denied request dispatch and health-check behavior when auth is enabled, plus server-startup wiring of the shared token.

Reviewed by Cursor Bugbot for commit 3458eb0. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

1 participant