Why AI agents not
access everywhere
may have
RBAC on the OpenClaw Gateway: which roles are allowed to use which tools, approval scopes, and credentials — before browser, shell, or mail side effects in production.
direct answer
What does RBAC mean
at OpenClaw?
Short answer: Role-based access control determines which people and agent workflows have which tools, channels, credentials, and approve rights on the Gateway — so that an agent is not implicitly allowed to do “everything” that the host can.
Nuance: OpenClaw is not an Azure AD replacement. RBAC = Gateway policies + Linux/Docker isolation + approval scopes + separate API keys + audit. Without that, “self-hosted” is only data residency, not access control.
Tool risks
Why permissions are important
AI agents call tools. RBAC limits which actions are in scope at all — approvals handle the rest.
Browser automation
DOM actions use real sessions. RBAC determines. Who which profile may start and which submit URLs require approval — see Browser automation.
Terminal execution
Shell tools run as Gateway users. Without role separation, any operator can indirectly trigger root paths via approved commands.
Filesystem access
Read on .env is exfiltration; write outside tmp is destructive. Mounts and Unix permissions are your RBAC outside OpenClaw.
mailbox access
Send/forward/delete are compliance actions. Scoped mailbox + separate credentials per workflow role.
Database writes
Agents should not have DDL/DML on production without human review. Read-only replica + separate DB user per agent role.
API actions
Mutating REST to CRM/ERP: API keys per scope, rate limits, no shared “god key”. .env.
least privilege
Minimal rights in production
In short: Give agents only the tools needed for a single workflow — not the union of all team wishes.
Minimal rights
Each agent role receives only the tools needed for a single workflow — not “everything just in case”.
Read-only vs. mutating
Status, logs, read-only queries: lighter RBAC. Shell, write, browser submit, mail send: stricter + approvals.
sandboxing
Container of user-namespace limits blast radius. RBAC on Gateway-config must not overwrite the sandbox.
approval scopes
Who is authorized to approve which pending queue? Senior ops for shell; support lead for mail-readonly workflows only.
Isolated environments
Dev/staging/prod: separate Gateway, separate browser profiles, separate API credentials — no shared prod session in dev.
Policies
Tool & action scopes
Per scope: risk and recommended policy — no generic IAM matrix.
Read-only diagnostics
Risk: Low but not zero — paths can contain secrets.
Policy: Allowed without approval for logs/status; no global filesystem read; audit in progress.
Mutating with approval
Risk: Human error in blind approve; injection in approval context.
Policy: Mail send, browser submit, shell, file write, mutating API — always scoped approver role.
Never autonomous
Risk: Privilege escalation, prod-DB, config write, secret dump.
Policy: No tool that openclaw.json changes; no root shell; no prod-DB write; no shared admin browser.
Workflow-bound tools
Risk: Agent with CRM-write tool in mail-triage workflow.
Policy: RBAC per workflow: tool allowlist in config; periodic review after plugin update.
API keys & credentials
Risk: Shared key in team channel → everyone is indirectly an admin.
Policy: Separate keys per environment and role; rotation; no keys in agent output/logs.
Container boundaries
Risk: Host mount of <code>/</code> or docker.sock in Gateway container.
Policy: Read-only mounts where possible; no docker sock; see docker.
Teams
Multi-user &
team risks
Short answer: Shared agents and shared sessions make RBAC worthless on paper — separate roles, profiles, and keys.
- → Shared agents: One agent configuration for the entire team → no one knows which tool scope is active. Split agents by role (support, ops, finance).
- → Shared browser sessions: Logged-in admin in profile that junior also uses = RBAC bypass via DOM.
-
→
Shared API keys: One Anthropic/OpenAI key in shared
.env— quotas, data residency, and revoke become team problems. - → Role separation: Deploy-user ≠ Gateway-runtime user ≠ approver. Config changes only via CI/deploy, not via agent-tool.
- → Auditability: Who started agent X, which tool, which approve? Without audit trails RBAC is not demonstrably present at the incident.
Check: One browser profile for three roles = one super-user. Split workflows on workflows-page.
Misconfiguration
Escalation & common mistakes
Too many permissions
Scenario: “Temporarily” all tools on for speed — stays on for months.
Impact: Each prompt injection becomes a broad executable surface.
Approvals incorrectly configured
Scenario: Everyone is allowed to approve everything; no separation between ops and support.
Impact: RBAC on paper; in practice, no gate.
Gateway as root
Scenario: systemd <code>User=root</code> or container without user namespace.
Impact: One approved shell = host compromise.
Production DB access
Scenario: Write tool on primary Postgres for “reporting agent”.
Impact: Data loss, compliance breach, no rollback.
Unrestricted browser
Scenario: No domain allowlist; admin URLs accessible.
Impact: Session hijack via injection → submit in your name.
Failure modes
When RBAC is too loose
Short answer: no separation between roles, tools, and environments — then every incident is a privilege incident.
Runaway workflows
Agent with overly broad tools keeps retrying mutating steps — RBAC + rate limits stop cascade.
Privilege escalation
Tool that writes config or new keys — must go through the deploy pipeline, not the agent.
Browser injection
DOM instruction in logged-in session; RBAC on URL + approvals on submit.
Destructive actions
rm, DELETE, mailbox purge — only with dual control or deny-by-default.
Cross-user risks
User A's pending approval by User B without a role — separation of approver vs. requester where necessary.
Short answer: Role-based access control determines which operators, workflows, and agent configurations have which tools, channels, and approve rights on the Gateway — not just “logged in yes/no”.
Nuance: OpenClaw has no enterprise IAM product; RBAC is a combination of Unix user, Docker boundaries, tool policies, approval scopes, and audit.
Short answer: Agent errors plausible — minimal tool surface limits damage in case of prompt injection or incorrect plan.
Cause: more tools = more irreversible actions without extra “intelligence”.
Follow-up: Read-only where possible; mutating only with scope + logging.
Short answer: Shell, filesystem write/delete, browser submit, mail send/forward/delete, mutating API, production DB writes.
Cause: side effects outside the agent sandbox.
Follow-up: full matrix on approvals.
Short answer: Lower risk, not zero — read can exfiltrate secrets and PII; then injection can trigger write tools if they are still in scope.
Cause: too wide read paths (~/.ssh, .env).
Advice: path-allowlist + audit; no global read.
Short answer: RBAC on humans does not help if the browser session is already admin — junior operator triggers DOM actions in your cookies.
Cause: session = identity; shared profile = shared privileges.
Follow-up: Browser automation — profile per role/environment.
Short answer: Yes, without guardrails — via tools that modify config, env, or roles. RBAC must block config writes; only the deploy user may modify Gateway config.
Cause: Tool allowlist too broad + no audit on config changes.
Follow-up: deny self-escalation tools on prod; log everything.
Access control
RBAC, audits &
Deployment hardening
We review tool scopes, approval policies, credential separation, and Gateway/Docker setup for teams with shared self-hosted agents — concrete governance work, not an enterprise slide deck.