Re: Why don't we allow DNS names in pg_hba.conf? - Mailing list pgsql-hackers

From Marc G. Fournier
Subject Re: Why don't we allow DNS names in pg_hba.conf?
Date
Msg-id 20060101144616.L1088@ganymede.hub.org
Whole thread Raw
In response to Why don't we allow DNS names in pg_hba.conf?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Why don't we allow DNS names in pg_hba.conf?  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Why don't we allow DNS names in pg_hba.conf?  (Andreas Pflug <pgadmin@pse-consulting.de>)
Re: Why don't we allow DNS names in pg_hba.conf?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, 1 Jan 2006, Tom Lane wrote:

> I was reminded of $subject by
> http://archives.postgresql.org/pgsql-admin/2006-01/msg00002.php
>
> While I haven't tried it, I suspect that allowing a DNS host name
> would take little work (basically removing the AI_NUMERICHOST flag
> passed to getaddrinfo in hba.c).  There was once a good reason not
> to allow it: slow DNS lookups would lock up the postmaster.  But
> now that we do this work in an already-forked backend, with an overall
> timeout that would catch any indefinite blockage, I don't see a good
> reason why we shouldn't let people use DNS names.
>
> Thoughts?

Security?

Employee adds his DNS to pg_hba.conf, becomes disgruntled employee, moves 
to different IP and same name, and can still access your database?

What about "DNS hijacking/forging"?  I don't know how hard it is to do, 
but if one of the upstream network provides puts in a 'filter' for port 53 
(DNS) and starts feeding you incorrect data, so that they can access your 
databases?

Both are relatively extreme, and in both bases, the 'attacker' would have 
to have previous knowledge (ie. disgruntled ex employee) but DNS != 
trusted IP ... then again, it may be possible to hijack/forge the IP 
itself, in which case, there is no difference ...


----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Why don't we allow DNS names in pg_hba.conf?
Next
From: Qingqing Zhou
Date:
Subject: Re: EINTR error in SunOS