From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 44A2B1FF0B7 for ; Fri, 13 Nov 2026 04:33:40 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1603521D02; Fri, 13 Nov 2026 04:22:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfssl-com.20260707.gappssmtp.com; s=20260707; t=1794539203; x=1795144003; darn=lists.proxmox.com; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=PUb0TxGVs/WJ/93TKhcgRAy9wSAjsI8BoSW0K43W6Ik=; b=MrjyEhgzaWRSn22nHzbP8p+1Iy+r+7LY3e8zuRJNxvjizgOTCX1MIUhoncCT1NlezH nezXoHcWqM6EdMMej74cvo+cUyIP2E4dt4EVxTLtkswo5OuHub5gjNg+yz7NNQKeuTbW eImOg7fET4ukZOPSLfr4oD4PhFS168S9uiHZ7AwZCJBXE0hHVOlsQ0JDP4GdIpsYIm7d v3rP2BgZm0L7srtPhPmaTxTxaBdf0X3zd2RtEuzB5rmDB8rp7OPAgmYhmur8eeyf3l5W TzWc7JH5Wwxlpe4AwAlskLzB+36y5ruVj+QzPd6FHYEim7InkUhAm6CSpBZPuv/seSva XQOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794539203; x=1795144003; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=PUb0TxGVs/WJ/93TKhcgRAy9wSAjsI8BoSW0K43W6Ik=; b=E7s++ckWX7paV6BOyULQXhN3O435bdAyOyvlKXj42BmrwduII4KOJ/8QqEEYXErigj ZKkcU9b2fcmpbqTkgY78hB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uXXXGk361egr2egtzqS G/AM7gYU2o/3ES44y4iZP01w14TuvIx+naon7awStT+tMB2H1iI+2C0bPMODZCPESD20lNyO2y5 r6FMXreMmeQEijNvXs8znmpsU8xpt3ehafYKbIMoUHyxhoNyD2qIcvf00L+HLcL90c2GL1Bg05N 1TjkD08Sw== X-Received: by 2002:a05:6820:238b:b0:6cd:3fdc:2669 with SMTP id 006d021491bc7-71ab5277c34mr507444eaf.42.1794539202743; Thu, 12 Nov 2026 19:06:42 -0800 (PST) From: Mark Atwood To: pve-devel@lists.proxmox.com Subject: [PATCH common v2 0/2] ticket: sign RSA tickets with SHA-256, opt-in Date: Fri, 13 Nov 2026 03:06:37 +0000 Message-ID: <20261113030639.3514-1-mark@wolfssl.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DMARC_PASS -0.1 DMARC pass policy RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust 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: 5BJRMLNWBKQKWOKTQDSRRGJ6YD6EBSYF X-Message-ID-Hash: 5BJRMLNWBKQKWOKTQDSRRGJ6YD6EBSYF X-MailFrom: mark@wolfssl.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 VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Let PVE::Ticket verify RSA tickets signed with SHA-256, and optionally sign with it, so that PVE and PMG work with crypto providers that refuse SHA-1 signatures, e.g. FIPS ones. Signing with SHA-256 stays opt-in: callers pass a new, optional hash parameter, and the default is still SHA-1. This also affects Proxmox Mail Gateway, which uses PVE::Ticket for its tickets. The pve-common patches state it in their commit messages. SHA-256 signing stays off there unless PMG passes the new parameter. Apply order across the repositories, all three are part of this series: 1. pve-common (2 patches) 2. pve-cluster (adds the datacenter.cfg option) 3. pve-access-control (reads the option and signs with it) pve-common and pve-cluster are independent of each other. pve-access-control needs both, but is harmless without them: it then keeps signing with SHA-1. Mixed clusters: nodes without pve-common 1/2 reject SHA-256 tickets, so the option must only be set to 'sha256' once every node has that patch. The option description says so. I did not add an automatic check against the node versions (the new helpers in pve-cluster, 679cf2c, would allow one), as it needs the release number that will contain 1/2. Happy to add one in pve-manager's datacenter options update once that number is known. Tested on a PVE 9.2 node with wolfProvider (FIPS) set up for pvedaemon: with the option unset, logins fail as before, and with 'sha256', API and web logins work and the tickets verify with SHA-256 only. Changes since v1: - rebased onto current master, which has the new ticket tests (0163eaf, 0f928d5, 0b3129a); the v1 patches did not apply any more - tests are now part of the existing test/ticket_test.pl instead of a new test file - 1/2: added the TODO to remove the SHA-1 fallback once SHA-256 signed tickets are the default across PMG and PVE for at least one major release - 1/2: $rsa_pub is now reset unconditionally to the library default (SHA-1) after verifying, instead of keeping whichever hash matched; the commit message explains why this was preferred over documenting it - 1/2: the eval no longer swallows all errors; it only ignores the refusal of SHA-1 (wolfProvider's "RSA.xs:1007: OpenSSL error: (null)", seen when signing) and warns about anything else - 1/2: added a test that verification succeeds without $noerr; the tests use tickets signed with the openssl command line as the reference - 1/2, 2/2: the commit messages mention PMG - 2/2: SHA-256 signing is opt-in through an optional parameter of assemble_rsa_ticket() with unchanged default, instead of switching to SHA-256 and using the PVE_TICKET_SIGN_SHA1 environment variable; the option itself is in the pve-cluster and pve-access-control patches v1: This is sent as a new thread, as is usual for a new version of a series. Thanks to Shannon Sterz for the review of v1. Mark Atwood (2): ticket: accept RSA tickets signed with SHA-256 ticket: allow signing RSA tickets with SHA-256 src/PVE/Ticket.pm | 49 +++++++++++++++++- test/ticket_test.pl | 123 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 2 deletions(-) base-commit: 7193a0019937de6da53a3078e67f524fabcbf91a