From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 5FF129B7AA for ; Thu, 25 May 2023 11:52:40 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3CE0729065 for ; Thu, 25 May 2023 11:52:40 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 25 May 2023 11:52:39 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id D2134470BC for ; Thu, 25 May 2023 11:52:38 +0200 (CEST) Date: Thu, 25 May 2023 11:52:37 +0200 From: Christoph Heiss To: Stefan Sterz Cc: pve-devel@lists.proxmox.com Message-ID: <20230525095237.5cswg3n2f5szmems@maui.proxmox.com> References: <20230517133931.148634-1-s.sterz@proxmox.com> <20230523065850.3hhphl2e4p7awvaf@maui.proxmox.com> <02972932-cf42-cbc1-870d-301ed9ff43b9@proxmox.com> <20230523101209.z6jby3tiv7n4r7vt@maui.proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SPAM-LEVEL: Spam detection results: 0 AWL -0.083 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 T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [PATCH access-control] ldap: fix ldap distinguished names regex X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2023 09:52:40 -0000 On Tue, May 23, 2023 at 02:17:18PM +0200, Stefan Sterz wrote: > On 23.05.23 12:12, Christoph Heiss wrote: > > On Tue, May 23, 2023 at 10:56:24AM +0200, Stefan Sterz wrote: > > [..] > > yeah that would probably be best, as it's also closer to what the user > wants (a working ldap setup) than either what the regex or `Net::LDAP` > can do (making sure that the dn conforms to spec). since, my knowledge > about ldap is fairly shallow, im not sure how this would work in terms > of timeouts etc. Looking at the docs, the timeout when connecting to the server can be set. Other than that, trying a bind using the given DN/password should pose no problems. > > another point that comes to mind is that lukas reminded me that the same > regex is used in pbs. i haven't yet looked at that, but we probably want > to make sure that both implementations work as similarly as possible. Good point. Haven't looked at the PBS side at all yet, but I guess we probably don't have something similar to canonical_dn() there? But in any case, as long as we keep the same overall approach (lax sanity check, then try connecting to the server and bind), it should be pretty feel the same to the user. > [..] > yeah i agree, we should probably still keep the tests for the lax sanity > check, just in case. Definitvely, more tests are always good. > i'll take a look at the pbs side. if you want to take this over, feel > free to, just give me a heads-up. Great! And sure, I'll take over the PVE side of things.