NVIDIA / NVIDIA/NemoClaw

[Ubuntu 26.04][Onboard] legacy credentials.json kept on disk after onboard successfully migrates and uses it

Open
#10,388 0 comments 0 reactions 1 assignee Claimed by @jason-ma-nv View on GitHub
area: onboarding area: security NV QA platform: ubuntu
Dominant language
TypeScript
Stars
22.5k
Forks
3.1k
Avg merge
1d 1h
Merged PRs (30d)
715

Description

## Description

Legacy `~/.nemoclaw/credentials.json` is not deleted after a successful, verified migration to the OpenShell gateway during `nemoclaw onboard`, leaving a plaintext credential file on disk indefinitely -- contradicting the documented "delete only after every staged value has been verified as migrated to the gateway" behavior.

Platform scope: Reproduced on this platform only, others untested.
Regression: Unknown -- earlier versions not tested.
OpenShell issue: No -- this is NemoClaw-level onboard/credential-migration logic, not OpenShell CLI behavior.

## Environment

```text
Device: Ubuntu 26.04 test host, Docker driver, CPU-only (no GPU)
OS: Ubuntu 26.04 LTS
Architecture: x86_64
Node.js: v22.23.1
npm: 10.9.8
Docker: Docker version 29.6.1, build 8900f1d
OpenShell CLI: 0.0.106
NemoClaw: v0.0.114
OpenClaw: 2026.7.1
```

## Steps to Reproduce

1. Start from a clean state: no sandboxes registered, no provider credentials registered with the gateway (verify with `nemoclaw credentials list` showing "No provider credentials registered").
2. Create `~/.nemoclaw/credentials.json` (mode 600) containing a single legacy entry named `NVIDIA_API_KEY`, set to a real, working NVIDIA inference key.
3. Unset the corresponding env vars so onboard must read the file:
```bash
unset NVIDIA_API_KEY NVIDIA_INFERENCE_API_KEY
```
4. Run a non-interactive onboard:
```bash
NEMOCLAW_NON_INTERACTIVE=1 NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE=1 NEMOCLAW_PROVIDER=build NEMOCLAW_MODEL='nvidia/nemotron-3-super-120b-a12b' NEMOCLAW_SANDBOX_NAME=cred-mig NEMOCLAW_POLICY_MODE=suggested nemoclaw onboard --no-gpu
```
5. Check whether the file was deleted and whether the credential shows as migrated:
```bash
ls -la ~/.nemoclaw/credentials.json
nemoclaw credentials list
```

## Expected Result

After a successful onboard that used the legacy credential, the credential is registered with the gateway and `~/.nemoclaw/credentials.json` is securely deleted, per the documented "delete only after every staged value has been verified as migrated to the gateway" behavior.

## Actual Result

Onboard prints "Staged 1 legacy credential(s) for migration to the OpenShell gateway." at the start, and at step [4/8] prints "Created provider nvidia-prod" -- a genuinely new provider registration, not a resume/skip path. Onboard completes fully ("OpenClaw is ready"). `nemoclaw cred-mig status` confirms inference is fully healthy, proving the legacy credential value was genuinely consumed and works.

However, at step [8/8] the installer prints:

```text
Kept ~/.nemoclaw/credentials.json: 1 legacy credential(s) were not migrated verbatim to the gateway in this run (NVIDIA_API_KEY). Re-run onboard with the relevant providers/channels enabled to migrate them, then the file is removed automatically.
```

`ls -la ~/.nemoclaw/credentials.json` shows the file still exists (92 bytes, unchanged content) after onboard completes successfully.

**Root cause hypothesis:** the only NVIDIA credential env var name documented anywhere in the credential-storage docs is `NVIDIA_INFERENCE_API_KEY`. `NVIDIA_API_KEY` (the historical/legacy name) is never mentioned as canonical. The staging/consumption logic accepts `NVIDIA_API_KEY` as a legacy alias and successfully uses it to register the provider, but the "verified as migrated" check that gates file deletion appears to check against a different/canonical key name and never recognizes `NVIDIA_API_KEY` as verified -- so it always reports "not migrated verbatim" and keeps the file even though migration functionally succeeded.

## Logs

```text
Staged 1 legacy credential(s) for migration to the OpenShell gateway.
...
[4/8] Setting up inference provider
Created provider nvidia-prod
...
[8/8] Policy presets
Kept ~/.nemoclaw/credentials.json: 1 legacy credential(s) were not migrated verbatim to the gateway in this run (NVIDIA_API_KEY). Re-run onboard with the relevant providers/channels enabled to migrate them, then the file is removed automatically.
Deployment verified -- gateway, dashboard, and inference route are healthy.
OpenClaw version: 2026.7.1

$ nemoclaw cred-mig status
Inference: healthy
Inference (upstream): healthy

$ ls -la ~/.nemoclaw/credentials.json
-rw------- 1 {user} {group} 92 {timestamp} ~/.nemoclaw/credentials.json

$ nemoclaw credentials list
Providers registered with the OpenShell gateway:
nvidia-prod
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.