From a2c3931a244b67115a0eac1ee5fde9eb7cb4e42c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 21 Apr 2010 03:32:53 +0000 Subject: Fix pg_hba.conf matching so that replication connections only match records with database = replication. The previous coding would allow them to match ordinary records too, but that seems like a recipe for security breaches. Improve the messages associated with no-such-pg_hba.conf entry to report replication connections as such, since that's now a critical aspect of whether the connection matches. Make some cursory improvements in the related documentation, too. --- doc/src/sgml/client-auth.sgml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'doc/src/sgml/client-auth.sgml') diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml index 38b13954ea5..d2f30a47c4e 100644 --- a/doc/src/sgml/client-auth.sgml +++ b/doc/src/sgml/client-auth.sgml @@ -1,4 +1,4 @@ - + Client Authentication @@ -75,13 +75,14 @@ The general format of the pg_hba.conf file is a set of records, one per line. Blank lines are ignored, as is any - text after the # comment character. A record is made + text after the # comment character. + Records cannot be continued across lines. + A record is made up of a number of fields which are separated by spaces and/or tabs. Fields can contain white space if the field value is quoted. - Quoting one of the keywords in database or username field (e.g "all" - or "replication") makes the name lose its special character, and just - match a database or username with that name. Records cannot be - continued across lines. + Quoting one of the keywords in a database or username field (e.g., + all or replication) makes the word lose its special + character, and just match a database or user with that name. @@ -185,7 +186,8 @@ hostnossl database user name as the requested database. (samegroup is an obsolete but still accepted spelling of samerole.) The value replication specifies that the record - matches if streaming replication is requested. + matches if a replication connection is requested (note that + replication connections do not specify any particular database). Otherwise, this is the name of a specific PostgreSQL database. Multiple database names can be supplied by separating them with @@ -241,7 +243,7 @@ hostnossl database user Typical examples of a CIDR-address are 172.20.143.89/32 for a single host, or 172.20.143.0/24 for a small network, or - 10.6.0.0/16 for a larger one. + 10.6.0.0/16 for a larger one. 0.0.0.0/0 (all balls) represents all addresses. To specify a single host, use a CIDR mask of 32 for IPv4 or 128 for IPv6. In a network address, do not omit trailing zeroes. -- cgit v1.2.3