From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>
Cc: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox 1/1] fix #6939: acme: support servers returning 204 for nonce requests
Date: Wed, 29 Oct 2025 11:36:06 +0100 [thread overview]
Message-ID: <3pgjdkveiz2yigrzg5rstlr5axueg6ubn43o2f3e4e4q253fs2@gycag2f2jcpx> (raw)
In-Reply-To: <b1bee5b3-ad42-4dcc-91a1-f4f8dba05850@proxmox.com>
On Wed, Oct 29, 2025 at 08:53:34AM +0100, Thomas Lamprecht wrote:
> Am 29.10.25 um 08:23 schrieb Christian Ebner:
> > Hi, thanks for the patches!
> >
> > comments inline
> >
> > On 10/28/25 8:34 PM, Samuel Rufinatscha wrote:
> >> Some ACME servers (notably custom or legacy implementations) respond
> >> to HEAD /newNonce with a 204 No Content instead of the
> >> RFC 8555-recommended 200 OK [1]. While this behavior is technically
> >> off-spec, it is functionally harmless. This issue was reported on our
> >> bug tracker [2].
> >>
> >> The previous implementation treated any non-200 response as an error,
> >> causing account registration to fail against such servers. Relax the
> >> status-code check to accept both 200 and 204 responses (and potentially
> >> support other 2xx codes) to improve interoperability.
> >>
> >> This aligns behavior with PVE’s more tolerant Perl ACME client and
> >> avoids regressions.
> >>
> >> [1] https://datatracker.ietf.org/doc/html/rfc8555/#section-7.2
> >> [2] https://bugzilla.proxmox.com/show_bug.cgi?id=6939
> >>
> >> Fixes: #6939
> >> Signed-off-by: Samuel Rufinatscha <s.rufinatscha@proxmox.com>
> >> ---
> >> proxmox-acme/src/account.rs | 10 +++++-----
> >> proxmox-acme/src/async_client.rs | 6 +++---
> >> proxmox-acme/src/client.rs | 2 +-
> >> proxmox-acme/src/request.rs | 4 ++--
> >> 4 files changed, 11 insertions(+), 11 deletions(-)
> >>
> >> diff --git a/proxmox-acme/src/account.rs b/proxmox-acme/src/account.rs
> >> index 73d786b8..60719865 100644
> >> --- a/proxmox-acme/src/account.rs
> >> +++ b/proxmox-acme/src/account.rs
> >> @@ -85,7 +85,7 @@ impl Account {
> >> method: "POST",
> >> content_type: crate::request::JSON_CONTENT_TYPE,
> >> body,
> >> - expected: crate::request::CREATED,
> >> + expected: vec![crate::request::CREATED],
> >
> > while this is defined as dedicated constant...
> >
> >> };
> >> Ok(NewOrder::new(request))
> >> @@ -107,7 +107,7 @@ impl Account {
> >> method: "POST",
> >> content_type: crate::request::JSON_CONTENT_TYPE,
> >> body,
> >> - expected: 200,
> >> + expected: vec![200],
> >
> > ... these and the others below are not. Same for the 204 status code you are about to add.
> >
> > So in preparation for adding the new status code, these should probably be defined as, either:
> > - as dedicated status code constants as well, or
> > - all moved over to directly use https://docs.rs/http/1.3.1/http/status/struct.StatusCode.html
> >
> > I feel like the latter is not done here intentionally to avoid the dependency on hyper or http (re-exported by hyper) for the api types only.
>
> While you are right that constants are generally nicer, IMO HTTP codes are
> very stable and universal to be fine to be used directly as numbers in the few
> limited instances here.
Mostly this, but we can also just add internal constants as well. 200
just seemed common enough...
>
> If we already (even just transitively) would get them from a dependency we still
> should switch to that, but I'd not introduce a new dependency just for that; IMO
> to high of a cost.
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-10-29 10:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 15:21 [pbs-devel] [PATCH proxmox{, -backup} 0/2] " Samuel Rufinatscha
2025-10-28 15:22 ` [pbs-devel] [PATCH proxmox 1/1] " Samuel Rufinatscha
2025-10-29 7:23 ` Christian Ebner
2025-10-29 7:53 ` Thomas Lamprecht
2025-10-29 8:07 ` Christian Ebner
2025-10-29 10:36 ` Wolfgang Bumiller [this message]
2025-10-29 11:27 ` Thomas Lamprecht
2025-10-29 15:50 ` Samuel Rufinatscha
2025-10-29 10:38 ` Wolfgang Bumiller
2025-10-29 15:56 ` Samuel Rufinatscha
2025-10-28 15:22 ` [pbs-devel] [PATCH proxmox-backup 1/1] fix #6939: acme: accept HTTP 204 from newNonce endpoint Samuel Rufinatscha
2025-10-29 7:51 ` [pbs-devel] [PATCH proxmox{, -backup} 0/2] fix #6939: acme: support servers returning 204 for nonce requests Thomas Lamprecht
2025-10-29 16:02 ` Samuel Rufinatscha
2025-10-29 16:49 ` [pbs-devel] superseded: " Samuel Rufinatscha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3pgjdkveiz2yigrzg5rstlr5axueg6ubn43o2f3e4e4q253fs2@gycag2f2jcpx \
--to=w.bumiller@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox