Configure connections and authentication so that the database can only be accessed by permitted users.
Point
Client authentication is configured in pg_hba.conf. Refer to "Client Authentication" in the PostgreSQL Documentation for details.