Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5eb38dc

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 c90dfb6 commit 5eb38dc

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
@@ -6853,6 +6853,13 @@ local0.* /var/log/postgresql
68536853
<sect2 id="runtime-config-logging-what">
68546854
<title>What to Log</title>
68556855

6856+
<note>
6857+
<para>
6858+
What you choose to log can have security implications; see
6859+
<xref linkend="logfile-maintenance"/>.
6860+
</para>
6861+
</note>
6862+
68566863
<variablelist>
68576864

68586865
<varlistentry id="guc-application-name" xreflabel="application_name">
@@ -7451,6 +7458,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
74517458
planning). Set <varname>log_min_error_statement</varname> to
74527459
<literal>ERROR</literal> (or lower) to log such statements.
74537460
</para>
7461+
<para>
7462+
Logged statements might reveal sensitive data and even contain
7463+
plaintext passwords.
7464+
</para>
74547465
</note>
74557466
</listitem>
74567467
</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)