|
| 1 | +<!-- doc/src/sgml/auth-delay.sgml --> |
| 2 | + |
| 3 | +<sect1 id="auth-delay"> |
| 4 | + <title>auth_delay</title> |
| 5 | + |
| 6 | + <indexterm zone="auth-delay"> |
| 7 | + <primary>auth_delay</primary> |
| 8 | + </indexterm> |
| 9 | + |
| 10 | + <para> |
| 11 | + <filename>auth_delay</filename> causes the server to pause briefly before |
| 12 | + reporting authentication failure, to make brute-force attacks on database |
| 13 | + passwords more difficult. Note that it does nothing to prevent |
| 14 | + denial-of-service attacks, and may even exacerbate them, since processes |
| 15 | + that are waiting before reporting authentication failure will still consume |
| 16 | + connection slots. |
| 17 | + </para> |
| 18 | + |
| 19 | + <para> |
| 20 | + In order to function, this module must be loaded via |
| 21 | + <xref linkend="guc-shared-preload-libraries"> in <filename>postgresql.conf</>. |
| 22 | + </para> |
| 23 | + |
| 24 | + <sect2> |
| 25 | + <title>Configuration parameters</title> |
| 26 | + |
| 27 | + <variablelist> |
| 28 | + <varlistentry> |
| 29 | + <term> |
| 30 | + <varname>auth_delay.milliseconds</varname> (<type>int</type>) |
| 31 | + </term> |
| 32 | + <indexterm> |
| 33 | + <primary><varname>auth_delay.milliseconds</> configuration parameter</primary> |
| 34 | + </indexterm> |
| 35 | + <listitem> |
| 36 | + <para> |
| 37 | + The number of milliseconds to wait before reporting an authentication |
| 38 | + failure. The default is 0. |
| 39 | + </para> |
| 40 | + </listitem> |
| 41 | + </varlistentry> |
| 42 | + </variablelist> |
| 43 | + |
| 44 | + <para> |
| 45 | + In order to set these parameters in your <filename>postgresql.conf</> file, |
| 46 | + you will need to add <literal>auth_delay</> to |
| 47 | + <xref linkend="guc-custom-variable-classes">. Typical usage might be: |
| 48 | + </para> |
| 49 | + |
| 50 | +<programlisting> |
| 51 | +# postgresql.conf |
| 52 | +shared_preload_libraries = 'auth_delay' |
| 53 | + |
| 54 | +custom_variable_classes = 'auth_delay' |
| 55 | +auth_delay.milliseconds = '500' |
| 56 | +</programlisting> |
| 57 | + </sect2> |
| 58 | + |
| 59 | + <sect2> |
| 60 | + <title>Author</title> |
| 61 | + |
| 62 | + <para> |
| 63 | + KaiGai Kohei <email>kaigai@ak.jp.nec.com</email> |
| 64 | + </para> |
| 65 | + </sect2> |
| 66 | + |
| 67 | +</sect1> |
0 commit comments