Skip to content

Commit

Permalink
#319 local auth should be peer, configure replication auth as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Don Sizemore committed Sep 15, 2023
1 parent c2644c6 commit 0cd9110
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions templates/pg_hba.conf.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# "local" is for Unix domain socket connections only
local all all {{ db.postgres.auth }}
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 {{ db.postgres.auth }}
# IPv6 local connections:
Expand All @@ -9,11 +9,11 @@ host all all ::1/128 {{ db.postgres.a
{% if db.postgres.replication.enabled is defined %}
{% for item in db.postgres.replication.servers %}
{% if item | regex_search(".*/.*") %}
host all all {{ item }} md5
host replication rep {{ item }} md5
host all all {{ item }} {{ db.postgres.auth }}
host replication rep {{ item }} {{ db.postgres.auth }}
{% else %}
host all all {{ item }}/32 md5
host replication rep {{ item }}/32 md5
host all all {{ item }}/32 {{ db.postgres.auth }}
host replication rep {{ item }}/32 {{ db.postgres.auth }}
{% endif %}
{% endfor %}
{% endif %}

0 comments on commit 0cd9110

Please sign in to comment.