Skip to content

Validate PostgreSQL databases owned by a declared role (S-006-1..4, S-006-11) #121

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-1 comment line).

This is the schema and config validate side: databases with an owner, and the remoteAccess rules.

  • S-006-1: A project with one Server, its server type, and one PostgreSQL Service whose only database declares owner: billing and a passwordRef, and no Application or Component, passes cloudfall config validate with exit 0
  • S-006-2: A database entry with both application and owner fails cloudfall config validate with CONFIG_INVALID naming spec.postgresql.databases[0], and an entry with neither fails the same way
  • S-006-3: owner without passwordRef fails cloudfall config validate with CONFIG_INVALID, and so does passwordRef next to application
  • S-006-4: An owner of postgres, of alloy, or equal to the Linux user of an Application with a database on the same service fails with CONFIG_INVALID code service_database_owner_reserved
  • S-006-11: remoteAccess fails cloudfall config validate with CONFIG_INVALID and code service_remote_access_unused when no database names an owner, service_remote_access_unfirewalled when the server type declares no firewall, service_remote_access_port_open when its allowedInbound opens the service port, and service_remote_access_open for a source of 0.0.0.0/0 or ::/0

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

    The build is in #131: a PostgreSQL database may name an owner and a passwordRef instead of an application, and remoteAccess is validated as S-006-11 says. The example project's rendered inventory is byte-identical. Until #122 lands, the PostgreSQL role refuses an owned database before any task runs. This issue closes when #131 merges.

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

    @shipmill-romamo
    ContributorAuthor

    Released in v0.8.0rc6 (pre-release). uv tool install --prerelease allow cloudfall==0.8.0rc6
    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