public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Folke Gleumes <f.gleumes@proxmox.com>
Subject: Re: [pve-devel] [PATCH acme v2 1/5] fix #4497: add support for external account bindings
Date: Fri, 27 Oct 2023 08:58:31 +0200	[thread overview]
Message-ID: <3c97105b-c896-4613-aaaf-6b8395309d5e@proxmox.com> (raw)
In-Reply-To: <20231025130720.195478-2-f.gleumes@proxmox.com>

Am 25/10/2023 um 15:07 schrieb Folke Gleumes:
> Changes v1 -> v2:
> Switched from including the eab credentials in the info hash,
> to passing them in their own variable. This still unfortunately still 
> breaks the api, but doesn't potentially expose secrets and is
> cleaner then purging the values from the hash afterwards.

yeah, IMO the signature of that method is still not really ideal, i.e.,
adding that as explicit param is a lateral move and still breaks ABI, so
meh, and I'd prefer

>  src/PVE/ACME.pm | 42 +++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 37 insertions(+), 5 deletions(-)
> 
> diff --git a/src/PVE/ACME.pm b/src/PVE/ACME.pm
> index 3f66182..7b3840b 100644
> --- a/src/PVE/ACME.pm
> +++ b/src/PVE/ACME.pm

> @@ -251,6 +251,28 @@ sub jws {
>      };
>  }
>  
> +# EAB signing using the HS256 alg (HMAC/SHA256).
> +sub external_account_binding_jws {

should this be actually a private method? I.e., some

my sub external_account_binding_jws { }

or as code ref in a variable:

my $external_account_binding_jws = sub { }

FYI: For above examples you'd need to pass $self then explicitly
either way though.

As this is probably not intended to be called from the "outside"?
Albeit, that would be yet another way to avoid API breakage: let the
caller call this first and place the result into the %info hash, but
that would still keep that unchecked passing along of the %info hash.




  reply	other threads:[~2023-10-27  6:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 13:07 [pve-devel] [PATCH acme/manager v2 0/5] fix #4497: add external account binding support Folke Gleumes
2023-10-25 13:07 ` [pve-devel] [PATCH acme v2 1/5] fix #4497: add support for external account bindings Folke Gleumes
2023-10-27  6:58   ` Thomas Lamprecht [this message]
2023-10-27  7:12     ` Thomas Lamprecht
2023-10-25 13:07 ` [pve-devel] [PATCH manager v2 2/5] fix #4497: acme: " Folke Gleumes
2023-10-25 13:07 ` [pve-devel] [PATCH manager v2 3/5] api/acme: deprecate tos endpoint in favor of meta Folke Gleumes
2023-10-25 13:07 ` [pve-devel] [PATCH manager v2 4/5] fix #4497: cli/acme: detect eab and ask for credentials Folke Gleumes
2023-10-25 13:07 ` [pve-devel] [PATCH manager v2 5/5] ui/acme: switch to new meta endpoint Folke Gleumes

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=3c97105b-c896-4613-aaaf-6b8395309d5e@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=f.gleumes@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal