Hand this to an AI agent. It stands up a sandbox agent, then hands you curl or Python calls that prove allow and deny.
1
Provision a sandbox
Create a disposable workspace for this role walk.
2
Register an agent
Mint identity and an API key for the workload.
3
Attach tools and grant access
Put
demo-hr on Default and admit the agent.4
Deploy authorization rules
Allow directory tools; deny compensation.
5
Verify allow and deny
Call the gateway with curl or Python.
6
Confirm in audit
Read the decisions attributed to your agent.
Prerequisites
For this tutorial, you will need:- The Dome CLI installed and authenticated (
dome auth login, thendome auth status) - A role that can provision a sandbox and deploy rules in that sandbox (admin, operator, or equivalent — refer to Permissions concept)
This tutorial runs entirely in a sandbox. In a production workspace, attaching backends is typically an operator action and deploying rules a security action. A developer still needs enough Connect and Govern context to integrate and debug.
Provision a sandbox
A sandbox is a disposable workspace with the same capabilities as production. Provision one for this role track:sandbox-role-developer. Sync contexts and switch into it:
sandbox-role-developer before continuing.
Register an agent
An agent is the workload identity every governed call is attributed to. Register one, then mint a credential the gateway will accept asAuthorization: Bearer:
Token: dome_… value once into a gitignored .env. Tokens are shown once and cannot be recovered — mint another key if you lose it.
Attach tools and grant access
A tool is a backend the gateway calls on the agent’s behalf. The agent never sees its URL. Register the public demo HR server and attach it to Default:demo-hr/hr/list_employees, and so on). Admit the agent at Default so the gateway accepts its requests:
Deploy authorization rules
Cedar decides everymcp:call. This allowlist keeps directory tools open and blocks compensation (and everything else) with forbid … unless:
role-dev-agent.cedar
Bundle deployed: role-dev-agent. Optionally simulate before a live call:
ALLOW, then DENY.
Verify allow and deny
Build the tools ingress URL from your sandbox gateway host and Default’s id:tools/call to $DOME_GATEWAY_URL/mcp. Use curl or Python — same payloads, same outcomes.
- API via curl
- Python
List employees — allowed:Expect demo employees in Expect a JSON-RPC error (authorization deny), not payroll data.
result, including E001.Get salary — denied:Confirm in audit
Every decision is attributed to the agent. List recent events:list_employees call and the denied get_salary call under role-dev-agent.
Clean up
Delete the sandbox to remove the agent, rules, and grants together:Next steps
You learned how to register an agent, call tools through a Gateway, and confirm allow and deny in audit. Continue with:- Security to author, simulate, and tighten Rules and Guards
- Operator to attach backends and expose Gateways
- Govern your first agent for the full Get Started path with Filters and an MCP client