This project demonstrates OpenFGA-powered authorization for AI agents. It shows fine-grained access control at team, project, and operation levels.
make setup # Start services and seed data
make demo # Run demo scenarios
make dev-gateway # Run gateway in mock mode
make dev-demo # Run Demo UI
make dev-admin # Run Admin UI- Gateway (Go): Authorization proxy that checks OpenFGA before forwarding tool calls
- Demo UI (Next.js): Interactive interface for testing authorization scenarios
- Admin UI (Next.js): Permission management dashboard
- OpenFGA: Authorization engine with ReBAC model
gateway/internal/authz/client.go- OpenFGA client with mock modegateway/internal/handler/handler.go- HTTP handlers for tool callsopenfga/model.fga- Authorization model in FGA DSLopenfga/tuples.json- Seed data for demo
Three levels:
- Team Level: Teams → Tool Categories (Engineering → code tools)
- Project Level: Projects → Tools (auth-service → postgres)
- Operation Level: Roles → Operations (leads → delete_repo)
# Test a tool call
curl -X POST http://localhost:9000/v1/tools/call \
-H "Content-Type: application/json" \
-d '{"tool":"github","operation":"create_pr","params":{},"context":{"user":"alice","project":"auth-service","team":"engineering"}}'- Gateway runs in mock mode by default (
MOCK_MODE=true) - Set
MOCK_MODE=falseto use real OpenFGA checks - Demo UI connects to gateway on port 9000
- Admin UI shows static permission matrix