Skip to content

Security model

A panel that installs packages, edits the firewall and runs containers needs root. Ingrest does not hide that: access to the panel is access to the server. The design goal is to make that access hard to get, hard to misuse and visible when it is used.

  • The panel (ingrest.service) runs as root. Its data, keys and database live in /opt/ingrest with owner-only permissions.
  • The web server is a separate container, ingrest-edge. It keeps serving sites while the panel is stopped or updating, and it does not run as an unrestricted root, see Web server.
  • Service containers (PostgreSQL, Trivy, BuildKit, Tetragon) run from images pinned by digest.
  • The panel port opens the panel only on a secret path. Without it the port answers nothing; only when the public address is off does it also take webhooks and requests with a valid API token. Who may reach the port is set by IP, network, country or AS number on the panel row of the firewall, and that row applies even with the firewall off.
  • Passwords are hashed with Argon2id. The second factor is TOTP or passkeys; with passkeys on the panel domain, the password alone neither signs in nor confirms actions.
  • Failed sign-ins block the IP, then the account, so parallel guessing hits the same limit.
  • Session cookies are Secure and HttpOnly. The most dangerous actions (for example deleting a database, opening a terminal, showing a stored password, changing the password) need sudo mode: a fresh confirmation of the second factor, or of the password when no second factor is set up.

Details: Access to the panel.

  • Tokens carry scopes per area, read or write, and can be limited to IP ranges. Over REST, destructive operations need the sudo scope, and * does not include it.
  • Over MCP, destructive tools are visible only with the mcp:destructive scope. Each destructive call returns a plan first and runs only when the same call is repeated with the plan id.
  • OAuth tokens of MCP clients work only on /mcp and stop working when you remove the connection.

Details: API and MCP.

  • The terminal opens shells of system users; a root shell is off until you turn it on.
  • The panel’s own files (database, keys, config) can be read in the file manager only from a browser session in sudo mode. Tokens and MCP see only their names, and nobody writes there through the panel.
  • Nodes dial the controller. The tunnel is mutual TLS 1.3, and both sides pin each other’s certificate fingerprint; a certificate authority is not involved.
  • Account, tokens, OAuth, node management and MCP stay on the controller and are never forwarded to a node.
  • Responses from a node are untrusted: redirects outside the panel, security and CORS headers are dropped, long values are clipped.

Details: Nodes.

The web server is a container built for this one job (ghcr.io/ingrest-dev/edge):

  • Distroless: nginx and its modules, no shell, no package manager.
  • Capabilities are cut to CHOWN, DAC_OVERRIDE, KILL, NET_BIND_SERVICE, SETGID and SETUID; QUIC routing with BPF adds BPF, NET_ADMIN and PERFMON.
  • Site folders are mounted read-only.
  • Where the host supports AppArmor, a kernel profile generated from the current configuration limits the container to the folders it serves; workers run under a stricter profile than the master, and kernel denials become alerts. There is no such profile when the panel runs in a container (Proxmox LXC, for example), the kernel or Docker has no AppArmor, apparmor_parser is missing, or the kernel rules are turned off in the web server settings.
  • Lua runs without os.execute and io.popen.
  • New images come through a signed manifest and are pinned by digest; nginx releases are built and published automatically.
  • The panel checks releases against a signed manifest. The public key is built into the binary, so a replaced release on GitHub does not reach an installed panel.
  • Before an update the panel saves the previous binary and a database snapshot. A timer rolls the update back unless the new version starts cleanly within 10 minutes; a reboot is covered too.
  • A release that does not know the server’s database (an older version after a newer one migrated it) is refused before anything changes.
  • Images and tools of service containers come from the same signed channel. A newer manifest never moves a component below the version pinned in the panel release.
  • Every hour the panel checks its own binary and the digests of its containers against what it installed.

Details: Updates.

  • Every change through the browser, API, MCP or CLI goes to the audit log. Each entry carries the hash of the previous one, so an entry edited or removed inside the log breaks the chain. The chain is not signed: root on the server can rewrite it as a whole.
  • Changes made outside the panel (a firewall table removed, a system container on another image, new SSH keys or users) show on the drift board and raise alerts.
  • Runtime security with Tetragon (optional) reports shells in web processes, writes to code, loaded kernel modules and outbound connections, see Runtime security.

Passwords of databases, backup repositories, registries and alert channels are sealed with XChaCha20-Poly1305 under a master key that only root can read. Lists and settings show only whether a secret is set; showing a stored database password is a separate action that needs sudo mode and goes to the audit log.

  • Install trust. The first install trusts GitHub over HTTPS; signatures protect every update after that.
  • The admin account is the server. Use a long password and a second factor, passkeys if the panel has a domain.
  • Limit who reaches the panel. A VPN, a private interface or a source list on the panel row.
  • Keep updates on. Automatic updates of the panel, the web server, components and the OS close holes before scanners find your server.
  • What you deploy is yours. Library apps, third-party images and your own code run with the rights you give them; the panel can scan them, it cannot vouch for them.

Found a hole in any of this? See the security policy.