Access & tokens
This page covers authenticating the CLI, minting tokens for CI and nodes, verifying the audit log, and exporting your tenant’s identity root.
Profiles
Section titled “Profiles”brig login opens your browser to authorize the CLI and writes the token to
~/.brig/config.json. For more than one workspace, use named profiles:
brig login --profile staging # authorize and store under "staging"brig --profile staging ps # use it for one commandbrig use staging # make it the active profile| Command | What it does |
|---|---|
brig login | Store credentials. --token for non-interactive; --no-browser to paste a token on stdin (headless/SSH); --cp-url to point at a specific control plane. |
brig logout | Remove the stored token for the active (or --profile) profile. |
brig whoami | Show the active profile, cp URL, whether a token is configured, and where each value came from. |
brig use <profile> | Switch the active profile. |
brig profiles | List configured profiles (* marks active). |
brig profiles rm <profile> | Remove a profile. |
Configuration precedence
Section titled “Configuration precedence”The CLI resolves each value in this order:
BRIG_PROFILE— selects a named profile from the config file.BRIG_CP_URL/BRIG_API_TOKEN— per-call overrides (the escape hatch for CI; not needed in normal use).- The active profile in
~/.brig/config.json(written bybrig login).
You don’t type a control-plane URL in normal use — the binary knows where to dial.
API tokens
Section titled “API tokens”For CI, scripts, and the proxy, mint tokens with brig token:
brig token create api --label "ci-deploy" --ttl 86400 --scope deploybrig token list apibrig token revoke api tok_abc123<kind> is one of:
api— a bearer token for the API. Pass--scope(repeatable) to limit it; omit for a legacy admin-scoped token. Use it from CI viaBRIG_API_TOKEN.node-join— a one-shot token that authorizes a server to join the fleet.brig node add/brig node provisionmint these for you, so you rarely call this directly.proxy— an API token pre-scoped for the mesh proxy (proxy:cert,proxy:endpoints).
The token value is shown once at creation — copy it then; it can’t be
retrieved later. --ttl is in seconds; 0 means no expiry.
List and revoke use the kind too: brig token list node, brig token revoke node <id>.
Audit log
Section titled “Audit log”Every privileged action is appended to a tamper-evident, hash-chained audit log. Verify the chain for your workspace:
brig audit verifyaudit chain intact (1284 events verified)If any event was altered or removed, the command reports AUDIT CHAIN TAMPERED
with the offending event id and the expected vs. actual hash, and exits
non-zero.
Tenant CA
Section titled “Tenant CA”Each workspace has its own root certificate authority backing the workload-identity mesh. Export it as PEM — useful for pinning, or for an external client that needs to verify mesh certificates:
brig tenant ca > tenant-ca.pemSee Networking for how the mesh uses these identities.