Postgresql – Is the database secure? / What does “=Tc/postgres” allow

postgresql

Given the following…

iproductiondb  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres                 +
               |          |          |             |             | postgres=CTc/postgres        +
               |          |          |             |             | iproduction=CTc/postgres

Are the postgres and iproduction roles the only roles that have any type of access to iproductiondb ?

=Tc/postgres is making me wonder if I need to fix something?

Best Answer

=Tc/postgres means that postgres has granted CONNECT and TEMPORARY privileges to PUBLIC. You can revoke these privilege with :

revoke connect on database iproductiondb from public;
revoke temporary on database iproductiondb from public;

In general you should also check pg_hba.conf.