Skip site navigation (1) Skip section navigation (2)

Re: pg_hba.conf: samehost and samenet [REVIEW]

From: Stef Walter <stef-list(at)memberwebs(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Abhijit Menon-Sen <ams(at)toroid(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_hba.conf: samehost and samenet [REVIEW]
Date: 2009-09-23 16:41:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Magnus Hagander wrote:
> On Mon, Sep 21, 2009 at 20:12, Stef Walter <stef-list(at)memberwebs(dot)com> wrote:
> <snip>
>> Updated in attached patch.
> This patch does not build on Windows, the error is:
> ip.obj : error LNK2019: unresolved external symbol __imp__WSAIoctl(at)36 referenced
>  in function _pg_foreach_ifaddr
> ip.obj : error LNK2019: unresolved external symbol __imp__WSASocketA(at)24 referenc
> ed in function _pg_foreach_ifaddr
> .\Release\libpq\libpq.dll : fatal error LNK1120: 2 unresolved externals
> I don't have time to investigate this further right now, so if
> somebody else want to dig into why that is happening that would be
> helpful :)

My windows VM is giving me problems, but I'll try look into it unless
someone else beats me to do it.

> Also, one thought - with samenet we currently from what I can tell
> enumerate all interfaces. Not just those we bind to based on
> listen_addresses. Is that intentional, or should we restrict us to
> subnets reachable through the interfaces we're actually listening on?

This would change the scope of the patch significantly. It seems that
adding that limitation is unnecessary. In my opinion, if stricter hba
security is required, and limiting to specific subnets are desired,
those subnets should be entered directly into the pg_hba.conf file.

Currently people are adding to a default pg_hba.conf file in
order to allow access from nearby machines, without running into the
maintenance problems of hard coding IP addresses. However using
is clearly suboptimal from a security perspective.

I've seen the samenet feature as a way to avoid the use of in
these cases.

Obviously people who would like stricter postgres security can configure
subnets manually, and would probably not be comfortable with 'automatic'
decisions being made about the subnets allowed.



In response to


pgsql-hackers by date

Next:From: Magnus HaganderDate: 2009-09-23 17:07:46
Subject: Re: pg_hba.conf: samehost and samenet [REVIEW]
Previous:From: Josh BerkusDate: 2009-09-23 16:36:48
Subject: Re: Hot Standby 0.2.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group