From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 788541FF16F for ; Tue, 16 Sep 2025 16:48:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0F84317DA7; Tue, 16 Sep 2025 16:48:36 +0200 (CEST) From: Shannon Sterz To: pdm-devel@lists.proxmox.com Date: Tue, 16 Sep 2025 16:48:23 +0200 Message-ID: <20250916144827.551806-8-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20250916144827.551806-1-s.sterz@proxmox.com> References: <20250916144827.551806-1-s.sterz@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1758034103985 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.049 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH datacenter-manager 1/5] config: add domain config plugins for ldap and ad realms X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Signed-off-by: Shannon Sterz --- 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 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel