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

Lists: pgsql-hackers
From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila(at)huawei(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-03 16:12:31
Message-ID: CA+TgmoZkC_uoiRWcGUTynOM0mJTP8ALK0GNeA=tdgkATE1Vb5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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...

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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
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.


From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, 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-09-16 20:09:08
Message-ID: CAMkU=1wUc26t=VSkmJT+ppbARVzEbZ4-mOzSWGMmTj1SiBuz+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jul 4, 2012 at 7:38 AM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
> 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.

I put my self down as a reviewer for this a while ago, but I never got
beyond the stage of verifying that it applies and compiles, and that
it does what it says it does, at least in the broad sense, and that
what it does is desirable (I think it is).

I haven't done a detailed code review, or tested for corner cases.
Unfortunately I don't think I'll be able to do either of those during
this commitfest, or at least not until toward the end of it. So I
took myself off as reviewer so the commit-fest manager can assign
someone else. Sorry about that.

Cheers,

Jeff


From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Jeff Janes'" <jeff(dot)janes(at)gmail(dot)com>
Cc: "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "'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-09-17 03:37:24
Message-ID: 00ba01cd9485$c0f0cc20$42d26460$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Monday, September 17, 2012 1:39 AM Jeff Janes wrote:
On Wed, Jul 4, 2012 at 7:38 AM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
> 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.

> I put my self down as a reviewer for this a while ago, but I never got
> beyond the stage of verifying that it applies and compiles, and that
> it does what it says it does, at least in the broad sense, and that
> what it does is desirable (I think it is).

> I haven't done a detailed code review, or tested for corner cases.
> Unfortunately I don't think I'll be able to do either of those during
> this commitfest, or at least not until toward the end of it. So I
> took myself off as reviewer so the commit-fest manager can assign
> someone else. Sorry about that.

Thank you for confirming the sanity of patch at broad level.

With Regards,
Amit Kapila.