Securing the PostgreSQL Database

The Xpress Insight server will install a PostgreSQL database server to handle data storage for the repository. By default, the users of the local machine will be able to connect to the PostgreSQL database server without requiring passwords. If other users will have access to the machine where the PostgreSQL database server resides, you may want to secure the database against access by these users as follows:
  1. Locate the file <installdir>/insight/db/pgsql/data/pg_hba.conf and open it in a text editor (such as Notepad). Find the following lines located towards the end of the file:
    # IPv4 local connections:
    host    all             all             127.0.0.1/32            trust
    # IPv6 local connections:
    host    all             all             ::1/128                 trust
    
    host    insightmirror   publisher       0.0.0.0/0               md5
    host    insightmirror   publisher       ::0/0                   md5
    
  2. Change host access so that the access method is md5. Change access to insightmirror from all hosts to a reduced IP address range. Consult the PostgreSQL documentation for more details on this.
    # IPv4 local connections:
    host    all             all             127.0.0.1/32            md5
    # IPv6 local connections:
    host    all             all             ::1/128                 md5
    
    host    insightmirror   publisher       0.0.0.0/0               md5
    host    insightmirror   publisher       ::0/0                   md5     
    
  3. Restart the PostgreSQL database server from the Windows services control applet. This will instruct PostgreSQL to require password authentication of incoming connections from the local machine.