You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*: add ability to define custom pg_hba.conf entries
Add a new cluster spec option called `pgHBA` where users can define a
custom list of pg_hba.conf entries.
These entries will be added to the pg_hba.conf after all the
stolon managed entries so we'll guarantee local connections from the
keeper and replication connection between pg instances.
These entries aren't validated by stolon so if any of them is wrong the
postgres instance will fail to start of return a warning on reload.
If no custom pg_hba.conf entries are provided then we'll use the current
behavior of accepting all hosts for all dbs and users with md5
authentincation:
```
host all all 0.0.0.0/0 md5
host all all ::0/0 md5
```
Stolon manages the pg_hba.conf file entries. The first rules are generated by stolon to permit local keeper connections and remote replication connections since these are needed to ensure the correct operation of the cluster.
4
+
5
+
Users can specify custom pg_hba.conf entries setting the [cluster_specification](cluster_spec.md)`pgHBA` option. It must be a list of string containing additional pg_hba.conf entries. They will be added to the pg_hba.conf generated by stolon.
6
+
7
+
Since clients connection will pass through the stolon-proxy the host part of the entries should match at least the stolon-proxies source addresses. For the same reason it's not possible to directly filter by client. If you have clients that requires different accesses you should use different set of stolon proxies for every kind of access.
8
+
9
+
**NOTE**: these lines aren't validated so if some of them are wrong postgres will refuse to start or, on reload, will log a warning and ignore the updated pg_hba.conf file. Stolon will just check that the string doesn't contain newlines characters.
10
+
11
+
By default, if no custom pg_hba entries are defined (clusterpsec pgHBA option is null, not an empty list), to keep backward compatibility, stolon will add two rules to permit tcp (both ipv4 and ipv6) connections from every host to all dbs and usernames with md5 password authentication:
0 commit comments