From 5d2a1a41d053672f7007cea3da66937681730ea5 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Fri, 28 Nov 2008 14:26:58 +0000 Subject: Support regular expressions in pg_ident.conf. --- doc/src/sgml/client-auth.sgml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml index 4a8aea4d3a9..a6a96c180df 100644 --- a/doc/src/sgml/client-auth.sgml +++ b/doc/src/sgml/client-auth.sgml @@ -1,4 +1,4 @@ - + Client Authentication @@ -595,6 +595,19 @@ local db1,db2,@demodbs all md5 There is no restriction regarding how many database users a given operating system user can correspond to, nor vice versa. + + If the system-username field starts with a slash (/), + the contents of the field is treated as a regular expression. This regular + expression supports a single capture, which can be back-referenced as + \1 (backslash-one). This allows the mapping of different syntax + names with a single line. + +mymap /(.*)@mydomain.com \1 +mymap /(.*)@otherdomain.com guest + + will "remove" the domain part for users with system usernames @mydomain.com, and + allow all users from @otherdomain.com to log in as guest. + The pg_ident.conf file is read on start-up and -- cgit v1.2.3