From: Nicolas Frey <n.frey@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager v2] fix #6932: api: acme: add digest and plugin to return schema
Date: Wed, 15 Oct 2025 13:17:40 +0200 [thread overview]
Message-ID: <20251015111740.122773-1-n.frey@proxmox.com> (raw)
fixes regression from `427e2627 api: add ACME plugin return schema`
by adding digest and plugin parameters and deleting id parameter, as
it is replaced by plugin on return schemas. This mismatch would
result in `400 Result verification failed` on index and
get_plugin_config.
Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
---
PVE/API2/ACMEPlugin.pm | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/PVE/API2/ACMEPlugin.pm b/PVE/API2/ACMEPlugin.pm
index c12b75c5..2f210903 100644
--- a/PVE/API2/ACMEPlugin.pm
+++ b/PVE/API2/ACMEPlugin.pm
@@ -50,7 +50,17 @@ my $modify_cfg_for_api = sub {
return $plugin_cfg;
};
-my $acme_challenge_api_create_and_return_schema = PVE::ACME::Challenge->createSchema();
+my $acme_challenge_create_schema = PVE::ACME::Challenge->createSchema();
+my $acme_challenge_return_schema = {
+ type => "object",
+ properties => {
+ PVE::ACME::Challenge->createSchema()->{properties}->%*,
+ digest => get_standard_option('pve-config-digest'),
+ plugin => get_standard_option('pve-acme-pluginid'),
+ },
+};
+# replaced by plugin property
+delete $acme_challenge_return_schema->{properties}->{id};
__PACKAGE__->register_method({
name => 'index',
@@ -74,7 +84,7 @@ __PACKAGE__->register_method({
},
returns => {
type => 'array',
- items => $acme_challenge_api_create_and_return_schema,
+ items => $acme_challenge_return_schema,
links => [{ rel => 'child', href => "{plugin}" }],
},
code => sub {
@@ -108,7 +118,7 @@ __PACKAGE__->register_method({
id => get_standard_option('pve-acme-pluginid'),
},
},
- returns => $acme_challenge_api_create_and_return_schema,
+ returns => $acme_challenge_return_schema,
code => sub {
my ($param) = @_;
@@ -126,7 +136,7 @@ __PACKAGE__->register_method({
check => ['perm', '/', ['Sys.Modify']],
},
protected => 1,
- parameters => $acme_challenge_api_create_and_return_schema,
+ parameters => $acme_challenge_create_schema,
returns => {
type => "null",
},
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
reply other threads:[~2025-10-15 11:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251015111740.122773-1-n.frey@proxmox.com \
--to=n.frey@proxmox.com \
--cc=pve-devel@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.