Settings: shared keys
Shared keys
Open Keys and choose Shared (administrators only).
Shared keys are the keys the gateway uses to reach model providers and connectors. The page shows each by its name; a
model route or a connector in a configuration file refers to it as secrets/<name> (in models.toml), which
Who may use states. A route or connector may use a key only once the key allows it (see
Who may use a shared key).
Values are write-only. The page shows a key's name, what uses it and when it last changed, never its value, and no page or API returns it. Adding, replacing or deleting a shared key needs a signed-in browser session: an API token cannot change them.
The list
| Column | Meaning |
|---|---|
| Name | The key's name on one line (a long name is shortened; point at it for the whole name), and Rotation due when its reminder has passed. A key from the configuration file says so under its name (Configuration file, or No longer in the configuration file); a key added here says nothing |
| Used by | The models that send it (more than two read as a count, such as 3 models; point at it for the list), or Not used. Which routes, connectors and engines may use it is in Who may use |
| Last changed | When its value last changed, and its reminder |
Each row has Replace and a … menu with Reads, Who may use, Reminder and Delete.
Add, replace or delete
- Add a shared key opens a dialog: a Name (letters, digits,
-and_, up to 120 characters), a Value, and under Use it for the routes, connectors and engines that may use it, then Add key. Routes and connectors that already name the key may use it anyway. Names starting withgit-orconnector-are reserved for people's own keys: they are not listed here, cannot be replaced or deleted here, and no route or connector may use them. A name that looks like a key itself (a key pasted into Name) is refused: "This looks like a key, not a name. Put the key under Value and give it a short name, such as openai." A key added earlier under such a name can still be replaced or deleted, but no route, connector or engine may use it. - Replace: enter the New value, then Replace key. For a key from the configuration file, the page notes that your value stays until the file's value for it changes.
- Delete (in the row's … menu): asks for confirmation (Delete key) and cannot be undone. A key that a route still uses cannot be deleted; the menu shows Delete as unavailable with "A model route uses it; change the route first." Change or delete the route first.
If the store is full, the page says how many keys it allows. Delete an unused key to add another.
A key can also be stored from a route's form, with Paste key (see Add or edit a route).
Who may use a shared key
"A route or connector can use this key only when it is ticked here." Who may use, in the row's … menu, opens the list of routes and connectors, grouped as Model routes, Connectors and Decision engines, with the key's reference ("Configuration files refer to it as secrets/…"); tick the ones that may use the key and Save. The ticked ones are the key's list; the Shared keys table doesn't repeat it. A route or connector that no longer exists is marked "(no longer exists)" until you untick it.
A route or connector that names a key it isn't allowed to use is refused when saved, with "… isn't allowed for this route. Allow it first." (or "for this connector"). The form offers Allow it for …, which ticks it for you; then save again.
A key is also allowed without ticking it in two cases:
- A route in
models.tomlor a connector ingateway.tomlis allowed the key it names when the file seeds it. - A route or connector saved with a key that doesn't exist yet is allowed that key, so adding it later in Keys, Shared makes it work.
A new key otherwise allows nothing until you tick its users. People's own keys are never allowed for anything else; only their owner's tasks use them.
Rotation reminders
Reminder, in the row's … menu, sets how often the value should change: No reminder, a number of days from the list, or Other (1 to 3650 Days), then Save reminder. When the value is older than that, the list shows Rotation due. The reminder only tells you: the key keeps working after it. Replacing the value starts the count again; changing the reminder alone does not.
Reads
Reads, in the row's … menu, shows every time the gateway read the secret for a task, newest first, 50 at a time (Load older shows more): When, the Person whose task it was, the Task (with Open the task, or No task; the column shows only when a read has a task or an unknown run), what it was Used by (a route or a connector), and the Outcome: Read, No value at the time or Store unavailable. A read that can't be tied to one of the task's runs says Run unknown under its task: the call named no run (an older agent runtime, or the gateway's own call such as naming a task), or named a run that isn't the task's. A connector's reads never belong to a run, so they don't say it. Values never appear. A person sees the same for their own keys on the Keys page, without the Person column.
Shared keys for web services
Open Keys and choose Shared; Shared keys for web services follows the shared keys above. A key for a web service lets tasks call that service, such as a package mirror or a team's bot account on a tracker, without the agent ever holding it: each run gets a stand-in, and the gateway swaps in the value only at the key's web address, for that run (ADR-0037). People add their own such keys under Mine (see the user guide); only administrators add shared ones.
A run gets the keys of the person whose message started it: their own keys, and the shared keys whose Who may use it includes them, for the web addresses the task may reach. A key for an address that Internet access doesn't allow is given to no run.
The list
| Column | Meaning |
|---|---|
| Name | What tasks call the key ($PYPI_MIRROR); it opens the key's page |
| Web address | The host, with a path when the key is limited to part of it, and the port when it isn't 443 |
| Who may use it | Everyone in this installation, or how many people, such as 2 people: choose it to list them |
| Last used | When, and in which task; point at it for how many times and by whom |
Add or change a shared key
Add a shared key for a web service opens Add a shared key, the same page as a person's own key (web address, name, how the service expects it, and the key, write-only) with Who may use it:
- Everyone in this installation (the default), or Chosen people: Add a person offers the installation's people, and each chosen person shows with its × to remove them. A chosen person whose account was removed reads Removed account. With nobody chosen: "Choose at least one person, or Everyone."
- A shared key's name must differ from the other shared keys': "… is already the shared key for …. Pick another name."
- It must also differ from the names that the people who may use it gave their own keys, since a name means one key to a task. Saving is refused, at Name, when it doesn't: "Someone who may use this key already has their own key named …. Choose another name." The words name nobody on purpose: which member, and what they call their keys, is theirs. The same refusal comes when Who may use it grows to take such a person in.
Choose a key's name in the list to open its page: replace its value, change it, see Show all uses (every use and refusal, and whose task it was), or Delete… it, as on a person's own key.
Members' own keys
Members' own keys for web services lists every member's own key by Person, Web address and Last used, never the key's name or its value: a member's key is exposed only to them (ADR-0037 Amendment 1). An administrator can't use, change or share it, only delete it: Delete… in the row's ⋯ menu asks "Delete …'s key for …?", says "Their tasks can't use … with it any more. Only … can add it again.", then Delete key. If the member changed the key meanwhile: "Someone changed this key since you opened it. Delete again to delete it as it is now."
What members see
Members get a read-only Shared tab too: Shared keys you may use, with each key's name, web address and their own last use only. They never see who else may use a key, or anyone else's use of it. In a task, the step that used a key names it only to the person whose run it is; anyone else who can see the task reads that a key was used, and why one wasn't sent, without its name (see the user guide).