[pdm-devel] [PATCH datacenter-manager v2 1/6] config: add domain config plugins for ldap and ad realms

Shannon Sterz s.sterz at proxmox.com
Mon Sep 22 17:05:14 CEST 2025


Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
---
 Cargo.toml                    |  1 +
 lib/pdm-config/Cargo.toml     |  1 +
 lib/pdm-config/src/domains.rs | 15 +++++++++++++++
 3 files changed, 17 insertions(+)

diff --git a/Cargo.toml b/Cargo.toml
index 3146e7d..979069f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,6 +43,7 @@ proxmox-daemon = "1"
 proxmox-http = { version = "1", features = [ "client", "http-helpers", "websocket" ] } # see below
 proxmox-human-byte = "1"
 proxmox-io = "1.0.1" # tools and client use "tokio" feature
+proxmox-ldap = { version = "1.0", features = ["sync"] }
 proxmox-lang = "1.1"
 proxmox-log = "1"
 proxmox-login = "1"
diff --git a/lib/pdm-config/Cargo.toml b/lib/pdm-config/Cargo.toml
index 07f3a80..d39c2ad 100644
--- a/lib/pdm-config/Cargo.toml
+++ b/lib/pdm-config/Cargo.toml
@@ -15,6 +15,7 @@ serde.workspace = true
 
 proxmox-config-digest = { workspace = true, features = [ "openssl" ] }
 proxmox-http = { workspace = true, features = [ "http-helpers" ] }
+proxmox-ldap = { workspace = true, features = [ "types" ]}
 proxmox-product-config.workspace = true
 proxmox-schema.workspace = true
 proxmox-section-config.workspace = true
diff --git a/lib/pdm-config/src/domains.rs b/lib/pdm-config/src/domains.rs
index 11a0c82..d1eac54 100644
--- a/lib/pdm-config/src/domains.rs
+++ b/lib/pdm-config/src/domains.rs
@@ -3,6 +3,7 @@ use std::sync::LazyLock;
 
 use anyhow::Error;
 
+use proxmox_ldap::types::{AdRealmConfig, LdapRealmConfig};
 use proxmox_schema::{ApiType, Schema};
 use proxmox_section_config::{SectionConfig, SectionConfigData, SectionConfigPlugin};
 
@@ -27,6 +28,20 @@ fn init() -> SectionConfig {
     let mut config = SectionConfig::new(&REALM_ID_SCHEMA);
     config.register_plugin(plugin);
 
+    let ldap_plugin = SectionConfigPlugin::new(
+        "ldap".to_string(),
+        Some("realm".to_string()),
+        LdapRealmConfig::API_SCHEMA.unwrap_object_schema(),
+    );
+    config.register_plugin(ldap_plugin);
+
+    let ad_plugin = SectionConfigPlugin::new(
+        "ad".to_string(),
+        Some("realm".to_string()),
+        AdRealmConfig::API_SCHEMA.unwrap_object_schema(),
+    );
+    config.register_plugin(ad_plugin);
+
     config
 }
 
-- 
2.47.3





More information about the pdm-devel mailing list