Commit 5285c5e8 authored by Bruce Momjian's avatar Bruce Momjian

doc: requirepeer is a way to avoid spoofing

We already mentioned unix_socket_directories as an option.

Reported-by: https://www.postgresql.org/message-id/45016837-6cf3-3136-f959-763d06a28076%402ndquadrant.com

Backpatch-through: 9.6
parent 9595383b
...@@ -1922,7 +1922,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 ...@@ -1922,7 +1922,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
</para> </para>
<para> <para>
The simplest way to prevent spoofing for <literal>local</> On way to prevent spoofing of <literal>local</>
connections is to use a Unix domain socket directory (<xref connections is to use a Unix domain socket directory (<xref
linkend="guc-unix-socket-directories">) that has write permission only linkend="guc-unix-socket-directories">) that has write permission only
for a trusted local user. This prevents a malicious user from creating for a trusted local user. This prevents a malicious user from creating
...@@ -1934,6 +1934,13 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433 ...@@ -1934,6 +1934,13 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
<filename>/tmp</> cleanup script to prevent removal of the symbolic link. <filename>/tmp</> cleanup script to prevent removal of the symbolic link.
</para> </para>
<para>
Another option for <literal>local</> connections is for clients to use
<link linkend="libpq-connect-requirepeer"><literal>requirepeer</></>
to specify the required owner of the server process connected to
the socket.
</para>
<para> <para>
To prevent spoofing on TCP connections, the best solution is to use To prevent spoofing on TCP connections, the best solution is to use
SSL certificates and make sure that clients check the server's certificate. SSL certificates and make sure that clients check the server's certificate.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment