Move RELAY_SECRET to endpoint worker_init (no task-arg credentials)#25
Merged
Conversation
Refactor remote_vllm_streaming so the Lakeshore worker reads RELAY_SECRET from os.environ on the endpoint (set in worker_init), the same way it already reads RELAY_ENCRYPTION_KEY. Drop RELAY_SECRET from the gce.submit() positional args and from the imports. After this change, no relay credentials traverse Globus Compute's AMQP channel — both the channel-access token (RELAY_SECRET) and the AES-256-GCM payload key (RELAY_ENCRYPTION_KEY) are pre-provisioned on the HPC endpoint. Deployment requirement: add `export RELAY_SECRET=...` to ~/.globus_compute/<endpoint>/config.yaml worker_init alongside the existing RELAY_ENCRYPTION_KEY export, then restart the endpoint. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
pip-audit on the security workflow flagged two CVEs in the transitive aiohttp dependency. Both are fixed in 3.14.0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactor the HPC streaming control plane so no relay credentials traverse Globus Compute's AMQP channel.
remote_vllm_streamingnow readsRELAY_SECRETfromos.environon the Lakeshore endpoint, matching the existingRELAY_ENCRYPTION_KEYpattern.gce.submit(...)no longer passesRELAY_SECRETas a task argument.RELAY_SECRETimport dropped fromglobus_compute_client.py.Why
Previously the channel-access token (
RELAY_SECRET) traveled in Globus Compute task payloads while the encryption key (RELAY_ENCRYPTION_KEY) did not. The asymmetry was a defense-in-depth choice rather than a principled requirement. After this change both credentials live in the endpoint'sworker_initenvironment, so neither is visible in any task record. Eliminates a class of attack where a leaked task record yields an authenticated relay session.Deployment requirement
Operators must add
export RELAY_SECRET=<token>to~/.globus_compute/<endpoint>/config.yamlworker_init(alongside the existingRELAY_ENCRYPTION_KEYexport), then restart the endpoint:```bash
globus-compute-endpoint restart lakeshore-research
```
The submitter side (STREAM middleware / proxy / hpc-as-api) still reads
RELAY_SECRETfrom its own.envto authenticate its consumer-side connection to the relay. No change there.Test plan
tests/test_relay_integration.py) already callsremote_vllm_streamingwithoutrelay_secretarg — compatibleCompanion change for hpc-as-api: https://github.com/uicacer/hpc-as-api (v0.3.0 release)
🤖 Generated with Claude Code