Managing network security
Security is a complex thing, and we have to approach this topic systematically to ensure success. One of the key aspects is network security, which is the first topic we want to focus on. However, before we dive head first into network security, it makes sense to consider a mental model for managing PostgreSQL security in general.
Here is my personal mental model, which has served me well over the years:
- Bind addresses: The
listen_addresses
in thepostgresql.conf
file - Host-based access control: The
pg_hba.conf
file - Instance-level permissions: Users, roles, database creation, login, and replication
- Database-level permissions: Connecting and creating schemas, and more
- Schema-level permissions: Using a schema and creating objects inside a schema
- Table-level permissions: Selecting, inserting, updating, and more
- Column-level permissions: Allowing or restricting access to columns
- Row-Level Security (RLS): Restricting access...