Security
OpenRMM runs scripts on managed machines and exposes an AI/MCP surface, so it is
designed defense-first. This summarizes the posture; details live in
docs/07-guardrails-security.md and
docs/11-mcp.md.
Core guarantees (enforced in code)
Section titled “Core guarantees (enforced in code)”- AI proposes, humans dispose. The AI and the MCP surface create
approval-gated job proposals (
propose_script, bulk deploy, or high-level proposal tools). They have no tool that runs a free-form script or deletes anything itself. Nothing that changes a device runs without a person approving it, either at the time or in advance. - Autonomy is opt-in, bounded and separate per channel
(
docs/23-ai-autonomy.md). Two tool classes can run without an approval at the time, and only for roles granted them (the built-in administrator holds them; technician and read-only do not): the agent’s built-in read-only device queries (no code is sent; parameters come from closed sets), and pre-approved actions — library scripts an administrator released, bound to the hash of their content (any edit revokes the release), with typed parameters passed as environment variables and a server-enforced deny list (reboot, install, delete, accounts, firewall, agent removal, patches, persistence, registry/security settings, downloads and dynamic code can never be released). The built-in chat and MCP have separate permissions; one device at a time; per-user, per-device and daily limits; a circuit breaker that withdraws a release after repeated failures; output bounded and secret-redacted before the model sees it; and a global pause in Settings ▸ AI. Every autonomous run is an audited job whose approver line states its basis. - Configuration is proposed too.
propose_task,propose_checkandpropose_policywrite the row disabled and stampedproposed_by; the scheduler only ever selectsWHERE enabled, and a database CHECK constraint refuses to enable a proposal nobody has reviewed. This matters because a task is a script with a schedule that the scheduler runs pre-approved — an AI able to create an enabled one would have been more powerful than one able to propose a script. - The one tool that acts is bounded by a human decision.
install_patchesinstalls, butClaimApprovedPatcheslimits it to identifiers a person already approved; an unapproved one installs nothing. There is deliberately no tool to approve a patch — an assistant that could approve and then install would make that bound circular. - Scheduled tasks and patch policies remain separate, explicitly preconfigured automation paths.
- Destructive actions are permission-gated, deliberate, and audited. The AI/MCP can only propose moving or deleting devices; a person approves it under Devices ▸ Pending operations, with their own permissions and scope checked again at that moment, and must type the device count to approve a deletion. Groups, sites and companies are never deleted through the AI/MCP.
- Approval is mandatory by default for every ad-hoc/AI script run. An administrator can turn on Run without approval (Settings ▸ Configuration ▸ Jobs) for people who both approve jobs and manage the configuration, on one device at a time; the change is audited. Bulk deployments and every script the AI/MCP proposes always wait for approval; the setting does not widen what the AI may run on its own (above).
- RBAC: built-in and custom roles with granular permissions, enforced per route, plus per-user access scope (Company/Site/Department/device) filtered on read + write paths and on the AI/MCP surface. AI/MCP tools are advertised and executed only when the principal has the required permission, and restricted users can’t see or touch out-of-scope devices.
- Two-factor (TOTP): optional per-user 2FA (RFC 6238). Setup/rotation stores a pending encrypted candidate and does not replace an active factor until the new code is confirmed; rotation requires the password and current TOTP. A code is accepted once (the last accepted time step is stored). Recovery codes are one-time and hashed.
- Single sign-on (OIDC), optional: the provider says who the person is; roles
and scope stay in OpenRMM.
RMM_OIDC_ACR_VALUES/RMM_OIDC_REQUIRED_AMRrequire MFA from the provider’s signed claims. The callback hands the console a single-use, 60-second code that only the browser that started the sign-in can exchange. While SSO is on, a linked account has no password path (sign-in, reset). The console never accepts a pasted token. - Secrets: agent/session/API/OAuth tokens are random and stored hashed
(SHA-256); enrollment tokens are limited-use bootstrap capabilities stored
until consumed/expired; passwords use bcrypt. Runtime configuration secrets in
app_settingsand TOTP secrets inusersare AES-256-GCM encrypted. Admin and agent comparisons are constant-time. Configuration secrets are write-only; enrollment tokens, TOTP setup secrets and recovery codes are intentionally returned once by their creation endpoints. - Per-IP rate limiting on auth (10/min), MCP (60/min) and the API
(600/min, tunable via
RMM_API_RATE_LIMIT) to blunt brute-force and token-guessing. - Resource caps against memory-exhaustion: API/MCP request bodies are capped at 1 MiB, and the agent/relay WebSockets cap per-message reads (8 MiB / 32 MiB) so no single peer can force an unbounded allocation.
- Signed agent/sidecar updates are supported for
/dlartifacts with Ed25519 detached signatures. Roll out inwarn, then enforce withRMM_UPDATE_VERIFY=strict. - Append-only audit log of sensitive actions, in three layers: triggers refuse updates and deletes (only aged machine entries are purged); run the server as a role that does not own the table and a compromised server cannot erase the trail; and a hash chain over the human record makes a rewrite by a database administrator detectable. The server logs at every start which layers are in force. Export logs off-box as well: the chain detects a rewrite, it does not prevent one.
Deploying securely
Section titled “Deploying securely”- Use the production Compose topology with all published backend listeners bound to loopback. Terminate TLS and enforce console/MCP source ACLs at the trusted edge; UFW rules on loopback-only backend ports are not the ACL boundary.
- Provision
RMM_ADMIN_TOKEN, the database password, and the stableRMM_SETTINGS_ENCRYPTION_KEYas secret files withdeploy/ops/provision-secrets.sh. Do not put shell substitutions in an env file. Rotate from the bootstrap token to per-user logins and scoped API tokens after bootstrap. - For the MCP endpoint: dedicated revocable API tokens, the built-in
IP allowlist (
RMM_MCP_ALLOWED_IPS), andmcp.use. See docs/11-mcp.md. - Tighten
RMM_CORS_ORIGINSfrom the*default if you wish (safe for bearer-token auth, which uses no cookies). - Leave Run without approval off (the default), and
RMM_ALLOW_UNAPPROVED_JOBSunset: it only sets the value a new instance starts with. - For production agents, publish signed
/dlartifacts. The current installers require HTTPS and--update-public-key/-UpdatePublicKey(on Linux and macOS, OpenSSL 3 or the manifest’s P-256 key in--manifest-public-key), and install the service with strict update verification and TLS required. Lab mode is explicit and is not a production fallback.
Known limitations
Section titled “Known limitations”- Scripts and the terminal run with the agent service’s root/SYSTEM privileges; there is no sandbox.
- Native remote sessions (desktop, terminal, file transfer, and guest chat) use
end-to-end authenticated encryption (
rmm-e2e-p256-aes256gcm-v1) once the agent registers its device identity key; the application origin and control channel remain trusted for session authorization and public-key distribution, and the relay can still observe traffic metadata (timing, frequency, frame sizes). Pre-0.13 agents without a pinned key can still use legacy relay mode under the defaultpreferredpolicy until updated. - The supported control plane is a single server replica. Hub/relay/scheduler state is process-local; there is no HA or distributed agent hub.
/readyzchecks the database only, and the token-gated/metricsis a small snapshot. There is no tracing, built-in log shipping, or alerting on the platform’s own health.- Release Ed25519 signatures are not Windows Authenticode or Apple Developer ID signing/notarization (the macOS bundle is ad-hoc signed, or with a persistent self-signed identity when the build has one). Platform trust prompts, Defender exclusions and TCC requirements remain.
Reporting a vulnerability
Section titled “Reporting a vulnerability”This is a self-hosted, open-source project. Please report security issues privately to the maintainer rather than opening a public issue.
