Preventing Crunchy Postgres Access from Terminal of OpenShift Pod

32 Views Asked by At

I have a Crunchy Postgresql database running in an OpenShift pod. The db is configured in the PostgresCluster.yaml file and then deployed through a pipeline.

The problem: Everyone who have access to the terminal of the pod is able to access the data by simply typing psql in the terminal and then he is logged in as the superuser "postgres".

What I want to achieve: Access to the db from the terminal should be authenticated.
For example: someone must enter the password of the user "postgres".

What I have tried: Adding the following line to postgresCluster.yaml:

pg_hba:
  - local all postgres password 
  - local all postgres md5
  - host all all all

None of them worked.

I am thinking maybe I was working on the wrong file...

0

There are 0 best solutions below