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 95A4292A92 for ; Wed, 22 Mar 2023 16:41:38 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 73AD428B3B for ; Wed, 22 Mar 2023 16:41:08 +0100 (CET) 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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 22 Mar 2023 16:41:06 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 6EAA945E15 for ; Wed, 22 Mar 2023 16:41:06 +0100 (CET) Message-ID: Date: Wed, 22 Mar 2023 16:41:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US To: pve-devel@lists.proxmox.com References: <20230314150839.248059-1-m.carrara@proxmox.com> <20230314150839.248059-2-m.carrara@proxmox.com> From: Max Carrara In-Reply-To: <20230314150839.248059-2-m.carrara@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.033 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: Re: [pve-devel] [PATCH v3 manager 1/3] fix #4552: certhelpers: check if custom cert and key match on change 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: Wed, 22 Mar 2023 15:41:38 -0000 On 3/14/23 16:08, Max Carrara wrote: > It is now checked whether the new custom SSL certificate actually > matches the provided or existing custom key. > > Also, the new custom certificate and key pair is now validated > *before* it is used or replaced with the existing pair. Safety copies > are still made; if a pair is currently in use, it is therefore left > untouched until the new one is valid. > > Signed-off-by: Max Carrara > --- > NOTE: This patch requies a version bump+upload of pve-common. > Ping - I've been testing the most recent ISO of PVE 7.4 and I think this patch should be included in the release, as it's now technically even easier to encounter bug #4552[0]. Before the fix for the optional cert upload in the UI was applied (thanks, btw!) the user was forced to provide both key *and* cert, which is not necessary anymore now if a key/cert pair was already uploaded some time before. So, it's now easier to lock oneself out of their own PVE instance, imo. Additionally, if the host with the invalid key/cert pair is in a cluster, it cannot be accessed via another host in the same cluster either - it's displayed as online, but *no* actions in the UI can be performed anymore. I'm not sure what other implications a key/cert mismatch has, but since it requires the user to log in via SSH, manually delete the mismatching key/cert pair, and then running `pvecm updatecerts -f`. Therefore I feel like this is rather important to include in PVE 7.4, so if there are any open questions/issues with this patch, I'd gladly answer/fix/update/etc. anything if necessary. [0] https://bugzilla.proxmox.com/show_bug.cgi?id=4552