Skip to content

Open a PostgreSQL service to declared sources over TLS (S-006-8, 9, 10) #123

Closed

Description

@shipmill-romamo

Builds part of spec S-006, docs/specs/006-standalone-postgresql.md (feature issue #81): the acceptance criteria below. Each needs a test that names its id (test_s006_<k>_..., or a proves: S-006-8 comment line).

This is remoteAccess: TLS listening, pg_hba.conf, and the nftables rule for the service port.

  • S-006-8: With remoteAccess of listenAddress: 10.0.0.2 and allowedSources: [10.0.0.0/24], the converged cloudfall.conf reads listen_addresses = '127.0.0.1,10.0.0.2' and ssl = on, the Cloudfall block in pg_hba.conf holds exactly hostssl billing billing 10.0.0.0/24 scram-sha-256, and the rendered nftables ruleset holds ip saddr 10.0.0.0/24 tcp dport 5432 accept and no unrestricted rule for port 5432
  • S-006-9: On a proving pair of hosts, psql from an address in allowedSources as billing with sslmode=require connects, from an address outside it gets no connection, and from an allowed address with sslmode=disable is refused with no pg_hba.conf entry
  • S-006-10: Removing remoteAccess and converging baseline and services leaves listen_addresses = '127.0.0.1', no Cloudfall block in pg_hba.conf, and no rule for the service port in nftables

S-006-9 needs a live proving run on two hosts; the PR may prove the rest with rendered output and name S-006-9 as left for that run.

Depends on #122

Activity

  1. shipmill-romamo commented on Oct 27, 2026

    @shipmill-romamo
    ContributorAuthor

    Triage: implement, for the next release candidate.

    The plan: build the criteria listed in the body, as docs/specs/006-standalone-postgresql.md (S-006, approved in #101) says, each with a test that names its id. A departure from a criterion goes back as a question, never a quiet change. Build issues start in order: this one starts once every issue on its Depends on lines has closed. I'll link the PR here.

  2. shipmill-romamo commented on Oct 27, 2026

    @shipmill-romamo
    ContributorAuthor

    PR #141 implements remoteAccess: TLS listening on loopback plus listenAddress, one hostssl ... scram-sha-256 line per owned database and source between Cloudfall markers in pg_hba.conf (checked with pg_hba_file_rules before a reload, removed and the run failed if PostgreSQL rejects it), and one source-restricted nftables rule per CIDR. Removing remoteAccess closes all three again (S-006-10). Proves S-006-8 and S-006-10.

    Left open: S-006-9 needs the live two-host proving run, so spec 006 stays approved and #81 stays open until it passes. cloudfall audit will misread the new rule and listener as drift; that's #143.

  3. added a commit that references this issue on Oct 27, 2026
    2828e49
  4. shipmill-romamo commented on Oct 27, 2026

    @shipmill-romamo
    ContributorAuthor

    Released in v0.8.0rc7 (pre-release). uv tool install --prerelease allow cloudfall==0.8.0rc7
    A plain install gets it with the next stable release.
    If you filed this: react 👍 on this comment once it works for you, or reply if it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions