Skip to content

feat: encrypt OpenClaw device credentials - #706

Merged
rogerchappel merged 3 commits into
mainfrom
codex/persist-openclaw-device-auth
Jul 20, 2026
Merged

rogerchappel merged 3 commits into
mainfrom
codex/persist-openclaw-device-auth

Conversation

@rogerchappel

Copy link
Copy Markdown
Owner

Summary

  • add a versioned per-runtime OpenClaw device credential envelope
  • encrypt device tokens with the existing runtime-token keyring
  • seal persisted Ed25519 private keys while retaining legacy plaintext read compatibility
  • bind cached credentials to the expected device ID and approved scopes
  • provide safe removal for browser-facing runtime metadata

Why

OpenClaw device tokens and private keys are durable authentication material. They must survive CrewCMD restarts without being stored or exposed as plaintext.

Stack

Depends on #705. This PR contains only the storage primitive; gateway-pool wiring follows in the next stacked PR.

Verification

  • pnpm test -- src/lib/runtime-device-auth.test.ts
  • pnpm exec tsc --noEmit --pretty false --incremental false
  • pnpm exec eslint src/lib/runtime-device-auth.ts src/lib/runtime-device-auth.test.ts
  • pre-push pnpm typecheck
  • pre-push pnpm build
  • git diff --check

@rogerchappel
rogerchappel changed the base branch from codex/harden-openclaw-device-auth to main July 20, 2026 07:30
@rogerchappel
rogerchappel marked this pull request as ready for review July 20, 2026 07:31
@rogerchappel
rogerchappel merged commit fcb8d39 into main Jul 20, 2026
2 checks passed
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