8000 doc: warn about security issues around log files · postgres/postgres@41fde30 · GitHub
[go: up one dir, main page]

Skip to content

Commit 41fde30

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 0663212 commit 41fde30

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
@@ -5406,6 +5406,13 @@ local0.* /var/log/postgresql
54065406
<sect2 id="runtime-config-logging-what">
54075407
<title>What To Log</title>
54085408

5409+
<note>
5410+
<para>
5411+
What you choose to log can have security implications; see
5412+
<xref linkend="logfile-maintenance"/>.
5413+
</para>
5414+
</note>
5415+
54095416
<variablelist>
54105417

54115418
<varlistentry id="guc-application-name" xreflabel="application_name">
@@ -5848,6 +5855,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
58485855
planning). Set <varname>log_min_error_statement</varname> to
58495856
<literal>ERROR</literal> (or lower) to log such statements.
58505857
</para>
5858+
<para>
5859+
Logged statements might reveal sensitive data and even contain
5860+
plaintext passwords.
5861+
</para>
58515862
</note>
58525863
</listitem>
58535864
</varlistentry>

doc/src/sgml/maintenance.sgml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,25 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
948948
It is a good idea to save the database server's log output
949949
somewhere, rather than just discarding it via <filename>/dev/null</filename>.
950950
The log output is invaluable when diagnosing
951-
problems. However, the log output tends to be voluminous
951+
problems.
952+
</para>
953+
954+
<note>
955+
<para>
956+
The server log can contain sensitive information and needs to be protected,
957+
no matter how or where it is stored, or the destination to which it is routed.
958+
For example, some DDL statements might contain plaintext passwords or other
959+
authentication details. Logged statements at the <literal>ERROR</literal>
960+
level might show the SQL source code for applications
961+
and might also contain some parts of data rows. Recording data, events and
962+
related information is the intended function of this facility, so this is
963+
not a leakage or a bug. Please ensure the server logs are visible only to
964+
appropriately authorized people.
965+
</para>
966+
</note>
967+
968+
<para>
969+
Log output tends to be voluminous
952970
(especially at higher debug levels) so you won't want to save it
953971
indefinitely. You need to <emphasis>rotate</emphasis> the log files so that
954972
new log files are started and old ones removed after a reasonable

0 commit comments

Comments
 (0)
0