Information
Client authentication is controlled by a configuration file, which traditionally is named pg_hba.conf and is stored in the database cluster's data directory. Each record specifies a connection type, a client IP address range (if relevant for the connection type), a database name, a user name, and the authentication method to be used for connections matching these parameters. The first record with a matching connection type, client address, requested database, and user name is used to perform authentication. There is no 'fall-through' or 'backup': if one record is chosen and the authentication fails, subsequent records are not considered. If no record matches, access is denied.
Solution
Remove any entries from the pg_hba.conf file that allows un restricted access. Examples:
host <database> <user> <cidr_notation> password [<auth_options>]
host <database> <user> <hostname|ip> <netmask> password [<auth_options>]