Skip to content

fix(orchestration): keep the ingest token out of the job directory - #3911

Merged
iguehring-nvidia merged 1 commit into
mainfrom
iguehring/otel-token-out-of-job-dir
Oct 2, 2026
Merged

iguehring-nvidia merged 1 commit into
mainfrom
iguehring/otel-token-out-of-job-dir

Conversation

@iguehring-nvidia

@iguehring-nvidia iguehring-nvidia commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What

The job collector (#3610) stamps the ingest token as an Authorization resource attribute on every batch, because the routing proxy in front of the managed backend resolves the tenant from it. The same pipelines also fed the file exporters, so the job-directory copies otel/{metrics,traces,logs}.jsonl carried the token in plaintext. The collector also logged at debug, which prints each batch's resource attributes, token included, into logs/otel_collector.log. Both files are created with the user's default umask on shared storage.

Fix: two pipelines per signal over the same receivers. <signal> stamps the token (resource/managed) and ships to the managed backend; <signal>/local stamps everything but (resource/local) and writes the job-directory copy. The span_metrics connector hangs off the local traces pipeline and its series enter both metrics pipelines like any other metric. Collector log level is info (export failures still log at error).

Why it matters

Every run since #3610 merged wrote a team write-credential into world-readable files in the job directory. Found while checking the EFB fragments MR end to end (jobs 7601272 and 7602043 on oci-hsg). Affected directories on that cluster have been chmod'ed; the token should be rotated once this lands.

Validation

  • pytest tests/unit_tests/test_orchestration_otel.py tests/unit_tests/test_slurm_script.py tests/unit_tests/test_slurm_executor.py tests/unit_tests/test_orchestration_api.py tests/unit_tests/test_fern_docs_links.py: 386 passed. New tests: test_the_token_never_reaches_the_job_directory_copies (no file-writing pipeline carries the attribute; managed and local processors differ by exactly Authorization) and test_collector_log_level_does_not_print_batches.
  • Rendered config validated with otelcol-contrib 0.152.1 validate (the binary the clusters run).
  • Real run on oci-hsg (job 7602618, 8 Terminal-Bench rollouts, collector config rendered by this branch): zero occurrences of the token anywhere in the job directory; otel/metrics.jsonl, traces.jsonl, logs.jsonl carry 567/559/68 resources with run_id, user and service.name.override on every one and no Authorization; the collector log has 39 lines, none at debug, and no export errors. The same check on a pre-fix run finds the token in all four files.

Compatibility

Pipeline names change (metrics/local etc.); nothing outside the collector config refers to them. The managed export is unchanged: same attributes, same header. Dashboards unaffected.

@iguehring-nvidia iguehring-nvidia self-assigned this Oct 1, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 1, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

The collector stamped the ingest token as an `Authorization` resource attribute
(the routing proxy needs it) on every batch, and the same pipelines fed the file
exporters, so `otel/{metrics,traces,logs}.jsonl` in the job directory carried the
token in plaintext. The collector also logged at debug, which prints each batch's
resource attributes, token included, into `logs/otel_collector.log`.

Every signal now has two pipelines over the same receivers: `<signal>` stamps the
token and ships to the managed backend, `<signal>/local` stamps everything but and
writes the job-directory copy. The span_metrics connector hangs off the local
traces pipeline and its series enter both metrics pipelines. Log level is info.

Tests pin that no file-writing pipeline carries the token attribute and that the
log level stays off debug; the fern page says what the copies contain.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Ingo Guehring <[email protected]>
@iguehring-nvidia
iguehring-nvidia force-pushed the iguehring/otel-token-out-of-job-dir branch from ff7c7d2 to 2ba8050 Compare October 2, 2026 17:01
@iguehring-nvidia
iguehring-nvidia marked this pull request as ready for review October 2, 2026 17:16
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team and anwithk October 2, 2026 17:17
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 2, 2026 17:17
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@iguehring-nvidia
iguehring-nvidia added this pull request to the merge queue Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/37050579275

Merged via the queue into main with commit d09fe41 Oct 2, 2026
45 checks passed
@iguehring-nvidia
iguehring-nvidia deleted the iguehring/otel-token-out-of-job-dir branch October 2, 2026 19:08

This branch was previously deployed

1 inactive deployment
public — 2ba80508 Deployed Oct 2, 2026 by copy-pr-bot[bot] via release / finalize / notify #4205
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.

2 participants