Title: Access profiles for SSH keys: an observer, operator and deploy user instead of root · Issue #195 · cloudfall-dev/cloudfall · GitHub
Open Graph Title: Access profiles for SSH keys: an observer, operator and deploy user instead of root · Issue #195 · cloudfall-dev/cloudfall
X Title: Access profiles for SSH keys: an observer, operator and deploy user instead of root · Issue #195 · cloudfall-dev/cloudfall
Description: Problem Every key Cloudfall installs is a root key. The baseline writes each SshPublicKey of an environment into root's authorized_keys, so a runner, an operator and an agent all log in as root, as the isolation decision already notes (d...
Open Graph Description: Problem Every key Cloudfall installs is a root key. The baseline writes each SshPublicKey of an environment into root's authorized_keys, so a runner, an operator and an agent all log in as root, as...
X Description: Problem Every key Cloudfall installs is a root key. The baseline writes each SshPublicKey of an environment into root's authorized_keys, so a runner, an operator and an agent all log in as root...
Opengraph URL: https://github.com/cloudfall-dev/cloudfall/issues/195
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Access profiles for SSH keys: an observer, operator and deploy user instead of root","articleBody":"## Problem\n\nEvery key Cloudfall installs is a root key. The baseline writes each `SshPublicKey` of an environment into root's `authorized_keys`, so a runner, an operator and an agent all log in as root, as the isolation decision already notes (`docs/decisions/2026-11-02-isolation-without-containers.md`, \"Where Cloudfall is today\"). The same decision says deploys should \"log in as a dedicated user with sudo limited to the commands a deploy runs\", but nothing builds that yet.\n\nThis matters most for agents (G-1: \"operated from one management host by an agent\"). Most of what an agent does on a host needs no root: reading logs, checking `systemctl status`, versions and disks, restarting a component. As root, though, it can also read every component's `EnvironmentFile=`. In a real fleet this month, two agent sessions doing read-only checks printed two service passwords into their transcripts. A rule (\"never read a secret\") and a hook on command text could not stop it, because a program the agent runs on the host can always open the file. Only Linux permissions can.\n\n## Proposal\n\nAccess profiles on `SshPublicKey`, installed by the baseline, with sudoers generated from what the environment declares:\n\n- `SshPublicKey` gains `user` and `access`, with `root` kept only as an explicit value for break-glass keys\n- Profiles:\n - `observer`: groups `systemd-journal` and `adm`; status, logs, versions; no sudo\n - `operator`: `observer`, plus `sudo` on `systemctl restart|reload|status` of each declared component's unit, by exact unit name\n - `deploy`: the commands the deploy playbook runs, as the isolation decision describes\n- The baseline creates the user, installs the key for it, and writes one `/etc/sudoers.d/cloudfall-\u003cuser>` file, validated with `visudo -cf` before it is moved into place\n- The rules are exact commands with no wildcards (a `systemctl * \u003cunit>` rule allows `systemctl edit`, which is a root shell), run with `--no-pager` so no pager can drop into a shell, and include no `sudo -u \u003ccomponent user>` (a shell as the component's user can read its `EnvironmentFile=`)\n- Component env files stay `0600` and owned by the component's user, so no profile but `root` can read them\n- `cloudfall audit` reports any non-break-glass key found in root's `authorized_keys` as drift\n- Read-only database access for agents: for the PostgreSQL that Cloudfall manages (S-006), an optional read-only role per environment (`pg_read_all_data` or per-database `SELECT`) with its password in the secrets store, so an agent queries with its own login and never with an application's. Databases that Cloudfall doesn't manage stay out of scope\n\nProof: on a proving host, an `observer` key can run `journalctl -u \u003ccomponent>` and cannot read the component's env file; an `operator` key can restart a declared component and cannot restart an undeclared unit or run `systemctl edit`; a `deploy` key can run a deploy end to end; `audit` flags a stray root key.\n\n## Alternatives\n\nToday the operator hand-makes a user and a sudoers file on each host, outside Cloudfall's inventory, so the baseline doesn't know about it and drift goes unseen. Or agents keep root and the fleet relies on the agent following rules about which files it opens, which failed twice in one day.\n\n\u003c!-- shipmill:agent -->","author":{"url":"https://github.com/apps/shipmill-romamo","@type":"Person","name":"shipmill-romamo"},"datePublished":"2026-11-04T06:56:38Z","url":"https://github.com/cloudfall-dev/cloudfall/issues/195"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6219f27e-5a28-f135-abc4-6ee8c3075fd1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB74:31EE77:3A03F8B:4C80A54:6B059BDA |
| html-safe-nonce | 6e1cdbdbea5fa074cb8a25315acee3edac1f6c91d76aef40812386893cd145ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjc0OjMxRUU3NzozQTAzRjhCOjRDODBBNTQ6NkIwNTlCREEiLCJ2aXNpdG9yX2lkIjoiODQwMjU2NTA5MDcyOTM2ODUzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | caf04332c04bbcf678daac2a2e4f0c905e9264e97a25f17a862df7a3b511e17a |
| hovercard-subject-tag | issue:6197984968 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cloudfall-dev/cloudfall/195/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c15716709e493fa19957c0cf7758513389825a9d424468f66f9aec432995b70f/cloudfall-dev/cloudfall/issues/195 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c15716709e493fa19957c0cf7758513389825a9d424468f66f9aec432995b70f/cloudfall-dev/cloudfall/issues/195 |
| og:image:alt | Problem Every key Cloudfall installs is a root key. The baseline writes each SshPublicKey of an environment into root's authorized_keys, so a runner, an operator and an agent all log in as root, as... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shipmill-romamo[bot] |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8bd54b96ae4db60ce608a145a6b2fb16216749fbdb431d9879aabfa7459f1139 |
| turbo-cache-control | no-preview |
| go-import | github.com/cloudfall-dev/cloudfall git https://github.com/cloudfall-dev/cloudfall.git |
| octolytics-dimension-user_id | 339512759 |
| octolytics-dimension-user_login | cloudfall-dev |
| octolytics-dimension-repository_id | 1360999777 |
| octolytics-dimension-repository_nwo | cloudfall-dev/cloudfall |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1360999777 |
| octolytics-dimension-repository_network_root_nwo | cloudfall-dev/cloudfall |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cda4791073b4da3005eb3d470dc0aef3956bbe34 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width