Permission management
Valar organizes access control by namespace: service for services and kv for the integrated key-value store (the HTTP API also accepts legacy). You need manage permission on a path to inspect or change its rules.
Listing permissions
List the permissions in your current project with valar auth list:
valar auth listPATH USER ACTION STATE
service:myproject human:anonymous invoke allowed
service:myproject human:myuser invoke allowed
service:myproject human:myuser manage allowed
service:myproject human:myuser read allowed
service:myproject human:myuser write allowedBy default, the command lists rules under service:myproject. Pass a path prefix such as service:myproject/helloworld to filter the output.
Changing permissions
Use allow, forbid, or clear to update permissions for a path, user, and action:
allowandforbidadd a new rule or update an existing one.clearremoves an exact matching rule so access falls back to inherited rules.
For example, to forbid anonymous users from invoking helloworld:
valar auth forbid service:myproject/helloworld human:anonymous invokemodifiedChecking permissions
Check whether a user is allowed an action on a path with valar auth check:
valar auth check service:myproject/helloworld human:anonymous invokeforbiddenEvaluation
Permissions use a prefix tree. Both paths and service users match by prefix: myproject matches myproject and myproject/helloworld, but not otherproject.
Rules can match human or service users. When helloworld accesses the key-value store, it authenticates as service:myproject/helloworld, and service users follow the same prefix-matching rules as paths.
human users are not hierarchical; they use subset matching:
human:anonymousmatches anyhumanuser.human:authenticatedmatches allhumanusers excepthuman:anonymous.human:myusermatches only the exact accountmyuser.
Exact user matches (human:myuser) take priority over human:authenticated, and human:authenticated takes priority over human:anonymous.
To manage permissions over HTTP, see Permissions (the API uses unset where the CLI uses clear).