.. This file is part of PEPSI. Copyright (C) 2026 GNUnet e.V. PEPSI is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. ============= pepsi-console ============= *Run Pepsi commands in a terminal window of the browser console.* Role ==== ``pepsi-console serve`` is the daemon behind the console's CLI windows (:ref:`web-ui-cli`). It runs as ``root``, started on demand by ``pepsi-console.socket`` in the package ``pepsi-httpd-admin``, and only ``pepsi-httpd`` may connect to its socket ``/run/pepsi/console.sock``. For each window it creates a pseudo-terminal and starts ``pepsi-console shell`` in it: a restricted shell that runs the operator programs of Pepsi, each under its own account, and nothing else. Reference: :manpage:`pepsi-console(1)`. Why a daemon of its own ======================= ``pepsi-httpd`` runs unprivileged and must stay so. The privileged applier (``pepsi-setup apply``) cannot serve a terminal either: it takes its work from a closed list of tasks in the database and never from a socket that speaks a protocol. A terminal needs a process that can start programs as ``root`` and as other accounts, so that process is separate, small and started only when a window is opened. It does not believe ``pepsi-httpd``: it checks the administrator's session in the database itself and checks it again every minute (:ref:`sec-cli-console`). What it costs ============= A console runs ``pepsi-setup``, ``pepsi-config``, ``pepsi-keys`` and ``pepsi-whitelist`` as ``root``. Whoever holds the scope ``cli:exec`` can therefore change anything that root can change through those programs, the configuration included, and the configuration names the programs that the pipeline runs. Treat the scope as a root shell; only the role ``superadmin`` has it. The daemon's own check of the session does not protect against a compromised ``pepsi-httpd``, which may write the sessions that the daemon reads: while the socket is armed, such a compromise reaches root. The socket therefore ships disabled; the operator arms it with ``systemctl enable --now pepsi-console.socket`` (on macOS ``pepsi-launchd enable console``) and disarms it with ``systemctl disable --now pepsi-console.socket``. Removing the package ``pepsi-httpd-admin`` removes the applier too. The threat model states the residual in :ref:`tm-adv-component` and :ref:`tm-adv-delegated`. See also ======== :doc:`pepsi-httpd`, :doc:`pepsi-setup`, :doc:`../web-ui`, :doc:`../security`, :manpage:`pepsi-console(1)`.