Title: The owner password reaches PostgreSQL in plaintext inside ALTER ROLE · Issue #140 · cloudfall-dev/cloudfall · GitHub
Open Graph Title: The owner password reaches PostgreSQL in plaintext inside ALTER ROLE · Issue #140 · cloudfall-dev/cloudfall
X Title: The owner password reaches PostgreSQL in plaintext inside ALTER ROLE · Issue #140 · cloudfall-dev/cloudfall
Description: The operator's record for self-hosted servers run by an AI agent. The agent decides, Ansible executes, Cloudfall gates every action, verifies the result and keeps the receipt. Plain Debian, no Kubernetes. - The owner password reaches PostgreSQL in plaintext inside ALTER ROLE · Issue #140 · cloudfall-dev/cloudfall
Open Graph Description: The operator's record for self-hosted servers run by an AI agent. The agent decides, Ansible executes, Cloudfall gates every action, verifies the result and keeps the receipt. Plain Debian, no ...
X Description: The operator's record for self-hosted servers run by an AI agent. The agent decides, Ansible executes, Cloudfall gates every action, verifies the result and keeps the receipt. Plain Debian,...
Opengraph URL: https://github.com/cloudfall-dev/cloudfall
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The owner password reaches PostgreSQL in plaintext inside ALTER ROLE","articleBody":"Found in the review of #139 (S-006, owned PostgreSQL databases).\n\n## The problem\n\n`engine/ansible/roles/cloudfall_postgresql/tasks/owner_password.yml` sets the owner role's password with psql's `ALTER ROLE ... PASSWORD :'var'`. psql substitutes the value into the statement text before it sends it, so the PostgreSQL server receives the plaintext password inside the SQL. With `password_encryption = scram-sha-256` the stored value is a SCRAM verifier, but while the statement runs the text is visible in `pg_stat_activity`, and it is written to the PostgreSQL log when `log_statement` is `ddl` or `all`, or when the statement fails (`log_min_error_statement`).\n\nThe Ansible side is clean: the value is in no argv, inventory, Ansible output, answer or receipt, and the host file is removed in an `always` block. The leak is only on the PostgreSQL server's side.\n\n## Reproduce\n\nOn a host converged with an owned database, set `log_statement = 'ddl'`, run `cloudfall converge services` again, and read the PostgreSQL log: the `ALTER ROLE billing PASSWORD '...'` line holds the password.\n\nNot reproduced live yet (no PostgreSQL in the review environment); this is documented PostgreSQL behaviour.\n\n## Proposed fix\n\nCompute the SCRAM-SHA-256 verifier (`SCRAM-SHA-256$4096:\u003csalt>$\u003cStoredKey>:\u003cServerKey>`) on the controller, stage the verifier instead of the password, and send `ALTER ROLE ... PASSWORD '\u003cverifier>'`. PostgreSQL stores a pre-hashed verifier as is, so neither the log nor `pg_stat_activity` ever holds the password. Keep the answer's reference, key and SHA-256 as they are. A regression test can check the staged file holds a verifier that verifies the password, never the password.\n\nTouches `engine/ansible/roles/cloudfall_postgresql/tasks/owner_password.yml` and the controller staging in `sdk/src/cloudfall/secrets.py` / `engine/src/cloudfall_engine/cli.py`.\n\nRelated: #81, #122, spec `docs/specs/006-standalone-postgresql.md` (S-006-6).\n","author":{"url":"https://github.com/apps/shipmill-romamo","@type":"Person","name":"shipmill-romamo"},"datePublished":"2026-10-27T10:15:14Z","url":"https://github.com/cloudfall-dev/cloudfall/issues/140"}
| 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 | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:fc360582-877d-5940-1d6c-8d4bcb28c646 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DAA6:2EA7B6:2502A4C:30C6642:6B0554E0 |
| html-safe-nonce | eed4e4bfeb8489db8eea44be0cae7e8aef50a3aa73d56cacd915ec2593618de3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUE2OjJFQTdCNjoyNTAyQTRDOjMwQzY2NDI6NkIwNTU0RTAiLCJ2aXNpdG9yX2lkIjoiMzQxMzUzNDExMDkyMjM5NTg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 60b105e75413f3be2e5deb4223e32593605d0831466f23b5a900b59102a152b8 |
| hovercard-subject-tag | repository:1360999777 |
| 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/cloudfall-dev/cloudfall/issues/140 |
| twitter:image | https://opengraph.githubassets.com/51d5dd460258bf347b561fe60af1de5b903bcc5c1b089a4f211cd68b74c186ff/cloudfall-dev/cloudfall |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/51d5dd460258bf347b561fe60af1de5b903bcc5c1b089a4f211cd68b74c186ff/cloudfall-dev/cloudfall |
| og:image:alt | The operator's record for self-hosted servers run by an AI agent. The agent decides, Ansible executes, Cloudfall gates every action, verifies the result and keeps the receipt. Plain Debian, no ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a79a02b7e7546ea306864e922ed2103ef4c04fac63168e11c2b2d4d816793080 |
| turbo-cache-control | no-cache |
| 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 | 10dff83edfd4f3617a7792a152d44991587b434c |
| ui-target | canary-1 |
| 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