Follow-up to #555. With the agent running --auth-mode=required, scripts that call its HTTP API without an Authorization header get a bare unauthorized. Reproduced on nvcf-dgxc-k8s-aws-usw2-dev2:
Creating checkpoint for vllm-small/vllm...
Error: Failed to get checkpoint ID from response
Response: unauthorized
[ERROR] FAILED at: Checkpoint
scripts/checkpoint.sh is fixed on the #555 branch. This issue covers the rest.
Actual scope
16 scripts mention port 8081, but most are comments, echoed help text, or delegate to checkpoint.sh. Only three make a real authenticated call:
| Script |
Line |
Call |
test-e2e.sh |
803 |
POST /v1/restore |
test-agent-driven-e2e.sh |
223 |
POST /v1/restore |
bench-cross-node-restore.sh |
84 |
GET /debug/pprof/profile (via kubectl exec) |
deploy-agent.sh:115 hits /health, which is unauthenticated by design and needs no change. deploy-agent.sh:124, deploy-all.sh:70, deploy-k8s.sh:79 print instructions rather than calling. nccl-trace-quick.sh:22 is a usage comment showing an unauthenticated POST /v1/checkpoint and should be updated so the documented example is not misleading.
pprof is deliberately gated: it is registered on the guarded router and is not in unauthenticatedPaths, per the comment in internal/agent/auth.go -- "profiles leak memory contents and goroutine state".
Fix direction
Add scripts/lib/agent-auth.sh with one token lookup, and source it from every script that calls the API, replacing the inline helper currently in checkpoint.sh. An absent Secret must yield no header rather than an error, since the same scripts have to work against a cluster installed without agent.auth.enabled.
For calls made inside the agent pod via kubectl exec (bench-cross-node-restore.sh), use the NVSNAP_AGENT_TOKEN env var the chart already injects into the container instead of piping the token in from outside.
Why it matters
The defaults (auth.enabled=false, mode=permissive) are unaffected, so this is invisible until someone turns on the mode the feature exists to provide. Anyone who does gets a broken checkpoint/restore toolchain and an error message that does not say which credential is missing.
NVCA's calls to the agent API should be audited the same way before required is recommended.
Follow-up to #555. With the agent running
--auth-mode=required, scripts that call its HTTP API without anAuthorizationheader get a bareunauthorized. Reproduced on nvcf-dgxc-k8s-aws-usw2-dev2:scripts/checkpoint.shis fixed on the #555 branch. This issue covers the rest.Actual scope
16 scripts mention port 8081, but most are comments, echoed help text, or delegate to
checkpoint.sh. Only three make a real authenticated call:test-e2e.shPOST /v1/restoretest-agent-driven-e2e.shPOST /v1/restorebench-cross-node-restore.shGET /debug/pprof/profile(viakubectl exec)deploy-agent.sh:115hits/health, which is unauthenticated by design and needs no change.deploy-agent.sh:124,deploy-all.sh:70,deploy-k8s.sh:79print instructions rather than calling.nccl-trace-quick.sh:22is a usage comment showing an unauthenticatedPOST /v1/checkpointand should be updated so the documented example is not misleading.pprof is deliberately gated: it is registered on the guarded router and is not in
unauthenticatedPaths, per the comment ininternal/agent/auth.go-- "profiles leak memory contents and goroutine state".Fix direction
Add
scripts/lib/agent-auth.shwith one token lookup, and source it from every script that calls the API, replacing the inline helper currently incheckpoint.sh. An absent Secret must yield no header rather than an error, since the same scripts have to work against a cluster installed withoutagent.auth.enabled.For calls made inside the agent pod via
kubectl exec(bench-cross-node-restore.sh), use theNVSNAP_AGENT_TOKENenv var the chart already injects into the container instead of piping the token in from outside.Why it matters
The defaults (
auth.enabled=false,mode=permissive) are unaffected, so this is invisible until someone turns on the mode the feature exists to provide. Anyone who does gets a broken checkpoint/restore toolchain and an error message that does not say which credential is missing.NVCA's calls to the agent API should be audited the same way before
requiredis recommended.