From 0045330880f31b23dc64d412521b305a44f6455d Mon Sep 17 00:00:00 2001 From: Stefan Melmuk Date: Sun, 28 Apr 2024 06:57:14 +0200 Subject: [PATCH] update webauthn-rs to 0.5 --- Cargo.lock | 52 ++++++++++++++++++++++------- Cargo.toml | 4 +-- src/api/core/two_factor/webauthn.rs | 2 +- 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 31353895..d22b2269 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -428,6 +428,17 @@ dependencies = [ "serde_json", ] +[[package]] +name = "base64urlsafedata" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a56894edf5cd1efa7068d7454adeb7ce0b3da4ffa5ab08cfc06165bbc62f0c7" +dependencies = [ + "base64 0.21.7", + "paste", + "serde", +] + [[package]] name = "bigdecimal" version = "0.4.3" @@ -638,7 +649,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7aa76ef19968577838a34d02848136bb9b6bdbfd7675fb968fe9c931bc434b33" dependencies = [ "base64 0.13.1", - "base64urlsafedata", + "base64urlsafedata 0.1.3", "hex", "openssl", "serde", @@ -4281,12 +4292,25 @@ dependencies = [ ] [[package]] -name = "webauthn-rs" -version = "0.4.8" +name = "webauthn-attestation-ca" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db00711c712414e93b019c4596315085792215bc2ac2d5872f9e8913b0a6316" +checksum = "9b0f2ebaf5650ca15b515a761f31ed6477fa2312491cf632a71102ac22b82784" dependencies = [ - "base64urlsafedata", + "base64urlsafedata 0.5.0", + "openssl", + "serde", + "tracing", + "uuid", +] + +[[package]] +name = "webauthn-rs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb9d7cdc9ec26e3e06f7e8ee1433e6fa3627c6c075ab3effbc3a2280c2f526c0" +dependencies = [ + "base64urlsafedata 0.5.0", "serde", "tracing", "url", @@ -4296,17 +4320,19 @@ dependencies = [ [[package]] name = "webauthn-rs-core" -version = "0.4.9" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "294c78c83f12153a51e1cf1e6970b5da1397645dada39033a9c3173a8fc4fc2b" +checksum = "cf1ee1dc7f4138b8fd05a74a6eae93ddaf504c5a60861f1eb95d9de3172900b3" dependencies = [ - "base64 0.13.1", - "base64urlsafedata", + "base64 0.21.7", + "base64urlsafedata 0.5.0", "compact_jwt", "der-parser", + "hex", "nom", "openssl", "rand", + "rand_chacha", "serde", "serde_cbor_2", "serde_json", @@ -4314,17 +4340,19 @@ dependencies = [ "tracing", "url", "uuid", + "webauthn-attestation-ca", "webauthn-rs-proto", "x509-parser", ] [[package]] name = "webauthn-rs-proto" -version = "0.4.9" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24e638361a63ba5c0a0be6a60229490fcdf33740ed63df5bb6bdb627b52a138" +checksum = "1f1c6dc254607f48eec3bdb35b86b377202436859ca1e4c9290afafd7349dcc3" dependencies = [ - "base64urlsafedata", + "base64 0.21.7", + "base64urlsafedata 0.5.0", "serde", "serde_json", "url", diff --git a/Cargo.toml b/Cargo.toml index cc22f37d..9146b3d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -109,8 +109,8 @@ totp-lite = "2.0.1" yubico = { version = "0.11.0", features = ["online-tokio"], default-features = false } # WebAuthn libraries -webauthn-rs = { version = "0.4.8", features = ["danger-allow-state-serialisation", "danger-credential-internals", "resident-key-support"] } -webauthn-rs-core = { version = "0.4.9" } +webauthn-rs = { version = "0.5.0", features = ["danger-allow-state-serialisation", "danger-credential-internals"] } +webauthn-rs-core = { version = "0.5.0" } # Handling of URL's for WebAuthn and favicons url = "2.5.0" diff --git a/src/api/core/two_factor/webauthn.rs b/src/api/core/two_factor/webauthn.rs index ce75fe6b..42d65b76 100644 --- a/src/api/core/two_factor/webauthn.rs +++ b/src/api/core/two_factor/webauthn.rs @@ -95,7 +95,7 @@ async fn generate_webauthn_challenge( data.validate(&user, false, &mut conn).await?; - let registrations: Vec = get_webauthn_registrations(&user.uuid, &mut conn) + let registrations: Vec = get_webauthn_registrations(&user.uuid, &mut conn) .await? .1 .into_iter()