Re: [WIP] Patch : Change pg_ident.conf parsing to be the same as pg_hba.conf

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Robert Haas'" <robertmhaas(at)gmail(dot)com>
Cc: "'Pg Hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [WIP] Patch : Change pg_ident.conf parsing to be the same as pg_hba.conf
Date: 2012-07-04 14:38:09
Message-ID: 006301cd59f2$a2284c00$e678e400$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Robert Haas [mailto:robertmhaas(at)gmail(dot)com]
Sent: Tuesday, July 03, 2012 9:43 PM
On Mon, Jul 2, 2012 at 8:08 AM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
>> Suggestions?

> I suggest you add this to the next CommitFest. :-)

> https://commitfest.postgresql.org/action/commitfest_view?id=14

> Meanwhile, we have this CommitFest to get finished with...

I shall add it to next CF.
The testing done for the patch is as follows:

Testing Done For the Patch is as follows:

PRESETUP:
1. configure HBA file to use ident authentication method and mapname =
omicron
local all all ident
map=omicron
host all all 127.0.0.1/32 ident
map=omicron
2. Configure IDENT file to have following configuration
omicron kiran kumar
omicron /^a(.*)$ a\\1
3. Start the server.

Testcases:
1. Try connecting to kumar (pguser) from kiran system login. -- connection
successful.
2. Try connecting to admin (pguser) from admin system login -- connection
successful.
3. Try connecting to viswa (pguser) from viswa system login -- connection
failed as mapname not found.

Invalid Ident file testcases.
modify the ident file as follows
omicron kiran kumar
omicron /^a.*)$ a\\1

4. Try reload the configuration files
server will give error as follows
LOG: received SIGHUP, reloading configuration files
LOG: invalid regular expression "^r.*)$": parentheses () not balanced
WARNING: pg_ident.conf not reloaded

After that execute the previous success sceanrios
5. Try connecting to kumar (pguser) from kiran system login. -- connection
successful.
6. Try connecting to admin (pguser) from admin system login -- connection
successful.
7. Try connecting to viswa (pguser) from viswa system login -- connection
failed as mapname not found.

8. Stop the server and start it again.
LOG: invalid regular expression "^a.*)$": parentheses () not balanced
FATAL: could not load pg_ident.conf

With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2012-07-04 15:00:19 Re: Event Triggers reduced, v1
Previous Message David E. Wheeler 2012-07-04 14:21:28 Re: pgfoundry references in docs