From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 53DFC1FF396 for ; Thu, 23 May 2024 14:19:58 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id ADE721F330; Thu, 23 May 2024 14:20:17 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Thu, 23 May 2024 14:19:28 +0200 Message-ID: <20240523121938.1058898-1-c.heiss@proxmox.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.006 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH installer 0/7] auto-installer: add option for providing hashed root password X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" This series adds a new answer option `global.root_password_hashed` for the auto-installer, enabling administrators to specify the root password of the new installation in a hashed format - as generated by e.g. mkpasswd(1) - instead of plain-text. Administrators/users might want to avoid passing along a plain-text password with the different answer-fetching methods supported by the auto-installer, for obvious reasons. While this of course does not provide full security, sending a hashed password might still be preferred by administrators over plain text. Tested by installing using the GUI and TUI (to ensure no regressions happend) and using the auto-installer, once with `root_password` set (again testing for potential regressions) and once with `global.root_password_hashed` set instead, testing the new functionality. First two patches are small cleanups and may be applied independently. Christoph Heiss (7): common: move `PasswordOptions` type to tui crate tui-installer: remove `Debug` implementation for password options low-level: change root password option to contain either plaintext or hash tui-installer: adapt to new `root_password` plain/hashed setup option auto-installer: adapt to new `root_password` plain/hashed setup option auto-installer: add new `global.root_password_hashed` answer option auto-installer: add test for hashed root password option Proxmox/Install.pm | 25 ++++++++++++++++--- Proxmox/Install/Config.pm | 20 ++++++++++++--- proxinstall | 4 +-- proxmox-auto-installer/src/answer.rs | 3 ++- proxmox-auto-installer/src/utils.rs | 13 ++++++++-- .../resources/parse_answer/disk_match.json | 2 +- .../parse_answer/disk_match_all.json | 2 +- .../parse_answer/disk_match_any.json | 2 +- .../parse_answer/hashed_root_password.json | 20 +++++++++++++++ .../parse_answer/hashed_root_password.toml | 14 +++++++++++ .../tests/resources/parse_answer/minimal.json | 2 +- .../resources/parse_answer/nic_matching.json | 2 +- .../resources/parse_answer/specific_nic.json | 2 +- .../tests/resources/parse_answer/zfs.json | 2 +- proxmox-installer-common/src/options.rs | 15 ----------- proxmox-installer-common/src/setup.rs | 12 +++++++-- proxmox-tui-installer/src/main.rs | 4 +-- proxmox-tui-installer/src/options.rs | 20 ++++++++++++--- proxmox-tui-installer/src/setup.rs | 10 ++++++-- 19 files changed, 132 insertions(+), 42 deletions(-) create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/hashed_root_password.json create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/hashed_root_password.toml -- 2.44.0 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel