Repository navigation
v1.24.0 — roles for network callers (HLD §18)
Several people or agents can share one HTTPS endpoint with different jobs. Existing tokens keep working as before
(as admin) until an operator runs vmware-audit roles enable; token create --role refuses until then. Two
things apply from this release either way: audit rows have a role column (empty until roles are enabled), and in
a server on a network transport a call with no authenticated caller is refused (a thread a tool started without
copying the caller's context, an internal path).
- Roles. Built-in
reader(read tools, every skill and target) andadmin(everything the server offers);
custom roles in$OPS_HOME/roles.yamlname, per skill,tools: read | "*",allow_write,allow_escapeand
targets, plusapprove: none | any | othersfor vmware-pilot. Every key is required and "all" is"*", so a
truncated file refuses a role instead of widening it; the file must be owner-only and owned by the server's user.
A role narrows what the server's account is used for; it never grants more than the account has. - Tokens with roles live in
<token file>.v2(name:sha256:role): an older vmware-policy on the same host can
neither read nor rewrite them.roles enablemoves every legacy token there (asadmin, or--assign NAME=ROLE)
and empties the legacy file, so older servers refuse every request rather than run unchecked. After that,
token createneeds--role. New:token set-role,token list --long,roles enable | list | check.
The v2 file must belong to the server's user and sit in a directory others cannot write. Re-runningroles enablefinishes a run that stopped between its two writes, and refuses legacy lines an oldervmware-audit
wrote after opt-in rather than making themadmin.roles checksays what it cannot check (tool names per
skill, composite reach): servers check those per call and name the tool when they refuse. - Enforced on every call in
@vmware_tool, before argument checks and deny rules: the tool, the target it
resolves to (a tool that reads every target needs targets"*"), and for a composite tool every tool it can run
(readertoo). Refusals are audited asdeniedwithrule=role:<name>and count toward the per-caller runaway
budget. A role that cannot be used is explained in the server's log; the caller is told to runroles check. - Escape tools (credentials, guest code, raw API paths, host files while
VMWARE_MCP_FILE_ROOTis set) need
allow_escape;readernever has them. - Per caller:
tools/listshows only what the role may call (not tools that read every target, for a
target-limited role); server instructions list target addresses toadminonly. A role change, and achmod
of the token or role file, applies from the token's next request. - Skills declare what policy cannot infer (
vmware_policy.roles.declare_role_metadata): escape tools, what
composite tools reach, how a missing target resolves. A skill that has not declared admitsadminonly. - Deny rules accept
roles:next toclients:. Token and role changes are audit rows (surfacecli), and a
server writes aroles_reloadrow with the file's SHA-256 and roles each timeroles.yamlchanges under it. - Host-path tools may not touch
<token file>.v2, its lock and temp files, orroles.yaml, wherever the token file
is. With roles enabled, a server whose tool registry cannot be read refuses to start. - A
PolicyDeniedraised inside a tool (vmware-pilot'sapprove, by role) is audited with its rule. token liststill prints one name per line;--longadds role and file.