mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
Adding max_ber_size option in config for ldap sync (#2416)
This commit is contained in:
parent
cf87993a1c
commit
e02e0501eb
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -3523,9 +3523,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ldap3_client"
|
name = "ldap3_client"
|
||||||
version = "0.4.2"
|
version = "0.4.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bec3fe7dd2cd58ea17bf49e794dd89b7773bff180300fc8667a8ca8f38e4aed0"
|
checksum = "4f294d8b0c3a0906caca55d2004f1192e174b895afa3f0f177ead05f314544d2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.21.5",
|
"base64 0.21.5",
|
||||||
"base64urlsafedata",
|
"base64urlsafedata",
|
||||||
|
@ -3543,9 +3543,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ldap3_proto"
|
name = "ldap3_proto"
|
||||||
version = "0.4.2"
|
version = "0.4.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4598dd32dbd16d4fd06a1eb423bf569563d7c65e808ceae5ef3c12179134bc36"
|
checksum = "a29eca0a9fef365d6d376a1b262e269a17b1c8c6de2cee76618642cd3c923506"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.21.5",
|
"base64 0.21.5",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
|
@ -148,8 +148,8 @@ js-sys = "^0.3.65"
|
||||||
kanidmd_web_ui_shared = { path = "./server/web_ui/shared" }
|
kanidmd_web_ui_shared = { path = "./server/web_ui/shared" }
|
||||||
# REMOVE this
|
# REMOVE this
|
||||||
lazy_static = "^1.4.0"
|
lazy_static = "^1.4.0"
|
||||||
ldap3_client = "^0.4.2"
|
ldap3_client = "^0.4.3"
|
||||||
ldap3_proto = { version = "^0.4.2", features = ["serde"] }
|
ldap3_proto = { version = "^0.4.3", features = ["serde"] }
|
||||||
|
|
||||||
libc = "^0.2.150"
|
libc = "^0.2.150"
|
||||||
libnss = "^0.4.0"
|
libnss = "^0.4.0"
|
||||||
|
|
|
@ -105,6 +105,9 @@ pub struct Config {
|
||||||
|
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub entry_map: BTreeMap<Uuid, EntryConfig>,
|
pub entry_map: BTreeMap<Uuid, EntryConfig>,
|
||||||
|
|
||||||
|
/// Maximum LDAP message size (in kilobytes)
|
||||||
|
pub max_ber_size: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Default, Clone)]
|
#[derive(Debug, Deserialize, Default, Clone)]
|
||||||
|
|
|
@ -268,6 +268,7 @@ async fn run_sync(
|
||||||
// Preflight check.
|
// Preflight check.
|
||||||
// * can we connect to ldap?
|
// * can we connect to ldap?
|
||||||
let mut ldap_client = match LdapClientBuilder::new(&sync_config.ldap_uri)
|
let mut ldap_client = match LdapClientBuilder::new(&sync_config.ldap_uri)
|
||||||
|
.max_ber_size(sync_config.max_ber_size)
|
||||||
.add_tls_ca(&sync_config.ldap_ca)
|
.add_tls_ca(&sync_config.ldap_ca)
|
||||||
.build()
|
.build()
|
||||||
.await
|
.await
|
||||||
|
|
Loading…
Reference in a new issue