Skip to content

Add module run_as_user, cloud_access, and AgentInfo.system_users - #952

Open
Eliot Horowitz (erh) wants to merge 4 commits into
mainfrom
claude/dreamy-cerf-r3z0at
Open

Eliot Horowitz (erh) wants to merge 4 commits into
mainfrom
claude/dreamy-cerf-r3z0at

Conversation

@erh

@erh Eliot Horowitz (erh) commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Proto support for two new per-module settings and for machines reporting their system users:

  • ModuleConfig.run_as_user (10): the system user the module process runs as. Empty means the same user as viam-server.
  • ModuleConfig.cloud_access (11): a ModuleCloudAccess message with mode and api_key_id. It selects which cloud API key viam-server puts in the module's environment (VIAM_API_KEY / VIAM_API_KEY_ID).
    • ModuleCloudAccessMode: UNSPECIFIED (same as MACHINE), MACHINE (the machine's own key, today's behaviour) and NONE.
    • api_key_id is reserved for choosing a specific key later and must be empty for now. It's a message rather than a boolean so that option can be added without another schema change.
  • AgentInfo.system_users (11): the system users a machine reports that modules can run as, so app can offer them in a dropdown.

All additive; no existing fields change.

Related PRs

viamrobotics/rdk#6833 and viamrobotics/app#14497 use these fields and depend on a release containing this change.

Notes for review

buf.build was unreachable from the environment this was written in, so app/v1/robot.pb.go and gen/js/app/v1/robot_pb.{js,d.ts} were generated by running protoc with the same plugin versions.

  • Run on main's robot.proto, that setup reproduces main's committed robot.pb.go, robot_pb.js and robot_pb.d.ts byte for byte.
  • buf lint and buf breaking against main pass locally.

Please re-run make dist/buf to confirm there's no diff.

A ModuleCloudAccess message (mode plus api_key_id) instead of a boolean
leaves room for choosing a specific API key later. Modes for now: machine
(default, the machine's own key) and none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PadCBExAtZwq3PQVPcsEgo
@erh Eliot Horowitz (erh) changed the title Add module run_as_user, disable_cloud_api_key_env, and AgentInfo.system_users Add module run_as_user, cloud_access, and AgentInfo.system_users Nov 23, 2026
Moves AgentInfo.system_users to field 11, since main now uses 8-10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PadCBExAtZwq3PQVPcsEgo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test committer is a member of this org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants