mirror of
https://github.com/lldap/lldap.git
synced 2026-07-25 17:58:44 +00:00
chore: centralize and upgrade shared Cargo dependencies
Move duplicated Cargo dependencies to the root workspace manifest, switch member crates to workspace dependencies, and align non-conflicting shared feature sets at the workspace level. Upgrade a number of shared dependencies while consolidating versions across the workspace. This also consolidates the ldap3 dependency in response to GHSA-qcxq-75wr-5cm8: https://github.com/kanidm/ldap3/security/advisories/GHSA-qcxq-75wr-5cm8 Update frontend and migration code for dependency upgrades and clean up manifest structure.
This commit is contained in:
committed by
nitnelave
parent
b8465212b5
commit
40121b80b7
@@ -10,8 +10,8 @@ repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
tracing = "*"
|
||||
async-trait = "0.1"
|
||||
tracing = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
|
||||
[dependencies.lldap_auth]
|
||||
path = "../auth"
|
||||
|
||||
+7
-19
@@ -18,35 +18,23 @@ sea_orm = ["dep:sea-orm"]
|
||||
test = []
|
||||
|
||||
[dependencies]
|
||||
chrono = { workspace = true }
|
||||
derive_more = { workspace = true }
|
||||
opaque-ke = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
rust-argon2 = "2"
|
||||
curve25519-dalek = "3"
|
||||
digest = "0.9"
|
||||
generic-array = "0.14"
|
||||
rand = "0.8"
|
||||
rand = { workspace = true }
|
||||
sha2 = "0.9"
|
||||
thiserror = "2"
|
||||
uuid = { version = "1.18.1", features = ["serde"] }
|
||||
|
||||
[dependencies.derive_more]
|
||||
features = ["debug", "display"]
|
||||
default-features = false
|
||||
version = "1"
|
||||
|
||||
[dependencies.opaque-ke]
|
||||
version = "0.7"
|
||||
|
||||
[dependencies.chrono]
|
||||
version = "*"
|
||||
features = ["serde"]
|
||||
thiserror = { workspace = true }
|
||||
uuid = { workspace = true, features = ["serde"] }
|
||||
|
||||
[dependencies.sea-orm]
|
||||
workspace = true
|
||||
features = ["macros"]
|
||||
optional = true
|
||||
|
||||
[dependencies.serde]
|
||||
workspace = true
|
||||
|
||||
# For WASM targets, use the JS getrandom.
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.getrandom]
|
||||
version = "0.2"
|
||||
|
||||
@@ -12,22 +12,17 @@ rust-version.workspace = true
|
||||
test = []
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1"
|
||||
base64 = "0.21"
|
||||
ldap3_proto = "0.6.0"
|
||||
serde_bytes = "0.11"
|
||||
async-trait = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
derive_more = { workspace = true }
|
||||
ldap3_proto = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_bytes = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1"
|
||||
|
||||
[dependencies.chrono]
|
||||
features = ["serde"]
|
||||
version = "0.4"
|
||||
|
||||
[dependencies.derive_more]
|
||||
features = ["debug", "display", "from", "from_str"]
|
||||
default-features = false
|
||||
version = "1"
|
||||
pretty_assertions = { workspace = true }
|
||||
|
||||
[dependencies.lldap_auth]
|
||||
path = "../auth"
|
||||
@@ -38,10 +33,3 @@ path = "../domain"
|
||||
|
||||
[dependencies.lldap_domain_model]
|
||||
path = "../domain-model"
|
||||
|
||||
[dependencies.serde]
|
||||
workspace = true
|
||||
|
||||
[dependencies.uuid]
|
||||
features = ["v1", "v3"]
|
||||
version = "1"
|
||||
|
||||
@@ -12,23 +12,19 @@ rust-version.workspace = true
|
||||
test = []
|
||||
|
||||
[dependencies]
|
||||
base64 = "0.21"
|
||||
bincode = "1.3"
|
||||
orion = "0.17"
|
||||
serde_bytes = "0.11"
|
||||
thiserror = "2"
|
||||
base64 = { workspace = true }
|
||||
bincode = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
derive_more = { workspace = true }
|
||||
orion = { workspace = true }
|
||||
sea-orm = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_bytes = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1"
|
||||
|
||||
[dependencies.chrono]
|
||||
features = ["serde"]
|
||||
version = "0.4"
|
||||
|
||||
[dependencies.derive_more]
|
||||
features = ["debug", "display", "from", "from_str"]
|
||||
default-features = false
|
||||
version = "1"
|
||||
pretty_assertions = { workspace = true }
|
||||
|
||||
[dependencies.lldap_auth]
|
||||
path = "../auth"
|
||||
@@ -36,14 +32,3 @@ features = ["opaque_server", "opaque_client", "sea_orm"]
|
||||
|
||||
[dependencies.lldap_domain]
|
||||
path = "../domain"
|
||||
|
||||
[dependencies.sea-orm]
|
||||
workspace = true
|
||||
features = ["macros"]
|
||||
|
||||
[dependencies.serde]
|
||||
workspace = true
|
||||
|
||||
[dependencies.uuid]
|
||||
features = ["v1", "v3"]
|
||||
version = "1"
|
||||
|
||||
+15
-43
@@ -15,51 +15,23 @@ rust-version.workspace = true
|
||||
test = []
|
||||
|
||||
[dependencies]
|
||||
anyhow = "*"
|
||||
base64 = "0.21"
|
||||
bincode = "1.3"
|
||||
itertools = "0.10"
|
||||
juniper = "0.15"
|
||||
serde_bytes = "0.11"
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1"
|
||||
|
||||
[dependencies.chrono]
|
||||
features = ["serde"]
|
||||
version = "*"
|
||||
|
||||
[dependencies.derive_more]
|
||||
features = ["debug", "display", "from", "from_str"]
|
||||
default-features = false
|
||||
version = "1"
|
||||
|
||||
[dependencies.image]
|
||||
features = ["jpeg"]
|
||||
default-features = false
|
||||
version = "0.24"
|
||||
anyhow = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
bincode = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
derive_more = { workspace = true }
|
||||
image = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
juniper = { workspace = true }
|
||||
sea-orm = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_bytes = { workspace = true }
|
||||
strum = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
|
||||
[dependencies.lldap_auth]
|
||||
path = "../auth"
|
||||
features = ["opaque_server", "opaque_client", "sea_orm"]
|
||||
|
||||
[dependencies.sea-orm]
|
||||
workspace = true
|
||||
features = [
|
||||
"macros",
|
||||
"with-chrono",
|
||||
"with-uuid",
|
||||
"sqlx-all",
|
||||
"runtime-actix-rustls",
|
||||
]
|
||||
|
||||
[dependencies.serde]
|
||||
workspace = true
|
||||
|
||||
[dependencies.strum]
|
||||
features = ["derive"]
|
||||
version = "0.25"
|
||||
|
||||
[dependencies.uuid]
|
||||
features = ["v1", "v3"]
|
||||
version = "1"
|
||||
[dev-dependencies]
|
||||
pretty_assertions = { workspace = true }
|
||||
|
||||
@@ -333,7 +333,7 @@ impl TryFrom<&[u8]> for JpegPhoto {
|
||||
return Ok(JpegPhoto::null());
|
||||
}
|
||||
// Confirm that it's a valid Jpeg, then store only the bytes.
|
||||
image::io::Reader::with_format(std::io::Cursor::new(bytes), image::ImageFormat::Jpeg)
|
||||
image::ImageReader::with_format(std::io::Cursor::new(bytes), image::ImageFormat::Jpeg)
|
||||
.decode()?;
|
||||
Ok(JpegPhoto(bytes.to_vec()))
|
||||
}
|
||||
@@ -346,7 +346,7 @@ impl TryFrom<Vec<u8>> for JpegPhoto {
|
||||
return Ok(JpegPhoto::null());
|
||||
}
|
||||
// Confirm that it's a valid Jpeg, then store only the bytes.
|
||||
image::io::Reader::with_format(
|
||||
image::ImageReader::with_format(
|
||||
std::io::Cursor::new(bytes.as_slice()),
|
||||
image::ImageFormat::Jpeg,
|
||||
)
|
||||
@@ -397,7 +397,7 @@ impl JpegPhoto {
|
||||
|
||||
#[cfg(any(feature = "test", test))]
|
||||
pub fn for_tests() -> Self {
|
||||
use image::{ImageOutputFormat, Rgb, RgbImage};
|
||||
use image::{ImageFormat, Rgb, RgbImage};
|
||||
let img = RgbImage::from_fn(32, 32, |x, y| {
|
||||
if (x + y) % 2 == 0 {
|
||||
Rgb([0, 0, 0])
|
||||
@@ -406,11 +406,8 @@ impl JpegPhoto {
|
||||
}
|
||||
});
|
||||
let mut bytes: Vec<u8> = Vec::new();
|
||||
img.write_to(
|
||||
&mut std::io::Cursor::new(&mut bytes),
|
||||
ImageOutputFormat::Jpeg(0),
|
||||
)
|
||||
.unwrap();
|
||||
img.write_to(&mut std::io::Cursor::new(&mut bytes), ImageFormat::Jpeg)
|
||||
.unwrap();
|
||||
Self(bytes)
|
||||
}
|
||||
}
|
||||
@@ -688,7 +685,7 @@ mod tests {
|
||||
);
|
||||
assert_eq!(
|
||||
&format!("{:?}", Serialized::from(&JpegPhoto::for_tests())),
|
||||
"Serialized(\"hash: 0xB947C77A16F3C3BD\")"
|
||||
"Serialized(\"hash: 0xBB3017828B2F3DEF\")"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@ license.workspace = true
|
||||
repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies.serde]
|
||||
workspace = true
|
||||
[dependencies]
|
||||
serde = { workspace = true }
|
||||
|
||||
@@ -10,15 +10,14 @@ repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
anyhow = "*"
|
||||
juniper = "0.15"
|
||||
serde_json = "1"
|
||||
tracing = "*"
|
||||
urlencoding = "2"
|
||||
|
||||
[dependencies.chrono]
|
||||
features = ["serde"]
|
||||
version = "*"
|
||||
anyhow = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
juniper = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
urlencoding = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
|
||||
[dependencies.lldap_access_control]
|
||||
path = "../access-control"
|
||||
@@ -45,16 +44,10 @@ path = "../sql-backend-handler"
|
||||
[dependencies.lldap_validation]
|
||||
path = "../validation"
|
||||
|
||||
[dependencies.serde]
|
||||
workspace = true
|
||||
|
||||
[dependencies.uuid]
|
||||
features = ["v1", "v3"]
|
||||
version = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
mockall = "0.11.4"
|
||||
pretty_assertions = "1"
|
||||
mockall = { workspace = true }
|
||||
pretty_assertions = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
||||
#[dev-dependencies.lldap_auth]
|
||||
#path = "../auth"
|
||||
@@ -70,7 +63,3 @@ path = "../test-utils"
|
||||
#[dev-dependencies.lldap_sql_backend_handler]
|
||||
#path = "../sql-backend-handler"
|
||||
#features = ["test"]
|
||||
|
||||
[dev-dependencies.tokio]
|
||||
features = ["full"]
|
||||
version = "1.25"
|
||||
|
||||
+12
-22
@@ -10,27 +10,19 @@ repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
anyhow = "*"
|
||||
ldap3_proto = "0.6.0"
|
||||
tracing = "*"
|
||||
itertools = "0.10"
|
||||
anyhow = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
|
||||
[dependencies.derive_more]
|
||||
features = ["from"]
|
||||
default-features = false
|
||||
version = "1"
|
||||
derive_more = { workspace = true }
|
||||
|
||||
[dependencies.chrono]
|
||||
features = ["serde"]
|
||||
version = "*"
|
||||
chrono = { workspace = true }
|
||||
|
||||
[dependencies.rand]
|
||||
features = ["small_rng", "getrandom"]
|
||||
version = "0.8"
|
||||
rand = { workspace = true }
|
||||
|
||||
[dependencies.uuid]
|
||||
version = "1"
|
||||
features = ["v1", "v3"]
|
||||
uuid = { workspace = true }
|
||||
|
||||
ldap3_proto = { workspace = true }
|
||||
|
||||
[dependencies.lldap_access_control]
|
||||
path = "../access-control"
|
||||
@@ -55,12 +47,10 @@ path = "../opaque-handler"
|
||||
path = "../test-utils"
|
||||
|
||||
[dev-dependencies]
|
||||
mockall = "0.11.4"
|
||||
pretty_assertions = "1"
|
||||
mockall = { workspace = true }
|
||||
pretty_assertions = { workspace = true }
|
||||
|
||||
[dev-dependencies.tokio]
|
||||
features = ["full"]
|
||||
version = "1.25"
|
||||
tokio = { workspace = true }
|
||||
|
||||
[dev-dependencies.lldap_domain]
|
||||
path = "../domain"
|
||||
|
||||
@@ -13,7 +13,7 @@ rust-version.workspace = true
|
||||
test = []
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1"
|
||||
async-trait = { workspace = true }
|
||||
|
||||
[dependencies.lldap_auth]
|
||||
path = "../auth"
|
||||
@@ -26,4 +26,4 @@ path = "../domain"
|
||||
path = "../domain-model"
|
||||
|
||||
[dev-dependencies]
|
||||
mockall = "0.11.4"
|
||||
mockall = { workspace = true }
|
||||
|
||||
@@ -13,44 +13,30 @@ rust-version.workspace = true
|
||||
test = []
|
||||
|
||||
[dependencies]
|
||||
anyhow = "*"
|
||||
async-trait = "0.1"
|
||||
base64 = "0.21"
|
||||
bincode = "1.3"
|
||||
itertools = "0.10"
|
||||
ldap3_proto = "0.6.0"
|
||||
orion = "0.17"
|
||||
serde_json = "1"
|
||||
tracing = "*"
|
||||
anyhow = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
orion = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
[dependencies.chrono]
|
||||
features = ["serde"]
|
||||
version = "*"
|
||||
bincode = { workspace = true }
|
||||
|
||||
[dependencies.rand]
|
||||
features = ["small_rng", "getrandom"]
|
||||
version = "0.8"
|
||||
base64 = { workspace = true }
|
||||
|
||||
[dependencies.sea-orm]
|
||||
workspace = true
|
||||
features = [
|
||||
"macros",
|
||||
"with-chrono",
|
||||
"with-uuid",
|
||||
"sqlx-all",
|
||||
"runtime-actix-rustls",
|
||||
]
|
||||
chrono = { workspace = true }
|
||||
|
||||
[dependencies.secstr]
|
||||
features = ["serde"]
|
||||
version = "*"
|
||||
rand = { workspace = true }
|
||||
|
||||
[dependencies.serde]
|
||||
workspace = true
|
||||
sea-orm = { workspace = true }
|
||||
|
||||
[dependencies.uuid]
|
||||
version = "1"
|
||||
features = ["v1", "v3"]
|
||||
secstr = { workspace = true }
|
||||
|
||||
serde = { workspace = true }
|
||||
|
||||
uuid = { workspace = true }
|
||||
|
||||
ldap3_proto = { workspace = true }
|
||||
|
||||
[dependencies.lldap_access_control]
|
||||
path = "../access-control"
|
||||
@@ -79,14 +65,10 @@ features = ["test"]
|
||||
path = "../test-utils"
|
||||
|
||||
[dev-dependencies]
|
||||
log = "*"
|
||||
mockall = "0.11.4"
|
||||
pretty_assertions = "1"
|
||||
log = { workspace = true }
|
||||
mockall = { workspace = true }
|
||||
pretty_assertions = { workspace = true }
|
||||
|
||||
[dev-dependencies.tokio]
|
||||
features = ["full"]
|
||||
version = "1.25"
|
||||
tokio = { workspace = true }
|
||||
|
||||
[dev-dependencies.tracing-subscriber]
|
||||
version = "0.3"
|
||||
features = ["env-filter", "tracing-log"]
|
||||
tracing-subscriber = { workspace = true }
|
||||
|
||||
@@ -536,7 +536,7 @@ See https://github.com/lldap/lldap/blob/main/docs/migration_guides/v0.5.md for d
|
||||
Conflicting emails:
|
||||
"#,
|
||||
);
|
||||
for (email, users) in &transaction
|
||||
let duplicate_users = transaction
|
||||
.query_all(
|
||||
builder.build(
|
||||
Query::select()
|
||||
@@ -568,9 +568,8 @@ Conflicting emails:
|
||||
row.try_get::<String>("", &Users::Email.to_string())
|
||||
.unwrap(),
|
||||
)
|
||||
})
|
||||
.group_by(|(_user, email)| email.to_owned())
|
||||
{
|
||||
});
|
||||
for (email, users) in &duplicate_users.chunk_by(|(_user, email)| email.to_owned()) {
|
||||
warn!("Email: {email}");
|
||||
for (user, _email) in users {
|
||||
warn!(" User: {}", user.as_str());
|
||||
|
||||
@@ -9,14 +9,13 @@ repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1"
|
||||
ldap3_proto = "0.6.0"
|
||||
mockall = "0.11.4"
|
||||
tracing = "*"
|
||||
async-trait = { workspace = true }
|
||||
mockall = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
[dependencies.uuid]
|
||||
version = "1"
|
||||
features = ["v1", "v3"]
|
||||
uuid = { workspace = true }
|
||||
|
||||
ldap3_proto = { workspace = true }
|
||||
|
||||
[dependencies.lldap_access_control]
|
||||
path = "../access-control"
|
||||
|
||||
Reference in New Issue
Block a user