Skip to content
ArgusDocs
MenuTenancy, identity and security

Tenancy, identity and security

Projects isolated by row-level security, Tessera identity, per-project membership, sealed secrets, bring-your-own keys and a role-gated Control Center.

View as Markdown

On this page

Argus is invite-only and multi-tenant from the first migration. The design goal is that a bug in a handler cannot leak one tenant's data to another, and that nobody, including staff, gets power by a path that is easy to forget. This page covers the boundaries; the Security page is the threat model by area.

Trust boundaries

<figure class="diagram" data-diagram="boundaries"> <div class="diagram-scroll" role="region" aria-label="Figure 5, scrolls sideways" tabindex="0"> <svg class="d-w780" viewBox="0 0 780 524" role="img" aria-labelledby="dg-bounds-t dg-bounds-d" focusable="false"> <title id="dg-bounds-t">Trust boundaries and what is checked at each</title> <desc id="dg-bounds-d">Eight crossings, each drawn as a from-box, an arrow and a to-box. Visitor to landing: bot check and limits. Landing to API: a shared landing key. Browser to app server: a cookie and CSRF header, with tokens kept on the server. App server, CLI and apps to API: a verified Tessera access token. API to PostgreSQL: a runtime role that cannot bypass row-level security, with the project bound per transaction. API to tenant-chosen servers: an egress guard on the dialled address. API to the model providers: a short-lived federated token, or a sealed per-project provider key. Staff to admin routes: a realm role and a fresh sign-in before writes.</desc> <defs><marker id="dg-bounds-head" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="d-headfill" d="M0 0L10 5L0 10z"/></marker></defs> <circle class="d-dot" cx="14" cy="36" r="9"/> <text class="d-dotn" x="14" y="40" text-anchor="middle">1</text> <rect class="d-box d-client" x="34" y="14" width="190" height="44" rx="6"/> <text class="d-t" x="129" y="39" text-anchor="middle">Visitor</text> <rect class="d-box d-argus" x="556" y="14" width="190" height="44" rx="6"/> <text class="d-t" x="651" y="39" text-anchor="middle">Landing server</text> <line class="d-line" x1="232" y1="36" x2="548" y2="36" marker-end="url(#dg-bounds-head)"/> <text class="d-m" x="390" y="29" text-anchor="middle">Bot check and per-source limits</text> <text class="d-s" x="390" y="53" text-anchor="middle">No cookies, no tokens, no user content shown back</text> <circle class="d-dot" cx="14" cy="94" r="9"/> <text class="d-dotn" x="14" y="98" text-anchor="middle">2</text> <rect class="d-box d-argus" x="34" y="72" width="190" height="44" rx="6"/> <text class="d-t" x="129" y="97" text-anchor="middle">Landing server</text> <rect class="d-box d-argus" x="556" y="72" width="190" height="44" rx="6"/> <text class="d-t" x="651" y="97" text-anchor="middle">API</text> <line class="d-line" x1="232" y1="94" x2="548" y2="94" marker-end="url(#dg-bounds-head)"/> <text class="d-m" x="390" y="87" text-anchor="middle">Landing key plus visitor headers</text> <text class="d-s" x="390" y="111" text-anchor="middle">The API trusts those headers only with the key</text> <circle class="d-dot" cx="14" cy="152" r="9"/> <text class="d-dotn" x="14" y="156" text-anchor="middle">3</text> <rect class="d-box d-client" x="34" y="130" width="190" height="44" rx="6"/> <text class="d-t" x="129" y="155" text-anchor="middle">Browser</text> <rect class="d-box d-argus" x="556" y="130" width="190" height="44" rx="6"/> <text class="d-t" x="651" y="155" text-anchor="middle">App server (BFF)</text> <line class="d-line" x1="232" y1="152" x2="548" y2="152" marker-end="url(#dg-bounds-head)"/> <text class="d-m" x="390" y="145" text-anchor="middle">HttpOnly __Host- cookie, CSRF header</text> <text class="d-s" x="390" y="169" text-anchor="middle">Tokens stay on the server, encrypted</text> <circle class="d-dot" cx="14" cy="210" r="9"/> <text class="d-dotn" x="14" y="214" text-anchor="middle">4</text> <rect class="d-box d-client" x="34" y="188" width="190" height="44" rx="6"/> <text class="d-t" x="129" y="213" text-anchor="middle">App server, CLI, apps</text> <rect class="d-box d-argus" x="556" y="188" width="190" height="44" rx="6"/> <text class="d-t" x="651" y="213" text-anchor="middle">API</text> <line class="d-line" x1="232" y1="210" x2="548" y2="210" marker-end="url(#dg-bounds-head)"/> <text class="d-m" x="390" y="203" text-anchor="middle">Tessera access token</text> <text class="d-s" x="390" y="227" text-anchor="middle">Signature, issuer, audience, client, age</text> <circle class="d-dot" cx="14" cy="268" r="9"/> <text class="d-dotn" x="14" y="272" text-anchor="middle">5</text> <rect class="d-box d-argus" x="34" y="246" width="190" height="44" rx="6"/> <text class="d-t" x="129" y="271" text-anchor="middle">API</text> <rect class="d-box d-store" x="556" y="246" width="190" height="44" rx="6"/> <text class="d-t" x="651" y="271" text-anchor="middle">PostgreSQL</text> <line class="d-line" x1="232" y1="268" x2="548" y2="268" marker-end="url(#dg-bounds-head)"/> <text class="d-m" x="390" y="261" text-anchor="middle">Role argus_app owns nothing</text> <text class="d-s" x="390" y="285" text-anchor="middle">Project bound per transaction, forced RLS</text> <circle class="d-dot" cx="14" cy="326" r="9"/> <text class="d-dotn" x="14" y="330" text-anchor="middle">6</text> <rect class="d-box d-argus" x="34" y="304" width="190" height="44" rx="6"/> <text class="d-t" x="129" y="329" text-anchor="middle">API</text> <rect class="d-box d-client" x="556" y="304" width="190" height="44" rx="6"/> <text class="d-t" x="651" y="329" text-anchor="middle">Tenant-chosen servers</text> <line class="d-line" x1="232" y1="326" x2="548" y2="326" marker-end="url(#dg-bounds-head)"/> <text class="d-m" x="390" y="319" text-anchor="middle">Egress guard on the dialled address</text> <text class="d-s" x="390" y="343" text-anchor="middle">Service token bound to that server's audience</text> <circle class="d-dot" cx="14" cy="384" r="9"/> <text class="d-dotn" x="14" y="388" text-anchor="middle">7</text> <rect class="d-box d-argus" x="34" y="362" width="190" height="44" rx="6"/> <text class="d-t" x="129" y="387" text-anchor="middle">API</text> <rect class="d-box d-plat" x="556" y="362" width="190" height="44" rx="6"/> <text class="d-t" x="651" y="387" text-anchor="middle">Model providers</text> <line class="d-line" x1="232" y1="384" x2="548" y2="384" marker-end="url(#dg-bounds-head)"/> <text class="d-m" x="390" y="377" text-anchor="middle">Short-lived federated token, or BYOK key</text> <text class="d-s" x="390" y="401" text-anchor="middle">BYOK key sealed per project, sent per request</text> <circle class="d-dot" cx="14" cy="442" r="9"/> <text class="d-dotn" x="14" y="446" text-anchor="middle">8</text> <rect class="d-box d-client" x="34" y="420" width="190" height="44" rx="6"/> <text class="d-t" x="129" y="445" text-anchor="middle">Staff in the app</text> <rect class="d-box d-argus" x="556" y="420" width="190" height="44" rx="6"/> <text class="d-t" x="651" y="445" text-anchor="middle">API admin routes</text> <line class="d-line" x1="232" y1="442" x2="548" y2="442" marker-end="url(#dg-bounds-head)"/> <text class="d-m" x="390" y="435" text-anchor="middle">Realm role on every call</text> <text class="d-s" x="390" y="459" text-anchor="middle">Fresh sign-in (step-up) before any write</text> <rect class="d-box d-client" x="34" y="501" width="14" height="12" rx="3"/> <text class="d-s" x="54" y="512" text-anchor="start">Outside or tenant-controlled</text> <rect class="d-box d-argus" x="250" y="501" width="14" height="12" rx="3"/> <text class="d-s" x="270" y="512" text-anchor="start">Argus component</text> <rect class="d-box d-plat" x="400" y="501" width="14" height="12" rx="3"/> <text class="d-s" x="420" y="512" text-anchor="start">Platform service</text> <rect class="d-box d-store" x="550" y="501" width="14" height="12" rx="3"/> <text class="d-s" x="570" y="512" text-anchor="start">Database</text> </svg> </div> <figcaption>Figure 5. The trust boundaries between parties, and what is checked at each. Dashed boxes are outside Argus (people and their tools).</figcaption> </figure>

In words: eight crossings are drawn, each as a from-box, an arrow and a to-box, numbered to match the table below.

# Crossing What is checked
1 Visitor to the landing server A bot check on the invite form and per-source rate limits. The site sets no cookies and shows no user content back.
2 Landing server to the API A shared landing key. The API trusts the visitor's address and browser, forwarded in headers, only when the key is present. The key never reaches a browser.
3 Browser to the app server An HttpOnly cookie with the __Host- prefix. State-changing calls need a CSRF header and a matching origin. Tokens stay on the server, encrypted at rest.
4 App server, CLI or app to the API A Tessera access token, verified for signature, issuer, audience, client and age.
5 API to PostgreSQL A runtime role that owns nothing and cannot bypass row-level security, with the project bound for each transaction.
6 API to tenant-chosen servers The egress guard on the dialled address, and a service token bound to that server's audience. See Tools.
7 API to the model providers A short-lived token for the platform's own calls, obtained through the identity service and held in memory; or, for a bring-your-own model, the project's sealed provider key sent with that one request.
8 Staff to admin routes A realm role on every call, and a fresh sign-in before any write.

Identity: Tessera

Argus does not run a second identity system. People sign in through Tessera, in a realm only invited people can enter, with no password handled by Argus. The API trusts only Tessera-issued tokens: it verifies the signature against the realm's published keys (EdDSA or RS256 only, so none and the HMAC family never verify), the issuer, the audience, the issuing client from an allowlist, and the age. It keeps the last good key set for up to a day if the issuer is briefly unreachable, and limits how often an unknown key id can trigger a refresh.

  • Realm roles give platform rights: argus:admin, argus:operator, argus:member and argus:viewer.
  • Apps use client credentials and are registered per project. A person's token never carries an app's privileges, and an app's never a person's.
  • People in the browser use the authorization code flow with PKCE through the app server.
  • Delegation is planned. Acting on behalf of a person through token exchange is planned and refused until then.

Projects and forced row-level security

The unit of ownership is the project. Every table that holds project data has a project_id, and PostgreSQL enforces isolation under every query:

  • Each such table enables and forces row-level security through one helper. The policy matches project_id to a setting, app.project_id, that the runtime binds at the start of each transaction. A transaction with no project bound sees nothing.
  • The runtime role, argus_app, owns no table and has no bypass. The server refuses to start if its database role is a superuser, has the bypass attribute or owns a table in the application schema.
  • Work that must cross projects, such as the runner claiming the next run, the sweeper and staff views, binds app.all_projects explicitly, inside a store, never in an HTTP handler.
  • A project the caller does not belong to answers 404, never 403, so existence does not leak.
  • The migrator refuses a schema where a project table lacks the policy, and a test audits the catalog. A small, explicit list of global tables (projects, idempotency keys, client registrations, memberships and invite requests) is exempt; adding a name is a visible, reviewed edit, and those tables are reached only by the code paths that need them.

Membership and invitees

Tessera decides who may sign in; Argus decides where each person may act. argus:admin is an admin in every project. argus:operator has only the invite operations. argus:member has nothing by itself and a role in each project it belongs to, recorded in a membership table, and argus:viewer is capped at viewer.

Every invitee gets exactly one personal project on first sign-in. Creating it is idempotent, and a unique index makes two parallel onboarding calls produce one project. It starts on a trial budget that pauses runs when it is used up, and it is seeded with showcase agents. No invitee can see another's project, and each project's quotas and caps keep one tenant from degrading the others. Organisations above projects are not built.

Secrets

  • Sealed at rest. Webhook and trigger signing secrets, tenants' provider keys, the API keys of tool sources and the OAuth tokens of connected tool sources are encrypted with AES-256-GCM. A ciphertext is bound to its table, column, project and, for provider keys, provider (for a tool source's key, the source), so a copy placed on another row does not open. The keys are held outside the database, a key can be retired by re-sealing everything under the newest one, and a migration check keeps sealed columns from being forgotten.
  • Shown once. A secret is returned when created and never again. Stored idempotent replays are sealed too, so a replay cannot expose a secret that was shown once.
  • Scrubbed. Logs, including exported ones, are scrubbed of credentials.
  • Platform credentials live in the per-environment secrets store and reach a process only if its bundle lists them. They are never in chat, files or command arguments.

Bring your own key

A project can run models on its own Anthropic or OpenAI account. The key is stored sealed in the project and sent to that provider's own address only in the single request that uses it; the address is never taken from the request. Those calls go through a separate path that holds no platform credential, so a bring-your-own call can never use a platform one, and a platform call can never use your key.

  • A byok- model works only in a project that has that provider's key, and the API refuses a label move or session start otherwise.
  • There is no fallback: a bring-your-own run never falls back to platform credentials, and a provider or key problem is never retried on the platform credential.
  • The API shows the provider, the last four characters and when it was set, never the key. Writing one needs a fresh sign-in.
  • The ledger records such calls at zero platform cost. The provider bills the project, and the trial budget does not count them.

The app and staff

The Control Center is the staff system-administration view inside the app. It is one rail item for staff, with tabs for requests, invites, projects, spend, health and settings. There is no separate admin application, host or deploy target.

  • Roles are enforced on the server. The API checks the realm role on every /v1/admin call; hiding a tab in the interface is never the protection. Everyone else sees a forbidden state.
  • Step-up before writes. The app server requires a recent sign-in, ten minutes by default, before any write under the admin routes, and sends the person through a fresh authentication if theirs is older. The same applies to overriding the eval gate and writing a provider key.
  • The app server is the browser's only counterpart. It holds sessions server-side in its own schema, enforces CSRF, serves a strict, enforced Content-Security-Policy, and ends a session when Tessera signals a sign-out.
  • Audit. Staff actions are logged with the subject. Project suspension is one of them.

Observability and operations covers how all of this is watched.