Re: SSL over Unix-domain sockets

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Mark Mielke <mark(at)mark(dot)mielke(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SSL over Unix-domain sockets
Date: 2008-01-15 14:54:51
Message-ID: 200801151454.m0FEspN29129@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Tom Lane wrote:
> >> Yeah, all of this is about confusion and error-proneness. I still think
> >> that the real problem is that we don't have full control over
> >> client-side code, and therefore can't just write off the problem of a
> >> client deciding to connect to /tmp/.s.PGSQL.5432 even if the local DBA
> >> thinks the socket would be safer elsewhere.
>
> > Right. I think the lock file in /tmp does help somewhat.
>
> Even if it happens to work (on some platforms) it seems like a kluge.
>
> It strikes me that given the postmaster's infrastructure for listening
> on multiple sockets, it would be a pretty small matter of programming
> to teach it to listen on socket files in multiple directories not only
> one. If we had that, the postmaster could listen in both /tmp and
> your-more-secure-directory-of-choice. Surely an actual socket file
> would be a more useful "blocker" in /tmp than a dead-weight PID file.

The problem with creating a working second socket in /tmp is that the
client would succeed with the insecure socket location and when the
server is down spoofing is possible. I figure the client should fail so
users know the client is incorrectly/insecurely configured.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-01-15 15:04:46 Re: Array behavior oddities
Previous Message Markus Schiltknecht 2008-01-15 14:23:58 Re: Declarative partitioning grammar

Browse pgsql-patches by date

  From Date Subject
Next Message Stefan Schwarzer 2008-01-15 15:12:28 Re: Forgot to dump old data before re-installing machine
Previous Message Martijn van Oosterhout 2008-01-15 14:52:37 Re: Forgot to dump old data before re-installing machine