Re: host name support in pg_hba.conf - Mailing list pgsql-hackers

From Tom Lane
Subject Re: host name support in pg_hba.conf
Date
Msg-id 29712.1281451159@sss.pgh.pa.us
Whole thread Raw
In response to Re: host name support in pg_hba.conf  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: host name support in pg_hba.conf
Re: host name support in pg_hba.conf
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Without the logic to ensure that the hostname matches the reverse
> lookup, this might be useful for us.  With that logic it is useless
> for us.  I'm wondering how much you gain by having it in there.  Why
> can't a forward lookup which matches the requesting IP be considered
> sufficient?

I was about to complain about that same thing.  ISTM the logic ought
to be that you do a forward DNS lookup on the name presented in
pg_hba.conf, and if any of the returned IP addresses match the
connection's remote IP address, then you have a match.  This business
with doing a reverse lookup is at least twice as expensive, far more
fragile, and it seems completely bogus from a security viewpoint.
Why should I trust the RDNS server for an attacker's IP address?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: host name support in pg_hba.conf
Next
From: Tom Lane
Date:
Subject: Session timeout on commitfest.postgresql.org