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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id AF6BD8F1B for ; Tue, 1 Aug 2023 11:18:10 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8F914C049 for ; Tue, 1 Aug 2023 11:17: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 ; Tue, 1 Aug 2023 11:17: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 53ACA43929 for ; Tue, 1 Aug 2023 11:17:39 +0200 (CEST) Date: Tue, 1 Aug 2023 11:17:38 +0200 From: Christoph Heiss To: Lukas Wagner Cc: Proxmox VE development discussion Message-ID: References: <20230727133341.1009881-1-c.heiss@proxmox.com> <20230727133341.1009881-2-c.heiss@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.046 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 1/2] api: domains: add off-by-default `check-connection` parameter 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: Tue, 01 Aug 2023 09:18:10 -0000 Thanks for the review! On Fri, Jul 28, 2023 at 10:29:26AM +0200, Lukas Wagner wrote: > > On Thu Jul 27, 2023 at 3:33 PM CEST, Christoph Heiss wrote: > > [..] > > I think it would be enough to have the 'check-connection' parameter only for > the API call itself, I wouldn't store it in the domains.cfg configuration > file. > > That would imply that the 'Check configuration' checkbox that you introduce in > the next patch could *always* be ticked, even for old realms. So whenever you > create/update an LDAP/AD realm configuration you have to explicitly tell it > "hey, I do not want the check right now, my LDAP server is down currently". > > My main point in making the check behavior opt-in rather was so that > scripts/API consumers continue to work as before. For the GUI however, it > should be fine to just always check by default, unless the behavior is > explicitly turned off. My thought here was that if you once explicitly turn it off, it should stay off (if that's needed for /some/ reason). But OTOH, making it always opt-out for the GUI definitely makes sense too. I'll give the series a new spin with your suggestions implemented, seems sensible enough to me. Most importantly, we can get rid of the regex in the end :^) > > > + }, > > + 'check-connection' => { > > + description => 'Check bind connection to LDAP server.', > > + type => 'boolean', > > + optional => 1, > > + # TODO: Make it enabled-by-default with PVE 9.0? > ^ This wouldn't be necessary any more. > > + default => 0, > > + }, > > }; > > } >