Vigile
SearchContents

How it works

Users, keys and who can do what

Every change is made by someone. Who that is comes from the API key a connection sends, or from the instance's choice of who a connection without a key is.

Who a connection acts as A connection that sends a key which is valid acts as the user the key was made for. A connection that sends a key which is not valid is refused. A connection without a key acts as the keyless user, agent1 by default, when the setting auth.keyless_user names one, and is refused when the setting is empty. A connection MCP, HTTP, page with a key Bearer vig_… without a key no header at all valid not valid keyless_user = "agent1" keyless_user = "" acts as the user the key was made for refused unauthorized acts as agent1 the keyless user refused unauthorized admin always needs its key. A key that is not valid never falls back to the keyless user.
A connection with a valid key acts as the user the key was made for. One without a key acts as the keyless user, if the instance has one. A key that is not valid is refused, and never falls back to the keyless user.

Users

A user is an item in the plan like a task: it has an ID, a version and a history of what was done to it. The tasks it is given are not in that history: they are in the tasks'. It has a username and one of three types.

TypeIsMay call
adminWhoever maintains the instance. Creates users, resets keys, deletes for good, reads the service's status.21 of 21 operations
personA human that work can be assigned to.19 of 21 operations
agentAn AI agent.19 of 21 operations

Every instance starts with three users:

UserTypeFor
adminadminMaintenance. It always needs its API key, which config init writes into the config file.
userpersonA person that agents can assign work to. It has no key until one is issued.
agent1agentWho a connection without an API key acts as, unless the config says otherwise.

More agents mean more users: give each agent its own, so that their work can be told apart in the history and each can be assigned its own tasks.

Keys

A key is a long random text that starts with vig_, sent with every request as Authorization: Bearer vig_....

  • The service makes a key when a user is created or its key is reset, and shows it once.
  • Keys are kept in the instance's config file, which only your account can read, and apply at once.
  • A key counts only for the user it was made for, and admin always needs its key.

Without a key

By default, a connection without a key acts as agent1, and can read and change the plan. That is the setting auth.keyless_user. It makes the first minutes easy and is fine while the service listens on 127.0.0.1 only.

Set it to nothing and every connection needs a key:

vigile config set auth.keyless_user ""

Do that before the service can be reached from another machine. serve and the doctor both warn while it is open on a network address. See Security.

What a user may do

Everyone in an instance sees the whole plan, and every user may call the operations that read and change projects, tasks and links. What depends on the type:

  • Creating users and resetting keys are operations for admins. They are not even listed for anyone else: an agent's list of tools does not have them.
  • Deleting for good, and deleting or restoring a user, are for admins, within operations everyone may call.
  • The status of the service is for admins.

There is no access by team or by item: whoever is let in may read and change everything but users and keys.

The command line and the page

The command line acts as admin unless a command is given --as <username>; it takes the key from the config file. The page mostly reads the plan; a task panel's priority −/+ controls call update_task as the browser's current user. When a key is required the page asks for one and keeps it in that browser.

Reference