How to restrict the user access to the databases in Postgresql based on the permission - PostgreSQL Security | PostgreSQL database security

By    

PostgreSQL Security - Restricting the user access to the databases in Postgresql based on the permission

Created user can access all databases in post gre sql without any grant. We can allow permission to certain databases through editing the pg_hba.conf.
Open PgAdmin , select pg_hba.conf from Tools -> Server Configuration

Configuration file
Disable Database and User all. Double click on the configuration line uncheck the Enable option.
configuration editor
client access configuration
Add new configuration and specify the user and system database "postgres" and your database here.
Client access configuration postgresql user and database
Backend access configuration postgresql
Then test the configuration is set properly or not, for testing the configuration login with the restricted user and try to access the database other than the rights given. Postgre SQL will reject access to the database if the configuration is set properly.

Please visit other related articles

PostgreSQL: Add macros in PgAdminIII
PostgreSQL: Export PostgreSQL data in to excel file
PostgreSQL: How to restrict the user access to the databases in Postgresql based on the permission
PostgreSQL: List table details using Alt+F1 in PostgreSQL
PostgreSQL: How to get ROW_COUNT of last executed query in PostgreSQL like MS SQL @@ROWCOUNT ?