Book Image

PostgreSQL Administration Essentials

Book Image

PostgreSQL Administration Essentials

Overview of this book

Table of Contents (14 chapters)

Understanding PostgreSQL security


In this section, you will learn about the basic PostgreSQL security model. In general, we can see the PostgreSQL security models as seven basic layers:

  • Level 1: Turning the TCP on or off (listen_addresses in postgresql.conf, and so on)

  • Level 2: Network authentication (pg_hba.conf)

  • Level 3: Instance-level permissions

  • Level 4: Database-level permissions

  • Level 5: Schema-level permissions

  • Level 6: Table-level permissions

  • Level 7: Column permissions

Of course, there is more than just permissions on these seven levels; however, most administrators will face exactly those seven stages when securing their systems. So, let us go through these steps in detail and discuss each of them separately.

Configuring the TCP

The first thing you have to do while securing a database instance is to take care of the network security. One of the useful features here is that you can make PostgreSQL take certain network addresses into consideration or just ignore them.

Note that we are...