TOTP 2FA, App passwords and account disable support (closes #436 closes #479)

This commit is contained in:
mdecimus
2024-06-28 12:12:51 +02:00
parent 0693253dff
commit d8a73cd0e4
30 changed files with 250 additions and 85 deletions

114
Cargo.lock generated
View File

@@ -480,6 +480,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
[[package]]
name = "base32"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa"
[[package]]
name = "base64"
version = "0.11.0"
@@ -632,7 +638,7 @@ dependencies = [
"arrayvec",
"cc",
"cfg-if",
"constant_time_eq",
"constant_time_eq 0.3.0",
]
[[package]]
@@ -1116,6 +1122,12 @@ version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6051f239ecec86fde3410901ab7860d458d160371533842974fc61f96d15879b"
[[package]]
name = "constant_time_eq"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6"
[[package]]
name = "constant_time_eq"
version = "0.3.0"
@@ -1401,11 +1413,12 @@ dependencies = [
[[package]]
name = "dashmap"
version = "5.5.3"
version = "6.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
checksum = "804c8821570c3f8b70230c2ba75ffa5c0f9a4189b9a432b6656c536712acae28"
dependencies = [
"cfg-if",
"crossbeam-utils",
"hashbrown 0.14.5",
"lock_api",
"once_cell",
@@ -1427,18 +1440,6 @@ dependencies = [
"generic-array 0.14.7",
]
[[package]]
name = "deadpool"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb84100978c1c7b37f09ed3ce3e5f843af02c2a2c431bae5b19230dad2c1b490"
dependencies = [
"async-trait",
"deadpool-runtime",
"num_cpus",
"tokio",
]
[[package]]
name = "deadpool"
version = "0.12.1"
@@ -1457,7 +1458,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ab8a4ea925ce79678034870834602a2980f4b88c09e97feb266496dbb4493d2"
dependencies = [
"async-trait",
"deadpool 0.12.1",
"deadpool",
"getrandom",
"tokio",
"tokio-postgres",
@@ -1617,8 +1618,7 @@ version = "0.8.2"
dependencies = [
"ahash 0.8.11",
"argon2",
"async-trait",
"deadpool 0.10.0",
"deadpool",
"futures",
"jmap_proto",
"ldap3",
@@ -1642,6 +1642,7 @@ dependencies = [
"store",
"tokio",
"tokio-rustls 0.25.0",
"totp-rs",
"tracing",
"utils",
]
@@ -3158,7 +3159,7 @@ dependencies = [
"nlp",
"p256",
"pkcs8",
"quick-xml 0.31.0",
"quick-xml 0.34.0",
"rand",
"rasn",
"rasn-cms",
@@ -3176,9 +3177,9 @@ dependencies = [
"smtp-proto",
"store",
"tokio",
"tokio-tungstenite",
"tokio-tungstenite 0.23.1",
"tracing",
"tungstenite",
"tungstenite 0.23.0",
"utils",
"x509-parser 0.16.0",
]
@@ -3202,7 +3203,7 @@ dependencies = [
"serde",
"serde_json",
"tokio",
"tokio-tungstenite",
"tokio-tungstenite 0.21.0",
]
[[package]]
@@ -4645,15 +4646,6 @@ version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quick-xml"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33"
dependencies = [
"memchr",
]
[[package]]
name = "quick-xml"
version = "0.32.0"
@@ -4664,6 +4656,15 @@ dependencies = [
"serde",
]
[[package]]
name = "quick-xml"
version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4"
dependencies = [
"memchr",
]
[[package]]
name = "quinn"
version = "0.11.2"
@@ -6131,7 +6132,7 @@ dependencies = [
"bitpacking",
"blake3",
"bytes",
"deadpool 0.12.1",
"deadpool",
"deadpool-postgres",
"elasticsearch",
"farmhash",
@@ -6613,10 +6614,22 @@ dependencies = [
"rustls-pki-types",
"tokio",
"tokio-rustls 0.25.0",
"tungstenite",
"tungstenite 0.21.0",
"webpki-roots 0.26.3",
]
[[package]]
name = "tokio-tungstenite"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd"
dependencies = [
"futures-util",
"log",
"tokio",
"tungstenite 0.23.0",
]
[[package]]
name = "tokio-util"
version = "0.7.11"
@@ -6674,6 +6687,21 @@ dependencies = [
"tracing",
]
[[package]]
name = "totp-rs"
version = "5.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c4ae9724c5888c0417d2396037ed3b60665925624766416e3e342b6ba5dbd3f"
dependencies = [
"base32",
"constant_time_eq 0.2.6",
"hmac 0.12.1",
"sha1",
"sha2 0.10.8",
"url",
"urlencoding",
]
[[package]]
name = "tower"
version = "0.4.13"
@@ -6847,6 +6875,24 @@ dependencies = [
"utf-8",
]
[[package]]
name = "tungstenite"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8"
dependencies = [
"byteorder",
"bytes",
"data-encoding",
"http 1.1.0",
"httparse",
"log",
"rand",
"sha1",
"thiserror",
"utf-8",
]
[[package]]
name = "twofish"
version = "0.7.1"
@@ -7700,7 +7746,7 @@ dependencies = [
"aes",
"arbitrary",
"bzip2",
"constant_time_eq",
"constant_time_eq 0.3.0",
"crc32fast",
"crossbeam-utils",
"deflate64",