Skip to content

Minimum Postgres security posture For GA #2097

Closed

Description

@EItanya

To successfully and securely bring Substrate to GA we need to make sure that the way Substrate is using Postgres is secure by default. In order to accomplish that we should do the following:

  1. Separate out DDL and DML roles to ensure a clean separation between the persona creating/modifying the schema, and the persona accessing/modifying the data in the DB. This will require the presence of 2 roles in the DB prior to Substrate connecting to it. In order to do this we should:

    a. Add a bootstrap step to ate-setup which properly bootstraps the roles in the included DB
    b. Document how the roles can be properly added to Cloud/other existing DBs for Substrate to successfully connect.

  2. Ensure that all connections from Substrate to the DB are properly secured. For the bundled PG this can most likely use mTLS pod certs (research to come). For the cloud DBs use sidecars like gcloud today.

Activity

  1. added this to the M3 milestone on Oct 1, 2026
  2. EItanya commented on Oct 1, 2026

    @EItanya
    CollaboratorAuthor

    I can't assign Jeremy Alvis (@iplay88keys) for some reason, but he will be taking this across the finish line

  3. iplay88keys commented on Oct 2, 2026

    @iplay88keys
    Collaborator

    Work/PRs associated with this:

    Other areas I won't be tackling as part of this at this phase, but are worth noting:

    • Support separate DDL/DML users for cloud sql (additional proxy pod)
    • Apply Kubernetes NetworkPolicy objects restricting port 5432 ingress to ate-api pods only.

    As this covers our minimum security posture for GA, these will also be deferred for now:

    • Review findings:
      • Move schema migrations out of the serving ateapi binary into a dedicated command or binary run by a deployment Job. Keep a schema-compatibility check in the serving process.
      • Move partition maintenance into a separate worker or expose narrowly scoped privileged database routines.
  4. iplay88keys commented on Oct 13, 2026

    @iplay88keys
    Collaborator

    Mofi Rahman (@moficodes), I believe you have been working on docs. Just wanted to raise these aspects (that I pulled out of my above comment) and get your opinion on how to get documentation around them:

    • Update docs site to describe how to set up the schemas, roles, and users for byo dbs that are needed.
      • Surface the sql file used by ate-setup from Set up bundled PostgreSQL identities in ate-setup #2025 for operators to use when setting up dbs
      • Potentially surface the cloud sql guide (I think there might be plans to move this into a separate repo at some point, but I'm not sure)
  5. destijl commented on Oct 13, 2026

    @destijl
    Collaborator

    The GA part of this is done minus some docs, so to help our M3 burndown I think we should either remove M3 if we're leaving this open, or close it and file non-M3 blocking issues. I think I'd rather we did the second, but no strong opinion.

  6. EItanya commented on Oct 13, 2026

    @EItanya
    CollaboratorAuthor

    Agreed, I will close

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions