From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 8DF271FF140 for ; Fri, 24 Apr 2026 18:53:36 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 953181DE57; Fri, 24 Apr 2026 18:53:35 +0200 (CEST) From: Thomas Lamprecht To: pbs-devel@lists.proxmox.com, Manuel Federanko Subject: applied: [PATCH proxmox-backup v2] acme: partially fix #6372: scale certificate renewal checks by lifetime Date: Fri, 24 Apr 2026 18:49:16 +0200 Message-ID: <177704915730.3062357.10095633763040460247.b4-ty@b4> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260423134607.105229-2-m.federanko@proxmox.com> References: <20260423134607.105229-2-m.federanko@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777049488919 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.002 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 Message-ID-Hash: T3YMKLDSV2WV2HFQ3O5OAK5BQ4RPAU4R X-Message-ID-Hash: T3YMKLDSV2WV2HFQ3O5OAK5BQ4RPAU4R X-MailFrom: t.lamprecht@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 23 Apr 2026 15:46:08 +0200, Manuel Federanko wrote: > Start renewing a certificate once 2/3 or 1/2 (for short-lived > certificates) of its total lifetime have passed, instead of the > hardcoded 30 days. This stays consistent with many certificates, which > are valid for 90 days and is recommended by letsencrypt [1]. > > The update service runs daily, impose a 3 day minimum remaining lifetime > to still be able to handle transient failures for certificate renewals. > > [...] Just again for the record: v1 was already applied when v2 landed, to avoid dropping v2, I pulled its improvements in as follow-ups on top of v1, so this should be basically (semantically) applied now too. Follow-ups on top of v1 I pushed: - 3ee7129c6 acme: certificates: update stale 30-day doc comments - 034652107 acme: certificates: warn on fallback to 30-day renewal lead time - cec290d10 acme: certificates: parse certificate once per renewal check - 3d819b132 acme: certificates: factor out SECONDS_PER_DAY constant Ported from v2: - 74bc33071 acme: certificates: use 1/2 lifetime lead for short-lived certs I kept the 3-day floor inside cert_renew_lead_time rather than moving it to the daily-update caller as you did - behavior is equivalent for every lifetime, and it keeps the policy in one place with fewer cert reads per cycle. For the PDM port: the same improvements apply there too. One option would be to add a renewal_lead_time(&self) -> i64 helper on CertificateInfo in proxmox-acme-api::certificate_helpers, use it from PDM, and then switch PBS over to it here as well - single source of truth for both products.