1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-05-13 07:03:58 +00:00

Basic ratelimit for user login (including 2FA) and admin login

This commit is contained in:
Daniel García 2021-12-22 21:48:49 +01:00
parent 0a5df06e77
commit 5529264c3f
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
7 changed files with 134 additions and 2 deletions

View file

@ -511,6 +511,16 @@ make_config! {
/// Allowed iframe ancestors (Know the risks!) |> Allows other domains to embed the web vault into an iframe, useful for embedding into secure intranets
allowed_iframe_ancestors: String, true, def, String::new();
/// Seconds between login requests |> Number of seconds, on average, between login requests before rate limiting kicks in. Note that this applies to both the login and the 2FA, so it's recommended to allow a burst size of at least 2
login_ratelimit_seconds: u64, false, def, 60;
/// Max burst size for login requests |> Allow a burst of requests of up to this size, while maintaining the average indicated by `login_ratelimit_seconds`
login_ratelimit_max_burst: u32, false, def, 10;
/// Seconds between admin requests |> Number of seconds, on average, between admin requests before rate limiting kicks in
admin_ratelimit_seconds: u64, false, def, 300;
/// Max burst size for login requests |> Allow a burst of requests of up to this size, while maintaining the average indicated by `admin_ratelimit_seconds`
admin_ratelimit_max_burst: u32, false, def, 3;
},
/// Yubikey settings