* [PATCH cluster v2 0/1] datacenter config: add ticket-signature-hash option
@ 2026-11-13 3:06 Mark Atwood
2026-11-13 3:06 ` [PATCH cluster v2 1/1] " Mark Atwood
0 siblings, 1 reply; 7+ messages in thread
From: Mark Atwood @ 2026-11-13 3:06 UTC (permalink / raw)
To: pve-devel
Add a cluster-wide datacenter.cfg option 'ticket-signature-hash' (sha1 or
sha256, default sha1) for the hash of the RSA signature of newly created
authentication tickets. pve-access-control reads it, see that patch. It
exists so that setups where SHA-1 signatures are not acceptable, e.g. FIPS
mode, can enable SHA-256 signed tickets now. Nothing changes by default.
This is the pve-cluster part of the v2 of "ticket: sign RSA tickets with
SHA-256". The pve-common part also affects Proxmox Mail Gateway, which
uses PVE::Ticket; this option does not affect PMG.
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.
Changes since v1: the option is new in v2. v1 switched signing to SHA-256
unconditionally, with an environment variable for the transition. Shannon
asked for opt-in, so FIPS users can enable it now, and a cluster-wide
datacenter.cfg option with default off was chosen. It is a plain enum, as the
hyphenated names of the newer options ('next-id', 'tag-style') suggest, and
leaves room for more hashes. The other v1 review points are in the pve-common
cover letter.
v1: <CALkZksWBSdQa5AsvhmANGAJigcZ7FHPtgRgdu3JsRt9NX6vwSg@mail.gmail.com>
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 (1):
datacenter config: add ticket-signature-hash option
src/PVE/DataCenterConfig.pm | 16 +++++++++++
src/test/Makefile | 6 ++++-
src/test/test_ticket_signature_hash.pl | 37 ++++++++++++++++++++++++++
3 files changed, 58 insertions(+), 1 deletion(-)
create mode 100644 src/test/test_ticket_signature_hash.pl
base-commit: 679cf2c674254f41ddd89cc8e4e17d83c8444ad7
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH cluster v2 1/1] datacenter config: add ticket-signature-hash option
2026-11-13 3:06 [PATCH cluster v2 0/1] datacenter config: add ticket-signature-hash option Mark Atwood
@ 2026-11-13 3:06 ` Mark Atwood
2026-11-17 16:05 ` Shannon Sterz
2026-11-18 4:14 ` Thomas Lamprecht
0 siblings, 2 replies; 7+ messages in thread
From: Mark Atwood @ 2026-11-13 3:06 UTC (permalink / raw)
To: pve-devel
Add a cluster-wide option to select the hash algorithm for the RSA
signature of newly created authentication tickets, either 'sha1' or
'sha256'. It defaults to 'sha1', the algorithm used so far, so nothing
changes unless it is set explicitly.
This allows running with crypto providers that refuse SHA-1
signatures, such as FIPS ones, where creating tickets does not work
otherwise. Consumers, i.e. pve-access-control, read the option when
creating tickets. Verification accepts both algorithms independent of
the option, once the nodes have the changes to PVE::Ticket in
pve-common. This affects Proxmox Mail Gateway only through that
module, it does not read this option.
The option applies to the whole cluster, but nodes that do not know
how to verify SHA-256 reject such tickets. So it must only be set to
'sha256' once all nodes have been upgraded, which the description
states. Enforcing this by checking the node versions is left for
later, as it needs to know the release that includes the verification
change.
The tests check that both values and only those are accepted, and that
the option is written back.
Signed-off-by: Mark Atwood <mark@wolfssl.com>
---
src/PVE/DataCenterConfig.pm | 16 +++++++++++
src/test/Makefile | 6 ++++-
src/test/test_ticket_signature_hash.pl | 37 ++++++++++++++++++++++++++
3 files changed, 58 insertions(+), 1 deletion(-)
create mode 100644 src/test/test_ticket_signature_hash.pl
diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index 004122e..6c96bbb 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -551,6 +551,22 @@ my $datacenter_schema = {
description => "The location of the cluster.",
optional => 1,
},
+ 'ticket-signature-hash' => {
+ optional => 1,
+ type => 'string',
+ enum => ['sha1', 'sha256'],
+ default => 'sha1',
+ description => "Hash algorithm that is used for the RSA signature of newly created"
+ . " authentication tickets. Use 'sha256' if SHA-1 signatures are not acceptable,"
+ . " for example when running in FIPS mode.",
+ verbose_description => "Hash algorithm that is used for the RSA signature of newly"
+ . " created authentication tickets. All nodes accept tickets signed with either"
+ . " algorithm, but only nodes with SHA-256 support do so.\n\nThis setting is"
+ . " cluster-wide, so only switch to 'sha256' once all nodes in the cluster, and"
+ . " all other products that share the ticket format, have been upgraded to a"
+ . " version that supports it. Nodes that do not support it reject tickets"
+ . " signed with SHA-256, which breaks logins and cross-node operations.",
+ },
},
};
diff --git a/src/test/Makefile b/src/test/Makefile
index cdd37d0..0c95290 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -4,7 +4,7 @@ cpgtest: cpgtest.c
gcc -Wall cpgtest.c $(shell pkg-config --cflags --libs libcpg libqb) -o cpgtest
.PHONY: check install clean distclean
-check: corosync-parser-test test-mac-prefix
+check: corosync-parser-test test-mac-prefix test-ticket-signature-hash
.PHONY: corosync-parser-test
corosync-parser-test:
@@ -14,5 +14,9 @@ corosync-parser-test:
test-mac-prefix:
perl test_mac_prefix.pl
+.PHONY: test-ticket-signature-hash
+test-ticket-signature-hash:
+ perl test_ticket_signature_hash.pl
+
distclean: clean
clean:
diff --git a/src/test/test_ticket_signature_hash.pl b/src/test/test_ticket_signature_hash.pl
new file mode 100644
index 0000000..a0d47a6
--- /dev/null
+++ b/src/test/test_ticket_signature_hash.pl
@@ -0,0 +1,37 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+use lib ('.', '..');
+
+use PVE::DataCenterConfig;
+
+my $parse = sub {
+ my ($raw) = @_;
+ return PVE::DataCenterConfig::parse_datacenter_config('datacenter.cfg', $raw);
+};
+
+is($parse->("keyboard: de\n")->{'ticket-signature-hash'}, undef, "unset by default");
+
+for my $hash ('sha1', 'sha256') {
+ my $conf = $parse->("ticket-signature-hash: $hash\n");
+ is($conf->{'ticket-signature-hash'}, $hash, "'$hash' is accepted");
+
+ my $written = PVE::DataCenterConfig::write_datacenter_config('datacenter.cfg', $conf);
+ like($written, qr/^ticket-signature-hash: \Q$hash\E$/m, "'$hash' is written");
+}
+
+for my $hash ('md5', 'SHA256', 'sha-256', '') {
+ # the parser warns about and drops invalid values instead of dying
+ my @warnings;
+ local $SIG{__WARN__} = sub { push @warnings, @_ };
+ my $conf = $parse->("ticket-signature-hash: $hash\n");
+ is($conf->{'ticket-signature-hash'}, undef, "'$hash' is not accepted");
+ ok(scalar(@warnings), "'$hash' is warned about");
+}
+
+my $schema = PVE::DataCenterConfig::get_datacenter_schema();
+is($schema->{properties}->{'ticket-signature-hash'}->{default}, 'sha1', "default stays SHA-1");
+
+done_testing();
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH cluster v2 1/1] datacenter config: add ticket-signature-hash option
2026-11-13 3:06 ` [PATCH cluster v2 1/1] " Mark Atwood
@ 2026-11-17 16:05 ` Shannon Sterz
2026-11-18 4:14 ` Thomas Lamprecht
1 sibling, 0 replies; 7+ messages in thread
From: Shannon Sterz @ 2026-11-17 16:05 UTC (permalink / raw)
To: Mark Atwood, pve-devel
On Fri Nov 13, 2026 at 4:06 AM CET, Mark Atwood wrote:
> Add a cluster-wide option to select the hash algorithm for the RSA
> signature of newly created authentication tickets, either 'sha1' or
> 'sha256'. It defaults to 'sha1', the algorithm used so far, so nothing
> changes unless it is set explicitly.
>
> This allows running with crypto providers that refuse SHA-1
> signatures, such as FIPS ones, where creating tickets does not work
> otherwise. Consumers, i.e. pve-access-control, read the option when
> creating tickets. Verification accepts both algorithms independent of
> the option, once the nodes have the changes to PVE::Ticket in
> pve-common. This affects Proxmox Mail Gateway only through that
> module, it does not read this option.
>
> The option applies to the whole cluster, but nodes that do not know
> how to verify SHA-256 reject such tickets. So it must only be set to
> 'sha256' once all nodes have been upgraded, which the description
> states. Enforcing this by checking the node versions is left for
> later, as it needs to know the release that includes the verification
> change.
>
> The tests check that both values and only those are accepted, and that
> the option is written back.
>
> Signed-off-by: Mark Atwood <mark@wolfssl.com>
> ---
> src/PVE/DataCenterConfig.pm | 16 +++++++++++
> src/test/Makefile | 6 ++++-
> src/test/test_ticket_signature_hash.pl | 37 ++++++++++++++++++++++++++
> 3 files changed, 58 insertions(+), 1 deletion(-)
> create mode 100644 src/test/test_ticket_signature_hash.pl
>
> diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
> index 004122e..6c96bbb 100644
> --- a/src/PVE/DataCenterConfig.pm
> +++ b/src/PVE/DataCenterConfig.pm
> @@ -551,6 +551,22 @@ my $datacenter_schema = {
> description => "The location of the cluster.",
> optional => 1,
> },
> + 'ticket-signature-hash' => {
> + optional => 1,
> + type => 'string',
> + enum => ['sha1', 'sha256'],
> + default => 'sha1',
> + description => "Hash algorithm that is used for the RSA signature of newly created"
> + . " authentication tickets. Use 'sha256' if SHA-1 signatures are not acceptable,"
> + . " for example when running in FIPS mode.",
> + verbose_description => "Hash algorithm that is used for the RSA signature of newly"
> + . " created authentication tickets. All nodes accept tickets signed with either"
> + . " algorithm, but only nodes with SHA-256 support do so.\n\nThis setting is"
nit: this reads contradictory. maybe "All nodes accept tickets signed
with either algorithm, but tickets signed with SHA-256 require the nodes
to support verify such tickets."
-->8 snip 8<--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH cluster v2 1/1] datacenter config: add ticket-signature-hash option
2026-11-13 3:06 ` [PATCH cluster v2 1/1] " Mark Atwood
2026-11-17 16:05 ` Shannon Sterz
@ 2026-11-18 4:14 ` Thomas Lamprecht
2026-11-18 9:40 ` Shannon Sterz
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Lamprecht @ 2026-11-18 4:14 UTC (permalink / raw)
To: Mark Atwood, pve-devel
Am 13.11.26 um 04:34 schrieb Mark Atwood:
> Add a cluster-wide option to select the hash algorithm for the RSA
> signature of newly created authentication tickets, either 'sha1' or
> 'sha256'. It defaults to 'sha1', the algorithm used so far, so nothing
> changes unless it is set explicitly.
>
> This allows running with crypto providers that refuse SHA-1
> signatures, such as FIPS ones, where creating tickets does not work
> otherwise. Consumers, i.e. pve-access-control, read the option when
> creating tickets. Verification accepts both algorithms independent of
> the option, once the nodes have the changes to PVE::Ticket in
> pve-common. This affects Proxmox Mail Gateway only through that
> module, it does not read this option.
>
> The option applies to the whole cluster, but nodes that do not know
> how to verify SHA-256 reject such tickets. So it must only be set to
> 'sha256' once all nodes have been upgraded, which the description
> states. Enforcing this by checking the node versions is left for
> later, as it needs to know the release that includes the verification
> change.
Any reason to stick with sha1 here? I mean, I have nothing against that
per se, but as alternative we could also just switch over fully and
then only do sha256 signatures?
1. add support for detecting and verifying sha256 now
2. enable it later (or with a cluster-version guard on pve-manager,
which we can use as leave package to transitively depend on new
enough cluster/access-control/common (or wherever this lifes).
Then we would not have to harry that option around and all would benefit
from stronger – albeit the difference being currently practically not
really relevant – signature algo.
I do not want to block your approach here, but it would be a potential
alternative.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH cluster v2 1/1] datacenter config: add ticket-signature-hash option
2026-11-18 4:14 ` Thomas Lamprecht
@ 2026-11-18 9:40 ` Shannon Sterz
2026-11-19 12:38 ` Thomas Lamprecht
0 siblings, 1 reply; 7+ messages in thread
From: Shannon Sterz @ 2026-11-18 9:40 UTC (permalink / raw)
To: Thomas Lamprecht, Mark Atwood, pve-devel
On Wed Nov 18, 2026 at 5:14 AM CET, Thomas Lamprecht wrote:
> Am 13.11.26 um 04:34 schrieb Mark Atwood:
>> Add a cluster-wide option to select the hash algorithm for the RSA
>> signature of newly created authentication tickets, either 'sha1' or
>> 'sha256'. It defaults to 'sha1', the algorithm used so far, so nothing
>> changes unless it is set explicitly.
>>
>> This allows running with crypto providers that refuse SHA-1
>> signatures, such as FIPS ones, where creating tickets does not work
>> otherwise. Consumers, i.e. pve-access-control, read the option when
>> creating tickets. Verification accepts both algorithms independent of
>> the option, once the nodes have the changes to PVE::Ticket in
>> pve-common. This affects Proxmox Mail Gateway only through that
>> module, it does not read this option.
>>
>> The option applies to the whole cluster, but nodes that do not know
>> how to verify SHA-256 reject such tickets. So it must only be set to
>> 'sha256' once all nodes have been upgraded, which the description
>> states. Enforcing this by checking the node versions is left for
>> later, as it needs to know the release that includes the verification
>> change.
>
> Any reason to stick with sha1 here? I mean, I have nothing against that
> per se, but as alternative we could also just switch over fully and
> then only do sha256 signatures?
>
> 1. add support for detecting and verifying sha256 now
> 2. enable it later (or with a cluster-version guard on pve-manager,
> which we can use as leave package to transitively depend on new
> enough cluster/access-control/common (or wherever this lifes).
>
> Then we would not have to harry that option around and all would benefit
> from stronger – albeit the difference being currently practically not
> really relevant – signature algo.
>
> I do not want to block your approach here, but it would be a potential
> alternative.
Hope it is ok to chime in here. This option was probably added on my
suggestion [1]. The version guard you suggest is likely a neater
solution code wise. The intent was to allow users that require FIPS
compliance to switch to SHA-256 sooner than the next major version is
released.
Using the cluster version guard helper [2] would come with one downside:
It als errors when not all nodes are online or the version information
is unreadable. In that case we'd probably want to fall back to SHA-1,
which for FIPS compliant nodes would mean that they can't log in if a
single node goes down. While logging in with TFA is already an issue in
an unquorate state, this would arguably be worse for FIPS users.
So we'd need to keep using SHA-256 at least until a new node joins with
a version that's too old. We could do that with a non-dying variant of
the helper that reads the stale info from pmxcfs as usually version
numbers only go up. However, nodes with an unknown version would remain
an issue. Alternatively we may want to add a fallback to SHA-256 if
signing with SHA-1 fails or allow an override similar to this approach.
The nice thing about this option is that it only depends on the state of
the local node. Even in an unquorate state the cluster config stays
readable as pmxcfs switches to read-only mode.
[1]: https://lore.proxmox.com/all/DMKS80347XID.3KPXPXVUHQ3ZG@proxmox.com/
[2]: https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=168ac114df
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH cluster v2 1/1] datacenter config: add ticket-signature-hash option
2026-11-18 9:40 ` Shannon Sterz
@ 2026-11-19 12:38 ` Thomas Lamprecht
2026-11-19 13:37 ` Shannon Sterz
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Lamprecht @ 2026-11-19 12:38 UTC (permalink / raw)
To: Shannon Sterz, Mark Atwood, pve-devel
Thanks for your input, more than appreciated.
Am 18.11.26 um 10:40 schrieb Shannon Sterz:
> Using the cluster version guard helper [2] would come with one downside:
> It als errors when not all nodes are online or the version information
> is unreadable. In that case we'd probably want to fall back to SHA-1,
> which for FIPS compliant nodes would mean that they can't log in if a
> single node goes down. While logging in with TFA is already an issue in
> an unquorate state, this would arguably be worse for FIPS users.
I mean, FIPS compliance might require quorum to allow login in the
first place? as only with quorum you can ensure that the user config
and its access control lists etc. are up-to-date and the user is allowed
to login. We argued convenience-over-security for the common case, but
for security compliance the latter often should be weighted higher I
think. So this might be actually a feature for FIPS?
But in any case rather orthogonal to this here.
> So we'd need to keep using SHA-256 at least until a new node joins with
> a version that's too old. We could do that with a non-dying variant of
> the helper that reads the stale info from pmxcfs as usually version
> numbers only go up. However, nodes with an unknown version would remain
> an issue. Alternatively we may want to add a fallback to SHA-256 if
> signing with SHA-1 fails or allow an override similar to this approach.
>
> The nice thing about this option is that it only depends on the state of
> the local node. Even in an unquorate state the cluster config stays
> readable as pmxcfs switches to read-only mode.
hmm, using an option like this certainly makes it a bit simpler to
reason about when to do what, so can be fine by me. We can switch the
default here then e.g. in PVE 10 (we require all nodes to be on latest
9.x before upgrade anyway) or if we're more cautious then 11. And there
might be other algos in the future, so OK to have this config as
infrastructure for that.
> [1]: https://lore.proxmox.com/all/DMKS80347XID.3KPXPXVUHQ3ZG@proxmox.com/
> [2]: https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=168ac114df
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH cluster v2 1/1] datacenter config: add ticket-signature-hash option
2026-11-19 12:38 ` Thomas Lamprecht
@ 2026-11-19 13:37 ` Shannon Sterz
0 siblings, 0 replies; 7+ messages in thread
From: Shannon Sterz @ 2026-11-19 13:37 UTC (permalink / raw)
To: Thomas Lamprecht, Mark Atwood, pve-devel
On Thu Nov 19, 2026 at 1:38 PM CET, Thomas Lamprecht wrote:
> Thanks for your input, more than appreciated.
Of course!
> Am 18.11.26 um 10:40 schrieb Shannon Sterz:
>> Using the cluster version guard helper [2] would come with one downside:
>> It als errors when not all nodes are online or the version information
>> is unreadable. In that case we'd probably want to fall back to SHA-1,
>> which for FIPS compliant nodes would mean that they can't log in if a
>> single node goes down. While logging in with TFA is already an issue in
>> an unquorate state, this would arguably be worse for FIPS users.
>
> I mean, FIPS compliance might require quorum to allow login in the
> first place? as only with quorum you can ensure that the user config
> and its access control lists etc. are up-to-date and the user is allowed
> to login. We argued convenience-over-security for the common case, but
> for security compliance the latter often should be weighted higher I
> think. So this might be actually a feature for FIPS?
>
> But in any case rather orthogonal to this here.
Yes, I suppose requiring quorum in FIPS mode may be reasonable and
should be considered. However, I think I may have been unclear. My
argument did not relate to whether a FIPS cluster is quorate or not.
Consider the following:
In FIPS mode, if we use the current implementation of
`assert_min_cluster_version()`, no new tickets across the cluster could
be created if a *single* node goes down or doesn't provide version
information. This applies even if the cluster is quorate (and,
therefore, ACLs etc. are current and correct).
This means for FIPS users during ordinary maintenance operations such as
a single node reboot, nobody would be able to do a regular login via the
GUI or API. An attacker could easily use this during an attack to make
patching vulnerabilities via the GUI or API harder for admins. If I am a
high risk user and I run a large FIPS hardened cluster, an attacker
could lock me out of the GUI and API with a DDoS attack on a single
node.
So I'd argue using that check directly makes the situation quote a bit
worse for FIPS users.
>> So we'd need to keep using SHA-256 at least until a new node joins with
>> a version that's too old. We could do that with a non-dying variant of
>> the helper that reads the stale info from pmxcfs as usually version
>> numbers only go up. However, nodes with an unknown version would remain
>> an issue. Alternatively we may want to add a fallback to SHA-256 if
>> signing with SHA-1 fails or allow an override similar to this approach.
>>
>> The nice thing about this option is that it only depends on the state of
>> the local node. Even in an unquorate state the cluster config stays
>> readable as pmxcfs switches to read-only mode.
>
> hmm, using an option like this certainly makes it a bit simpler to
> reason about when to do what, so can be fine by me. We can switch the
> default here then e.g. in PVE 10 (we require all nodes to be on latest
> 9.x before upgrade anyway) or if we're more cautious then 11. And there
> might be other algos in the future, so OK to have this config as
> infrastructure for that.
Yes, moving toward SHA-256 as the default with PVE 10 seems reasonable
to me.
>> [1]: https://lore.proxmox.com/all/DMKS80347XID.3KPXPXVUHQ3ZG@proxmox.com/
>> [2]: https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff;h=168ac114df
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-19 13:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 3:06 [PATCH cluster v2 0/1] datacenter config: add ticket-signature-hash option Mark Atwood
2026-11-13 3:06 ` [PATCH cluster v2 1/1] " Mark Atwood
2026-11-17 16:05 ` Shannon Sterz
2026-11-18 4:14 ` Thomas Lamprecht
2026-11-18 9:40 ` Shannon Sterz
2026-11-19 12:38 ` Thomas Lamprecht
2026-11-19 13:37 ` Shannon Sterz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox