Delegated Authorization for AI Agents — new self-guided workshop - #8
Open
sohanmaheshwar wants to merge 27 commits into
Open
Delegated Authorization for AI Agents — new self-guided workshop#8sohanmaheshwar wants to merge 27 commits into
sohanmaheshwar wants to merge 27 commits into
Conversation
…container, header hyphens
Author 1-run-the-agent.md: quotes the authz.decide() WORKSHOP STUB, walks the goose over-reach (deploy + destroy production both ALLOWED with no boundary), the deterministic scripts/verify.py --checkpoint 1 path, and the ambient- authority takeaway. No web UI in this checkpoint (no schema until CP2). Also fixes a real bug found while verifying the goose path: deploybot_server's _load_state() crashed with FileNotFoundError on a fresh checkout because infra_state.json is only ever created by the web UI's /api/reset (CP2+), never by bootstrap.py or on first run. Treat a missing file as "no environments" so list_environments/deploy/destroy work before the web UI has ever run.
…CP4 suspended-state over-claim)
…, verbatim abstract, nextsteps fidelity
…oints Prose-only pass over README + 0-5 checkpoint docs: stripped AI-writing tells (em-dash overuse, rule-of-three, negative parallelism, -ing pileups, promotional words, inline-header bold lists, hedging) and brought the voice toward Sohan's (direct claims, analogy-first concept intros, contractions, dry restrained asides). All fenced code, commands, paths, Next links, and Completion Milestone checkboxes verified unchanged; starter code untouched.
Operate the deploybot entirely through the web UI (plus the optional goose session). Remove the deterministic CLI verifier and the CLI approve/revoke paths so learners drive every checkpoint from one surface. - Delete starter/scripts/verify.py; drop all `scripts/verify.py --checkpoint N` references and "deterministic path" framing across every checkpoint. - Replace `python approve.py ...` / `python revoke.py ...` steps with the web UI buttons (Approve prod · 10m, Revoke staging, Revoke prod). - CP3: replace `bootstrap.py --window-minutes 0` with a new "Grant staging · 30s" button (web.py /api/grant-short) so learners watch a grant expire live in the authority bar instead of seeding an already-expired grant. - CP1: the web UI is now the primary over-reach path; goose is optional. - CP4: fix the revive step — re-grant staging via "Grant staging · 30s" (which writes only staging); `bootstrap.py` would wipe the prod grant via _reset_agent_grants and break the suspend-not-erase demo. - Relationship expiration is a built-in SpiceDB feature as of v1.56: drop the `--enable-experimental-relationship-expiration` flag from docker-compose (plain `serve`) and the flag note from 0-setup. - Make /api/state fully defensive so the UI loads in CP1 (no schema yet). Verified end to end on SpiceDB v1.56.1: CP1 no-schema tolerance + over-reach, the 3-way decision, short-grant expiry, approve/revoke, and the gated_by cascade (revoke staging suspends production).
Add a "Two ways to drive the agent" note to 0-setup: the whole workshop is completable with just the web UI (no LLM key, no goose install), and every checkpoint also offers an optional goose step. - Add a dedicated "Drive it with goose (optional)" step to Checkpoint 3 (grant/revoke → deploy staging) and Checkpoint 4 (cascade → deploy production), so all four checkpoints carry the optional goose path consistently (CP1 and CP2 already had one). - Includes prose edits to 0-setup and Checkpoint 1.
Terminology: rename "Checkpoint N" → "Part N" across all modules (headings, cross-references, module map, links, completion milestones) and in web.py's comments. Inline glosses for concepts a reader new to authz/ReBAC/SpiceDB would trip on: - CP1: gloss MCP (Model Context Protocol) at first use. - CP2: explain the schema DSL — `relation name: type` is a subject-type constraint, and relations (stored edges) vs permissions (computed on every check). - CP2: decode the relationship-tuple notation `resource#relation@subject` the first time a full tuple appears. Preserves the author's in-flight prose edits across CP0–CP4.
Complete the Checkpoint → Part terminology rename in the shipped starter stubs (authz.py, schema.zed, bootstrap.py), so the code a learner opens matches the Part N language in the docs. Starter reset to stubs.
Export the "what you'll build" permission-check diagram (Sandworm style, embedded Inter + JetBrains Mono) as a self-contained SVG under images/, and embed it just below the Introduction in 0-setup.md.
…oud/Dedicated, resources)
…oybot extension Replace the ambiguous 'follow goose-extension.md' step with an explicit goose configure prompt-by-prompt flow: the absolute command path (venv python + deploybot_server.py) and the three env vars.
Export the Part 2 relationship graph (Sandworm style, playground-style layout, embedded JetBrains Mono) as a self-contained SVG under images/, and embed it at the end of the 'Permissions are a graph, not a table' section.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Delegated Authorization for AI Agents
A new self-guided, ~90-minute workshop that teaches delegated, fine-grained authorization for AI agents by building a DevOps deploy agent on goose and gating every action with SpiceDB (ReBAC).
It follows the same format as
agentic-rag-authorization: a stubbedstarter/where learners write the schema and decision engine themselves, module-by-module.What it covers
decide()(ALLOWED/NEEDS_APPROVAL/BLOCKED)gated_by— revoking staging suspends production (contingent evaluation, not a cascading delete)Notes
images/fig1-permission-check.svg).Still open
0-setup.mdhas a<!-- TODO -->to verify the Codespaces flow on a live Codespace before the conference.