Re: [WIP] Patch : Change pg_ident.conf parsing to be the same as pg_hba.conf - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [WIP] Patch : Change pg_ident.conf parsing to be the same as pg_hba.conf
Date
Msg-id 006301cd59f2$a2284c00$e678e400$@kapila@huawei.com
Whole thread Raw
In response to Re: [WIP] Patch : Change pg_ident.conf parsing to be the same as pg_hba.conf  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
From: Robert Haas [mailto:robertmhaas@gmail.com] 
Sent: Tuesday, July 03, 2012 9:43 PM
On Mon, Jul 2, 2012 at 8:08 AM, Amit Kapila <amit.kapila@huawei.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.




pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: pgfoundry references in docs
Next
From: Dimitri Fontaine
Date:
Subject: Re: Event Triggers reduced, v1