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
/readinessplus 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.
- 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 useslab18-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 inCALIBER_OPERATOR_USERSandCALIBER_APPROVER_USERS(see the README): those lists, not the project role, decide who may write or approve at all.Fill inUser ID maya,omar,priya,sam,quinn,rosa,victor,wen,noraPassword lab18-demo-passphraseClick Create accountYou'll see: A green noteCreated maya.after each, and nine rows in the table, each Active. An account an earlier cleanup disabled shows an Enable button instead.Screen snapshotcaliber · Admin › Administration › AccountsCreate account Top bar › Create workspacecreates · workspace lab18-support-copilot (maya is primary owner)Sign out and sign in asmaya(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 inWorkspace name lab18-support-copilotClick Create and selectYou'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 snapshotcaliber · Top bar › Create workspaceCreate and select- 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 addnora: she is the non-member. (The Accounts and Secrets sections showmissing required scope ... caliber.adminformaya: she is an owner, not an admin, and Project access works regardless.)Fill inomar Owner (Admin) priya, sam Editor quinn, rosa Reviewer victor, wen Viewer Click Add memberYou'll see: A green noteAdded omar to lab18-support-copilot.after each. The table listsmaya (primary owner)with no Remove button and each member with the role you chose;norais not listed.Screen snapshotcaliber · Admin › Administration › Project accessAdd member Prompt lifecycle › Prompts › New promptcreates · viewer and reviewer refused, editor creates, releases and revises a promptSign in asvictor(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 asvictor. Sign in aspriya(editor), choose the workspace, and create the prompt the same way. Still aspriya, back on Prompts search for it, click Edit, change the Template, click Save new version and then Promote v2 to @prod. Finally sign in asquinn(reviewer) and try to create a prompt.Fill inPrompt name lab18-support-replyPrompt text Reply to the customer politely.then a blank line andQuestion: {question}Click Create and OpenYou'll see: Forvictor: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. Forpriya: 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. Forquinn:project role 'reviewer' cannot perform resource.write.runtime.Screen snapshotcaliber · Prompt lifecycle › Prompts › New promptCreate and OpenTop bar › workspace selector (as a non-member)creates · non-member sees no workspaceSign in asnora, 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 snapshotcaliber · Top bar › workspace selector (as a non-member)Read / inspect this surface — no form to fill.Admin › Administration › Project accesscreates · role changed, member offboardedAsmaya, open Administration › Project access and choose the workspace. Set Role for sam to Viewer, then click Remove onvictor's row. Sign in assamand try to create a prompt; checkvictor's workspace selector.You'll see: A note saysChanged sam to viewer., thenRemoved victor from the project.and his row is gone.samis now refused (project role 'viewer' cannot perform resource.write.runtime) andvictorno longer sees the workspace.Screen snapshotcaliber · Admin › Administration › Project accessRead / inspect this surface — no form to fill.Admin › Settings › API tokenscreates · token support-ci bound to the workspaceSign in aspriyaand 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 inToken name support-ciExpires 30 daysWorkspace lab18-support-copilot (editor)Scopes caliber.operator(andcaliber.viewer, preselected)Click Create tokenYou'll see: A green box: Copy this token now. It will not be shown again. with thecalpat_...secret. Click I have copied it: the secret is gone for good. Your tokens listssupport-cias Active with its scopes and workspace. Use it asCALIBER_TOKENwithcaliberctlor the SDK: it acts in this workspace, is refused (403) in any other, and can never do more thanpriyacan.Screen snapshotcaliber · Admin › Settings › API tokensCreate tokenAdmin › Settings › API tokens › Revokecreates · revoked tokenOn thesupport-cirow click Revoke, read the confirmation and click Revoke token.Click Revoke tokenYou'll see: The row reads Revoked and its Rotate and Revoke buttons are gone. Anything still using the secret now gets 401.Screen snapshotcaliber · Admin › Settings › API tokens › RevokeRevoke tokenOperate › Audit Logcreates · audit rows by entity, actor and actionSign in asadminand open Audit Log (only an admin can:mayasees Admin access required). Find the workspace's id first: set Actormayaand Actioncreate_project; the row that names your workspace showsproject · PRJ-...in Entity. Clear both and put that id in Entity ID, then try Actionadd_project_member, and finally Actorpriyawith Actioncreate_personal_access_tokenand thenrevoke_personal_access_token.Fill inEntity ID the workspace id ( PRJ-...)Action add_project_memberActor priyaAction create_personal_access_tokenYou'll see: With the entity id: onecreate_projectrow bymayaand sevenadd_project_memberrows whose details name each role, oneupdate_project_member(sam) and oneremove_project_member(victor). Forpriyaandpromote_prompt: two rows, the prompt's two releases. Then forpriya: acreate_personal_access_tokenrow whose details carry the workspace id and the scopes, and no secret, and later therevoke_personal_access_tokenrow. Refused requests (a viewer's 403) write no row: the log records what changed.Screen snapshotcaliber · Operate › Audit LogPrompt lifecycle › Releasescreates · prompt release on the timeline and live boardOpen 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 atv2on@prod,priyaas the actor; Timeline has two Promote events for it (v2, then v1), both bypriya.Screen snapshotcaliber · Prompt lifecycle › ReleasesRead / inspect this surface — no form to fill.Any page › top bar and bannercreates · health dot and simulated-provider bannerLook 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/healthandcurl $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/readinesswould answer 503.Screen snapshotcaliber · Any page › top bar and bannerRead / 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/.
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 gate | Target |
|---|---|
| Role matrix | all 72 requests (9 people x 8 actions) return the status role-matrix.csv expects, 0 mismatches |
| Bound token | acts in its own workspace; 403 in another project; 401 once revoked or expired |
| Primary owner | cannot be removed (409) or demoted (409); no role can be escalated by the person asking |
| Failure scenarios | F01-F15 refused with the documented status and text (F16 CSRF only when the server enables it) |
| Audit | one row for each action, filterable by actor, action and entity; 0 rows carry a token secret |
| Release and readiness | one 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=trueonly opens the gallery (the lab is listed and installable); projects, roles, tokens, audit and readiness need no flag. Start withscripts/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,noraandCALIBER_APPROVER_USERS=admin,maya,omar,quinnbefore the stack starts: an account holds a password only.wenis on neither list on purpose;norais 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 anowner(409). - Simulated vs real. Nothing calls a model (default
fakeLLM/eval providers). The only visible effect is theevaluation.runrow: an allowed member gets 400evaluation requires a real LLM provider(201 with a real provider; the matrix accepts400|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 /meanswersanonymousfor 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. LeaveCALIBER_PROJECTunset 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;--cleanuparchives thelab18-*projects and disables the nine accounts). UI spec:18-projects-roles-tokens-audit.spec.ts.