From 8ac9870b5376c78e74e99772b59fa57214de1709 Mon Sep 17 00:00:00 2001 From: David Mulder Date: Tue, 17 Dec 2024 11:56:16 -0700 Subject: [PATCH] Update libhimmelblau version This implements a fix for Graph startup. Now a network connection isn't necessary at startup the first time. Signed-off-by: David Mulder --- Cargo.toml | 2 +- src/common/src/idprovider/himmelblau.rs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cc1cc67..e2ca322 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ tracing-subscriber = "^0.3.17" tracing = "^0.1.37" himmelblau_unix_common = { path = "src/common" } kanidm_unix_common = { path = "src/glue" } -libhimmelblau = { version = "0.4.4" } +libhimmelblau = { version = "0.4.6" } clap = { version = "^4.5", features = ["derive", "env"] } clap_complete = "^4.4.1" reqwest = { version = "^0.12.2", features = ["json"] } diff --git a/src/common/src/idprovider/himmelblau.rs b/src/common/src/idprovider/himmelblau.rs index eb071be..bfc7035 100644 --- a/src/common/src/idprovider/himmelblau.rs +++ b/src/common/src/idprovider/himmelblau.rs @@ -129,8 +129,11 @@ impl HimmelblauMultiProvider { continue; } }; - let authority_host = graph.authority_host(); - let tenant_id = graph.tenant_id(); + let authority_host = graph + .authority_host() + .await + .map_err(|e| anyhow!("{:?}", e))?; + let tenant_id = graph.tenant_id().await.map_err(|e| anyhow!("{:?}", e))?; idmap_lk .add_gen_domain(&domain, &tenant_id, range) .map_err(|e| anyhow!("{:?}", e))?; @@ -1617,7 +1620,7 @@ impl HimmelblauProvider { "Setting domain {} config authority_host to {}", self.domain, &self.authority_host ); - let graph_url = self.graph.graph_url(); + let graph_url = self.graph.graph_url().await?; config.set(&self.domain, "graph_url", &graph_url); debug!( "Setting domain {} config graph_url to {}",