Hand this to an AI agent. It deploys restrictive Cedar and a contact Filter, then hands you curl or Python calls that prove allow, redact, and deny.
1
Provision a sandbox
Create a disposable workspace for this role walk.
2
Stand up minimal substrate
Register an agent, attach
demo-hr, and grant Default.3
Redact contact fields
Create a Filter and assign it to tool responses.
4
Author, simulate, and deploy Rules
Allow directory tools; deny compensation and customers.
5
Verify allow, redact, and deny
Call the gateway with curl or Python.
6
Investigate and export evidence
Query denials and export today’s audit trail.
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 (admin, security, or equivalent — refer to Permissions concept)
This tutorial runs entirely in a sandbox. In a production workspace, attaching backends is typically an operator action. Here you attach demo-hr yourself so you can finish the Govern loop.
Provision a sandbox
sandbox-role-security before continuing.
Stand up minimal substrate
You need an agent identity and a reachable tool so Rules and Filters have something to govern..env — do not leave it in chat history.
Redact contact fields
A Guard Filter strips sensitive fields from tool responses before the agent sees them. Createredact-contact.json:
redact-contact.json
demo-hr:
Author, simulate, and deploy Rules
This allowlist keeps directory tools open. Everything else — including salary and customer records — is denied byforbid … unless:
role-sec-agent.cedar
ALLOW, then DENY. Deploy when those match:
Verify allow, redact, and deny
- API via curl
- Python
List employees — allowed:Get E001 — allowed, email redacted:Expect
"email": "[REDACTED]".Get salary — denied:Investigate and export evidence
Clean up
Next steps
You learned how to author and simulate Cedar, redact sensitive fields, prove denials, and export audit evidence. Continue with:- Developer to register agents and verify from the workload side
- Operator to attach backends and expose Gateways
- Simulate Rules for deeper pre-deploy checks