Skip to content

Commit 50e088d

Browse files
committed
doc: warn about security issues around log files
Reported-by: Simon Riggs Discussion: https://postgr.es/m/CANP8+jJESuuXYq9Djvf-+tx2vY2OFLmfEuu+UvwHNJ1RT7iJCQ@mail.gmail.com Author: Simon Riggs Backpatch-through: 10
1 parent 1886060 commit 50e088d

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

doc/src/sgml/config.sgml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6860,6 +6860,13 @@ local0.* /var/log/postgresql
68606860
<sect2 id="runtime-config-logging-what">
68616861
<title>What to Log</title>
68626862

6863+
<note>
6864+
<para>
6865+
What you choose to log can have security implications; see
6866+
<xref linkend="logfile-maintenance"/>.
6867+
</para>
6868+
</note>
6869+
68636870
<variablelist>
68646871

68656872
<varlistentry id="guc-application-name" xreflabel="application_name">
@@ -7458,6 +7465,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
74587465
planning). Set <varname>log_min_error_statement</varname> to
74597466
<literal>ERROR</literal> (or lower) to log such statements.
74607467
</para>
7468+
<para>
7469+
Logged statements might reveal sensitive data and even contain
7470+
plaintext passwords.
7471+
</para>
74617472
</note>
74627473
</listitem>
74637474
</varlistentry>

doc/src/sgml/maintenance.sgml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,25 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
977977
It is a good idea to save the database server's log output
978978
somewhere, rather than just discarding it via <filename>/dev/null</filename>.
979979
The log output is invaluable when diagnosing
980-
problems. However, the log output tends to be voluminous
980+
problems.
981+
</para>
982+
983+
<note>
984+
<para>
985+
The server log can contain sensitive information and needs to be protected,
986+
no matter how or where it is stored, or the destination to which it is routed.
987+
For example, some DDL statements might contain plaintext passwords or other
988+
authentication details. Logged statements at the <literal>ERROR</literal>
989+
level might show the SQL source code for applications
990+
and might also contain some parts of data rows. Recording data, events and
991+
related information is the intended function of this facility, so this is
992+
not a leakage or a bug. Please ensure the server logs are visible only to
993+
appropriately authorized people.
994+
</para>
995+
</note>
996+
997+
<para>
998+
Log output tends to be voluminous
981999
(especially at higher debug levels) so you won't want to save it
9821000
indefinitely. You need to <emphasis>rotate</emphasis> the log files so that
9831001
new log files are started and old ones removed after a reasonable

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy