Skip to main content

Variable: PRINCIPALS

const PRINCIPALS: readonly ["gateway", "gateway-admin", "bootstrap", "credential", "audit", "provisioning", "agent-shared"]

Defined in: packages/contracts/src/permissions/table.ts:16

The broker principals: one NATS user, one nkey, one permission set each. A principal is a deployable, and subjects name modules, not principals (see HOSTS). Adding one is a deliberate act: it appears here, the generator emits its permissions, and its NKEY_<PRINCIPAL> variable must exist before the broker starts, so a principal is added only when its deployable is.

Slice 3 adds two (D3.8, D3.16). provisioning hosts the module of the same name. agent-shared is the shared agent instance: it hosts no module and is no participant, and the only rows that name it are command rows (CommandRule).