pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #5763: pg_hba.conf not honored
6+ messages / 4 participants
[nested] [flat]
* BUG #5763: pg_hba.conf not honored
@ 2010-11-23 08:34 Kaiting Chen <kaitocracy@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Kaiting Chen @ 2010-11-23 08:34 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 5763
Logged by: Kaiting Chen
Email address: kaitocracy@gmail.com
PostgreSQL version: 9.0.1
Operating system: Arch Linux (latest)
Description: pg_hba.conf not honored
Details:
### /etc/postgresql/pg_hba.conf: Authentication configuration for
'postgresql'
# Type Database User CIDR-ADDRESS Method
local all psql ident
host all +service 192.168.162.130/32 password
host all all 192.168.162.130/32 gss
### /etc/postgresql/pg_hba.conf: Authentication configuration for
'postgresql'
List of roles
Role name | Attributes | Member of
-------------------+-----------------------------------+-----------
kaiting.chen | Superuser, Create role, Create DB | {turtle}
psql | Superuser, Create role, Create DB | {}
service | | {}
turtle | | {}
---
kaiting.chen ~: PGHOST='psql.kiwilight.com' psql
Password:
psql: fe_sendauth: no password supplied
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5763: pg_hba.conf not honored
@ 2010-11-23 15:29 Tom Lane <tgl@sss.pgh.pa.us>
parent: Kaiting Chen <kaitocracy@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2010-11-23 15:29 UTC (permalink / raw)
To: Kaiting Chen <kaitocracy@gmail.com>; +Cc: pgsql-bugs
"Kaiting Chen" <kaitocracy@gmail.com> writes:
> From this pg_hba configuration as the user 'kaiting.chen' is not in role
> 'service' the second entry in the table should be skipped and he should
> authenticate via GSSAPI. However this does not happen.
I believe the definition of "in role" we use here is "has the privileges
of role". Since kaiting.chen is a superuser, all privilege tests will
succeed for him, including that one. IOW, a superuser is automatically
a member of every role. This isn't a bug.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5763: pg_hba.conf not honored
@ 2010-11-28 12:56 Robert Haas <robertmhaas@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 6+ messages in thread
From: Robert Haas @ 2010-11-28 12:56 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Kaiting Chen <kaitocracy@gmail.com>; pgsql-bugs
On Tue, Nov 23, 2010 at 10:29 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Kaiting Chen" <kaitocracy@gmail.com> writes:
>> From this pg_hba configuration as the user 'kaiting.chen' is not in role
>> 'service' the second entry in the table should be skipped and he should
>> authenticate via GSSAPI. However this does not happen.
>
> I believe the definition of "in role" we use here is "has the privileges
> of role". Since kaiting.chen is a superuser, all privilege tests will
> succeed for him, including that one. IOW, a superuser is automatically
> a member of every role. This isn't a bug.
I guess it's not a bug if we did it that way on purpose, but it seems
like testing for actual group membership would be less surprising.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5763: pg_hba.conf not honored
@ 2010-11-28 16:46 Tom Lane <tgl@sss.pgh.pa.us>
parent: Robert Haas <robertmhaas@gmail.com>
1 sibling, 1 reply; 6+ messages in thread
From: Tom Lane @ 2010-11-28 16:46 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Kaiting Chen <kaitocracy@gmail.com>; pgsql-bugs
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Nov 23, 2010 at 10:29 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I believe the definition of "in role" we use here is "has the privileges
>> of role". Since kaiting.chen is a superuser, all privilege tests will
>> succeed for him, including that one. IOW, a superuser is automatically
>> a member of every role. This isn't a bug.
> I guess it's not a bug if we did it that way on purpose, but it seems
> like testing for actual group membership would be less surprising.
Then you'd have superusers acting like they were group members for some
purposes and not others. Not sure how that would be less surprising.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5763: pg_hba.conf not honored
@ 2010-11-29 02:11 Robert Haas <robertmhaas@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 6+ messages in thread
From: Robert Haas @ 2010-11-29 02:11 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Kaiting Chen <kaitocracy@gmail.com>; pgsql-bugs
On Sun, Nov 28, 2010 at 11:46 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Tue, Nov 23, 2010 at 10:29 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I believe the definition of "in role" we use here is "has the privileges
>>> of role". Since kaiting.chen is a superuser, all privilege tests will
>>> succeed for him, including that one. IOW, a superuser is automatically
>>> a member of every role. This isn't a bug.
>
>> I guess it's not a bug if we did it that way on purpose, but it seems
>> like testing for actual group membership would be less surprising.
>
> Then you'd have superusers acting like they were group members for some
> purposes and not others. Not sure how that would be less surprising.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #5763: pg_hba.conf not honored
@ 2010-11-30 19:21 Peter Eisentraut <peter_e@gmx.net>
parent: Robert Haas <robertmhaas@gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Peter Eisentraut @ 2010-11-30 19:21 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Kaiting Chen <kaitocracy@gmail.com>; pgsql-bugs
On sön, 2010-11-28 at 07:56 -0500, Robert Haas wrote:
> I guess it's not a bug if we did it that way on purpose, but it seems
> like testing for actual group membership would be less surprising.
I agree this is pretty confusing and would consider changing it.
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2010-11-30 19:21 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23 08:34 BUG #5763: pg_hba.conf not honored Kaiting Chen <kaitocracy@gmail.com>
2010-11-23 15:29 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-11-28 12:56 ` Robert Haas <robertmhaas@gmail.com>
2010-11-28 16:46 ` Tom Lane <tgl@sss.pgh.pa.us>
2010-11-29 02:11 ` Robert Haas <robertmhaas@gmail.com>
2010-11-30 19:21 ` Peter Eisentraut <peter_e@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox