@@ -7,49 +7,15 @@ dovecotlinks:
77
88# Authentication Penalty
99
10- Dovecot anvil process tracks authentication penalties for different IPs
11- to slow down brute force login attempts. The penalty is increased after failed
12- logins until a maximum value, unless [[ link,passdb_extra_field_nodelay]] is
13- used. The penalty is applied for the IP before passdb lookups are done, so
14- the delay might exist even with ` nodelay ` if it is not used for all
15- authentication attempts for the IP.
10+ <!-- @include: include/anvil-overview.inc -->
1611
1712## Algorithm
1813
19- - First auth failure reply will be delayed for 2 seconds (this happens
20- even without auth penalty)
21-
22- - ` AUTH_PENALTY_INIT_SECS ` in ` src/auth/auth-penalty.h `
23-
24- - The delay will be doubled for 4 -> 8 seconds, and then the upper
25- limit of 15 seconds is reached.
26-
27- - ` AUTH_PENALTY_MAX_SECS ` and ` AUTH_PENALTY_MAX_PENALTY ` in
28- ` src/auth/auth-penalty.h `
29-
30- - If the IP is in [[ setting,login_trusted_networks]] (e.g. webmail), skip any
31- authentication penalties
32-
33- - If the username+password combination is the same as one of the last
34- 10 login attempts, skip increasing authentication penalty.
35-
36- - ` CHECKSUM_VALUE_PTR_COUNT ` in ` src/anvil/penalty.c `
37-
38- - The idea is that if a user has simply configured the password
39- wrong, it shouldn't keep increasing the delay.
40-
41- - The username+password is tracked as the CRC32 of them, so there is
42- a small possibility of hash collisions
14+ <!-- @include: include/anvil-algorithm.inc -->
4315
4416## Problems
4517
46- - It is still possible to do multiple auth lookups from the same IP in
47- parallel.
48-
49- - For IPv6 it currently blocks the entire /48 block, which may or may
50- not be what is wanted.
51-
52- - ` PENALTY_IPV6_MASK_BITS ` in ` auth-penalty.c `
18+ <!-- @include: include/anvil-problems.inc -->
5319
5420## Disabling
5521
0 commit comments