public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 2/2] cluster: add '=' to ssh pubkey pattern
Date: Wed, 14 Jul 2021 16:44:30 +0200	[thread overview]
Message-ID: <20210714144430.241822-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20210714144430.241822-1-s.ivanov@proxmox.com>

ssh public keys are base64 encoded, thus can potentially contain =.
until now the RSA keys generated by Debian were 2048 bits long and did
not need padding

with bullseye (openssh (1:8.0p1-1)) the RSA keysize got increased to
3072 bits, and now does contain a =

noticed while trying to join a PMG container from a bullseye template
to my existing cluster (the error happens on the new node).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/PMG/ClusterConfig.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PMG/ClusterConfig.pm b/src/PMG/ClusterConfig.pm
index b615a6c..8d77cc4 100644
--- a/src/PMG/ClusterConfig.pm
+++ b/src/PMG/ClusterConfig.pm
@@ -46,7 +46,7 @@ use warnings;
 use base qw(PMG::ClusterConfig::Base);
 
 sub valid_ssh_pubkey {
-    return'^[A-Za-z0-9\.\/\+]{200,}$';
+    return'^[A-Za-z0-9\.\/\+=]{200,}$';
 }
 
 sub type {
-- 
2.30.2





  parent reply	other threads:[~2021-07-14 14:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 14:44 [pmg-devel] [PATCH pmg-api 0/2] fix clusterjoin with ssh-keys !=2048 bits Stoiko Ivanov
2021-07-14 14:44 ` [pmg-devel] [PATCH pmg-api 1/2] cluster: refactor ssh pubkey verification Stoiko Ivanov
2021-07-14 14:44 ` Stoiko Ivanov [this message]
2021-07-14 16:02 ` [pmg-devel] [PATCH pmg-api 0/2] fix clusterjoin with ssh-keys !=2048 bits Thomas Lamprecht

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=20210714144430.241822-3-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pmg-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