Repository navigation
DOCS-1588: Document per-machine user_permissions authorization - #5389
Shannon Bradshaw (shannonbradshaw) wants to merge 1 commit into
Conversation
rdk#6413 and rdk#6439 (RSDK-14415, released in RDK v1.8.0) add a user_permissions list to the machine config's auth section, which viam-server enforces on every client gRPC request. Add a how-to section to the access page and a pointer from the permissions page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FG6a8yrTei5qqd5MRfhYu
✅ Deploy Preview for viam-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
I couldn't follow the new section on a cloud-managed machine. Saving The app has its own Suggest holding this page, or reframing it for standalone |
|
^^ Please see above comment. ^^ |
|
Closing this in favor of #5429, which documents this feature for both cloud-managed machines and local config files. The reason: on a machine managed in the Viam app, saving Carried over from here: the config example, the field table, the rules Not carried over yet: the CONTROL-tab caution, the claim that module calls aren't checked, and how to find user and API key IDs. They're tracked as TODOs in the draft. Thank you for the source references in this PR. They saved a lot of time. |

Source changes
user_permissionsin proto and JSON configs rdk#6413:user_permissionsin theauthsection of the machine JSON and proto config (config.AuthConfig,UserPermission,User,Permission).user_permissionsrdk#6439:viam-serverenforces it with gRPC unary and stream interceptors (robot/web/authorization.go), and revokes streams and video tracks when a reconfigure removes access.UserPermissionlist toAuthConfigapi#885: theUserPermissionproto messages.Released in RDK v1.8.0 (
git tag --contains 6fa27780d). The app parses theauthfield with RDK'sAuthConfigToProto(domains/robotservice/config_retriever.go, app on RDK v1.10.0), so the field reaches cloud-managed machines.Documents: DOCS-1588 ("Document 'Fine grained robot authorization'").
Docs changes
docs/organization/access.md: new "Restrict API calls on a machine" section under "Limit access". It covers where the list goes, a JSON example (one API key limited toGetImagesoncam1, plus adefaultentry), a field table, and the rulesviam-serverapplies. The rules: unrestricted when the list is empty; once any entry exists, a caller gets its own entry, elsedefault, else nothing. Unauthenticated connections are fully restricted. A user listed twice is fully restricted. An unknowntypeis ignored. Denials returnPermissionDeniedand logunauthorized request. Lost access closes open streams, video included. Module-to-viam-server calls aren't checked, because the module parent server has no such interceptor. A caution notes that Viam app pages such as CONTROL connect as your user (app_user_idauth claim), so restrictingdefaultcan break them for you.docs/organization/rbac.md: one sentence linking to the new section from the role-combinations intro.The only earlier mention is the agent-facing note in
docs/build-apps/use-viam-from-an-agent.md(#5321), which is left as is.Verification
config.AuthConfig(checked with a Go test against RDKmain). Method names matchviam.robot.v1.RobotService/GetMachineStatusandviam.component.camera.v1.CameraService/GetImagesin the protos.user_idlookup points atListOrganizationMembers, whoseOrganizationMember.user_idis the sameAppUser.IDthe app puts in theapp_user_idclaim.GetUserIDByEmailis Viam-staff only, so it isn't suggested.make build-prodall pass.How I found these
api-bf81506-user-permission-auth-config(DOCS-1588). Its old gate, "until an SDK exposes the fields", didn't fit: this is machine config, not an SDK method.user_permissions,tls_auth_entities,external_auth_config, "per-resource" and "fine-grained": no existing reference for the machineauthsection; one mention on the agent page.Generated by daily docs change agent
🤖 Generated with Claude Code
https://claude.ai/code/session_013FG6a8yrTei5qqd5MRfhYu
Generated by Claude Code