Doing authentication in backend - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Doing authentication in backend
Date
Msg-id Pine.LNX.4.30.0106141817590.2008-100000@peter.localdomain
Whole thread Raw
Responses Re: Doing authentication in backend  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
If we did this the straightforward way (exchange authentication packets
after fork()) then rogue clients could connect, start a backend, twiddle
thumbs, never finish the authentication exchange, meanwhile having filled
up the limit on the number of connections.  Somehow the backends would
have to report back to the postmaster that the authentication passed.
But then an attacker could easily fill up the system's process table with
this approach.  If you in turn put a cap on that to save your system at
large, you're back to having DoS'ed your database server.

Then you would have to put a timeout on the completion of the
authentication sequence.  This would be a fairly tricky thing to configure
given the various choices of ways to authenticate, including interactive
ones.

ISTM that there is some merit in having authentication happen *before*
doing much else, especially allocating per-connection resources.

Comments?

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Removal of temp tables
Next
From: Bruce Momjian
Date:
Subject: Re: remote database queries