CALIBER
Quickstart

Cookbook 18 · Govern

Projects, Roles, Tokens & Audit

Set up a nine-person team in a workspace with owner, editor, reviewer and viewer roles, bind an access token to it, and read the audit trail.

GovernCore45–60 min
What you build. A nine-person support team in a workspace (the UI says workspace, the API says project): accounts from team-roster.csv, project roles, and a role matrix proved with 72 real requests (9 people x 8 actions) from role-matrix.csv. An editor issues an access token bound to the workspace, uses it from caliberctl and the Python SDK to release one prompt, and sees it refused (403) in another project and (401) once revoked or expired. The audit log, the release timeline and live board, and /health and /readiness record and explain all of it.
Surfaces: Administration Workspaces Settings Audit Log Releases
What you learn
  • Create the nine accounts under Admin > Administration > Accounts, create a workspace from the top bar (its creator is the primary owner) and add members under Project access as Owner (Admin), Editor, Reviewer or Viewer
  • Read the role matrix: a non-member gets 404, a viewer 403, and the primary owner cannot be removed or demoted (409); both the platform scope (CALIBER_OPERATOR_USERS, CALIBER_APPROVER_USERS) and the project role must allow a write
  • Issue a token in Admin > Settings > API tokens bound to one workspace (secret shown once), then see it refused with 403 in another project and with 401 once revoked or expired
  • Find each action in Operate > Audit Log by actor, action and entity ID (admin only; no token secret in any row; requests the project gate refuses are not audited)
  • Read the prompt release on Prompt lifecycle > Releases (one Promote event, What's live now), and /readiness plus the Simulated providers banner

Implementation flow

flowchart LR
  AD["Admin: create 9 accounts"] --> WS["maya creates workspace: primary owner"]
  WS --> MB["Project access: add 7 members with roles"]
  MB --> RM["Role matrix: 72 requests"]
  MB --> TK["priya issues token bound to workspace"]
  TK --> UV["SDK and caliberctl: release a prompt to prod"]
  TK --> RF["403 other project, 401 revoked or expired"]
  UV --> RL["Releases: Promote event + live board"]
  RM --> AU["Audit Log: actor, action, entity"]
  RF --> AU
  RL --> RD["Readiness: eval and llm simulated"]

Step-by-step UI only

Each step shows the exact navigation path, the fields to fill, the button to click, and a snapshot of the CALIBER screen you'll be on.

  1. Admin › Administration › Accounts creates · nine accounts team-roster.csv ↓
    Sign in as admin / admin. An account holds a password only, so first create the nine people in team-roster.csv. For each one type the User ID and the Password (at least 12 characters; this lab uses lab18-demo-passphrase, which is public, so use it only on a stack nobody else can reach) and click Create account. The server must already list the roster in CALIBER_OPERATOR_USERS and CALIBER_APPROVER_USERS (see the README): those lists, not the project role, decide who may write or approve at all.
    Fill in
    User IDmaya, omar, priya, sam, quinn, rosa, victor, wen, nora
    Passwordlab18-demo-passphrase
    Click Create account
    You'll see: A green note Created maya. after each, and nine rows in the table, each Active. An account an earlier cleanup disabled shows an Enable button instead.
    Screen snapshot
    caliber · Admin › Administration › Accounts
    Accounts
    Create account
  2. Top bar › Create workspace creates · workspace lab18-support-copilot (maya is primary owner)
    Sign out and sign in as maya (a team lead who holds both the operator and approver scopes). In the top bar click the + beside the workspace selector (Create workspace), name it, and click Create and select. The UI says workspace; the API says project. They are the same object.
    Fill in
    Workspace namelab18-support-copilot
    Click Create and select
    You'll see: The workspace selector now shows the new workspace. The person who creates a workspace is its primary owner: that role cannot be removed or demoted later.
    Screen snapshot
    caliber · Top bar › Create workspace
    Create workspace
    Create and select
  3. Admin › Administration › Project access creates · seven members with roles team-roster.csv ↓
    Still as maya, open Administration and scroll to Project access. The Project for access management selector shows your workspace. For each of the other seven members in the roster type the User ID, choose the Role and click Add member. Do not add nora: she is the non-member. (The Accounts and Secrets sections show missing required scope ... caliber.admin for maya: she is an owner, not an admin, and Project access works regardless.)
    Fill in
    omarOwner (Admin)
    priya, samEditor
    quinn, rosaReviewer
    victor, wenViewer
    Click Add member
    You'll see: A green note Added omar to lab18-support-copilot. after each. The table lists maya (primary owner) with no Remove button and each member with the role you chose; nora is not listed.
    Screen snapshot
    caliber · Admin › Administration › Project access
    Project access
    Add member
  4. Prompt lifecycle › Prompts › New prompt creates · viewer and reviewer refused, editor creates, releases and revises a prompt
    Sign in as victor (viewer), choose the workspace in the top bar, open Prompts, click New prompt then Write / paste, enter a Prompt name and some Prompt text, and click Create and Open. Then open Administration › Project access as victor. Sign in as priya (editor), choose the workspace, and create the prompt the same way. Still as priya, back on Prompts search for it, click Edit, change the Template, click Save new version and then Promote v2 to @prod. Finally sign in as quinn (reviewer) and try to create a prompt.
    Fill in
    Prompt namelab18-support-reply
    Prompt textReply to the customer politely. then a blank line and Question: {question}
    Click Create and Open
    You'll see: For victor: project role 'viewer' cannot perform resource.write.runtime, and on Administration the line Only a project Admin can manage members. with no Add member form. For priya: the prompt opens with v1 marked Live (creating a prompt releases its first version to @prod); after the edit v2 is Live and v1 is not. For quinn: project role 'reviewer' cannot perform resource.write.runtime.
    Screen snapshot
    caliber · Prompt lifecycle › Prompts › New prompt
    PromptsNew prompt
    Create and Open
  5. Top bar › workspace selector (as a non-member) creates · non-member sees no workspace
    Sign in as nora, who is an operator but belongs to no workspace. Open the workspace selector.
    You'll see: It holds only All workspaces: the workspace does not appear at all. Through the API every request she makes against it is a 404, not a 403: as far as she can tell it does not exist.
    Screen snapshot
    caliber · Top bar › workspace selector (as a non-member)
    workspace selector (as a non-member)
    Read / inspect this surface — no form to fill.
  6. Admin › Administration › Project access creates · role changed, member offboarded
    As maya, open Administration › Project access and choose the workspace. Set Role for sam to Viewer, then click Remove on victor's row. Sign in as sam and try to create a prompt; check victor's workspace selector.
    You'll see: A note says Changed sam to viewer., then Removed victor from the project. and his row is gone. sam is now refused (project role 'viewer' cannot perform resource.write.runtime) and victor no longer sees the workspace.
    Screen snapshot
    caliber · Admin › Administration › Project access
    Project access
    Read / inspect this surface — no form to fill.
  7. Admin › Settings › API tokens creates · token support-ci bound to the workspace
    Sign in as priya and open Settings then the API tokens tab. Name the token, keep Expires at 30 days, pick the workspace in Workspace (each is listed with your role in it), tick caliber.operator and click Create token. Copy the secret now; it is shown once.
    Fill in
    Token namesupport-ci
    Expires30 days
    Workspacelab18-support-copilot (editor)
    Scopescaliber.operator (and caliber.viewer, preselected)
    Click Create token
    You'll see: A green box: Copy this token now. It will not be shown again. with the calpat_... secret. Click I have copied it: the secret is gone for good. Your tokens lists support-ci as Active with its scopes and workspace. Use it as CALIBER_TOKEN with caliberctl or the SDK: it acts in this workspace, is refused (403) in any other, and can never do more than priya can.
    Screen snapshot
    caliber · Admin › Settings › API tokens
    SettingsAPI tokens
    Create token
  8. Admin › Settings › API tokens › Revoke creates · revoked token
    On the support-ci row click Revoke, read the confirmation and click Revoke token.
    Click Revoke token
    You'll see: The row reads Revoked and its Rotate and Revoke buttons are gone. Anything still using the secret now gets 401.
    Screen snapshot
    caliber · Admin › Settings › API tokens › Revoke
    SettingsRevoke
    Revoke token
  9. Operate › Audit Log creates · audit rows by entity, actor and action
    Sign in as admin and open Audit Log (only an admin can: maya sees Admin access required). Find the workspace's id first: set Actor maya and Action create_project; the row that names your workspace shows project · PRJ-... in Entity. Clear both and put that id in Entity ID, then try Action add_project_member, and finally Actor priya with Action create_personal_access_token and then revoke_personal_access_token.
    Fill in
    Entity IDthe workspace id (PRJ-...)
    Actionadd_project_member
    Actorpriya
    Actioncreate_personal_access_token
    You'll see: With the entity id: one create_project row by maya and seven add_project_member rows whose details name each role, one update_project_member (sam) and one remove_project_member (victor). For priya and promote_prompt: two rows, the prompt's two releases. Then for priya: a create_personal_access_token row whose details carry the workspace id and the scopes, and no secret, and later the revoke_personal_access_token row. Refused requests (a viewer's 403) write no row: the log records what changed.
    Screen snapshot
    caliber · Operate › Audit Log
    Audit Log
  10. Prompt lifecycle › Releases creates · prompt release on the timeline and live board
    Open Releases. What's live now is the live board; Timeline is the history of promotions and rollbacks. The release timeline is not workspace-scoped in the alpha, so other prompts may appear too.
    You'll see: What's live now has a row for your prompt at v2 on @prod, priya as the actor; Timeline has two Promote events for it (v2, then v1), both by priya.
    Screen snapshot
    caliber · Prompt lifecycle › Releases
    Releases
    Read / inspect this surface — no form to fill.
  11. Any page › top bar and banner creates · health dot and simulated-provider banner
    Look at the top bar and the banner under it. The green dot is /health (the process and the database are up); the banner is built from /readiness. You can also read both by hand: curl $CALIBER_API/health and curl $CALIBER_API/readiness.
    You'll see: The amber banner says Simulated providers: eval, llm are running in fake mode and Evaluation scores are canned, not measurements.; the dot's tooltip is API and database reachable. A missing dependency would add a red Not ready line naming it, and /readiness would answer 503.
    Screen snapshot
    caliber · Any page › top bar and banner
    top bar and banner
    Read / inspect this surface — no form to fill.

Assets (copy-paste)

The exact files this cookbook uses — copy each into the matching field. Source: docs-site/cookbooks/18-projects-roles-tokens-audit/assets/.

assets/dataset/team-roster.csv
user_id,display_name,job_title,project_role,platform_scopes,why_they_are_in_the_roster
maya,Maya Chen,Support engineering lead,owner,operator+approver,Creates the project so she is its primary owner (cannot be removed or demoted)
omar,Omar Haddad,Support operations manager,owner,operator+approver,A second owner: a secondary admin who manages members but is not the primary owner
priya,Priya Nair,Prompt engineer,editor,operator,Writes and releases prompts; the identity that gets the project-bound token
sam,Sam Okafor,Prompt engineer,editor,operator,A second editor: proves the editor column is about the role and not one person
quinn,Quinn Larsen,QA lead,reviewer,operator+approver,Runs evaluations and records evidence but cannot change or release anything
rosa,Rosa Alvarez,QA analyst,reviewer,operator,A second reviewer without the approver scope
victor,Victor Petrov,Product manager,viewer,operator,A viewer who also holds the operator scope: the 403 names the missing project role
wen,Wen Zhao,Compliance auditor,viewer,none,A viewer with no operator scope: the 403 comes from the platform scope instead
nora,Nora Whitfield,Billing platform engineer,none,operator,Not a member of the project: every project request is a 404

Evaluation & quality gates

Quality gateTarget
Role matrixall 72 requests (9 people x 8 actions) return the status role-matrix.csv expects, 0 mismatches
Bound tokenacts in its own workspace; 403 in another project; 401 once revoked or expired
Primary ownercannot be removed (409) or demoted (409); no role can be escalated by the person asking
Failure scenariosF01-F15 refused with the documented status and text (F16 CSRF only when the server enables it)
Auditone row for each action, filterable by actor, action and entity; 0 rows carry a token secret
Release and readinessone Promote event for the prompt by the editor, prompt live at v1 on @prod; /readiness ready and names eval and llm as simulated
Developer notes & gotchas
  • Flags. CALIBER_FEATURE_COOKBOOKS=true only opens the gallery (the lab is listed and installable); projects, roles, tokens, audit and readiness need no flag. Start with scripts/cookbook-env.sh up lab18 --flags cookbooks.
  • Server platform scopes are required. Export CALIBER_ADMIN_USERS=admin, CALIBER_OPERATOR_USERS=admin,maya,omar,priya,sam,quinn,rosa,victor,nora and CALIBER_APPROVER_USERS=admin,maya,omar,quinn before the stack starts: an account holds a password only. wen is on neither list on purpose; nora is an operator in no project.
  • Two different 403s. A viewer who is an operator (victor) is refused by the project role; one who is not (wen) is refused by the platform scope first. A non-member gets 404, not 403. Only someone on both operator and approver lists may be an owner (409).
  • Simulated vs real. Nothing calls a model (default fake LLM/eval providers). The only visible effect is the evaluation.run row: an allowed member gets 400 evaluation requires a real LLM provider (201 with a real provider; the matrix accepts 400|201), a viewer gets 403.
  • Limitations the lab shows. Traces and prompt releases are not project-scoped (the timeline lists promotions from every project; the prompt inventory is scoped); requests the project gate refuses are not audited (Apply's own refusals are); apply has no second approver unless the two-person rule is on, which is off in this lab's development default. GET /me answers anonymous for a revoked token, so check a route that needs a user.
  • Demo password. Every roster account uses the public password lab18-demo-passphrase: create them only on a stack nobody else can reach. Leave CALIBER_PROJECT unset so the bound token visibly acts in its own project.
  • Run it. PYTHONPATH=sdk/caliber-sdk caliber/.venv/bin/python -m examples.cookbooks.cookbook_18_projects_roles_tokens_audit (about ten seconds; --cleanup archives the lab18-* projects and disables the nine accounts). UI spec: 18-projects-roles-tokens-audit.spec.ts.

CALIBER : Contextual Adaptive Lifecycle for Intelligent Build, Evaluation, and Refinement — Cookbooks — every recipe is UI-implementable on the shipped platform. Source + assets under docs-site/cookbooks/<nn>-…/. Regenerate with python3 docs-site/cookbooks/training/build.py.