Skip to content

Update viam-server reference for the cached app access token - #5482

Merged
Eliza Farley (elizafarley) merged 2 commits into
mainfrom
claude/update-viam-server-jwt-cache
Oct 29, 2026
Merged

Eliza Farley (elizafarley) merged 2 commits into
mainfrom
claude/update-viam-server-jwt-cache

Conversation

@shannonbradshaw

@shannonbradshaw Shannon Bradshaw (shannonbradshaw) commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Source changes

  • RSDK-11520 — RSDK-11520: Persist app+signaling connection jwts on the robot rdk#6384 (a97629e3b, in RDK v1.14.0): grpc/app_conn.go authenticates the app and signaling connections up front and, on success, writes the JWT to $VIAM_HOME/grpc/<base64(partID_host)>.jwt (directory created with mode 0700). If Authenticate fails, createConnection dials again with the cached JWT (createConnectionWithCachedJWT), so the machine keeps its cloud connection while app's authentication system is down.

Documents: no ticket key found in DOCS (RSDK-11520 has no DOCS ticket linked, parented or sharing a parent).

Docs changes

  • docs/reference/viam-server.md: in "Reconfiguration", beside the existing cached-config note, adds that v1.14.0 and later cache the access token in ~/.viam/grpc/, fall back to it when authentication fails, and that the directory deserves the same protection as the credentials file. A credential stored on disk is security-relevant, and this page is where the docs list what viam-server keeps under ~/.viam.

How I found these

  • Xref lookup: none (no xref or flows.md entry covers the files viam-server keeps under ~/.viam); the page came from the backlog item and grep.
  • Grep matches: .viam/, VIAM_HOME, cached_cloud_config, jwt, access token across docs/, static/, data/, layouts/: only this page lists files under ~/.viam that viam-server writes.

Prettier, markdownlint, vale, frontmatter_rules.py and make build-prod pass.


Generated by daily docs change agent

https://claude.ai/code/session_01Nja2XpwzQfFLZspPY9ZWkP


Generated by Claude Code

rdk#6384 (RSDK-11520), released in RDK v1.14.0, caches the JWT
viam-server gets from app under $VIAM_HOME/grpc/ and falls back to it
when authentication fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Nja2XpwzQfFLZspPY9ZWkP
@netlify

netlify Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit badbc1c
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6ae3d9b1326d7ddb2a9b26a6
😎 Deploy Preview https://deploy-preview-5482--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 35 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Oct 29, 2026
@elizafarley

Copy link
Copy Markdown
Contributor

Docs review: Ready to merge

Adds a short note to the viam-server reference saying that v1.14.0 and later cache the app access token under ~/.viam/grpc/ and fall back to it when authentication fails. Every claim matches grpc/app_conn.go in RDK, and CI and docs-health are clean.

CI: All required checks passing

Docs health: No regressions

Nits

  • docs/reference/viam-server.md:75: "the machine's credentials file" isn't named anywhere on the page, so a reader can't tell which file to compare against. Fix: name it, for example "as you would the machine's credentials file (/etc/viam.json by default)", or link to wherever the docs describe it.
Verified against source (5 claims)
  • Introduced in v1.14.0: commit a97629e3b (rdk#6384) is first contained in tag v1.14.0 (v1.14.0-rc0)
  • Token cached in ~/.viam/grpc/: viamrobotics/rdk grpc/app_conn.go:124 (filepath.Join(rutils.ViamDotDir, "grpc")), utils/env.go:125
  • Only the running user can read it: grpc/app_conn.go:134 (os.MkdirAll(cacheDir, 0o700))
  • Token cached after a successful authentication: grpc/app_conn.go:189-193 (WithAccessTokenHandler → jwtCacheWrite)
  • Falls back to the cached token when Authenticate fails, keeping the cloud connection: grpc/app_conn.go:213-216, createConnectionWithCachedJWT at :164-173; also used on reconnect (:103)

Automated review by Claude. Rerunning the review updates this comment.

Copy link
Copy Markdown
Collaborator Author

Nit addressed in badbc1c: the sentence now names the credentials file, /etc/viam.json, the default location on Linux.


Generated by Claude Code

@elizafarley
Eliza Farley (elizafarley) merged commit 6c8d428 into main Oct 29, 2026
14 checks passed
@elizafarley
Eliza Farley (elizafarley) deleted the claude/update-viam-server-jwt-cache branch October 29, 2026 23:57
@github-actions

Copy link
Copy Markdown

🔎💬 Inkeep AI search and chat service is syncing content for source 'Viam Docs'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants