Bug 2122464 - crypto-policies RSAMinSize enforcement breaks ssh to overcloud nodes
Summary: crypto-policies RSAMinSize enforcement breaks ssh to overcloud nodes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 17.1 (Wallaby)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ga
: 17.1
Assignee: Luca Miccini
QA Contact: Khomesh Thakre
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-30 06:08 UTC by Luca Miccini
Modified: 2023-08-16 01:12 UTC (History)
7 users (show)

Fixed In Version: openstack-tripleo-heat-templates-14.3.1-1.20221005153721.8a205f8.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-16 01:12:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 854602 0 None MERGED Remove argument to ssh-keygen for key size 2023-03-07 13:22:56 UTC
Red Hat Issue Tracker OSP-18452 0 None None None 2022-08-30 06:12:31 UTC
Red Hat Product Errata RHEA-2023:4577 0 None None None 2023-08-16 01:12:31 UTC

Description Luca Miccini 2022-08-30 06:08:31 UTC
Description of problem:

During the undercloud install we check if the stack user already has a rsa ssh key, otherwise we create one:

https://github.com/openstack/tripleo-heat-templates/blob/master/extraconfig/post_deploy/undercloud_post.sh#L46

if [ ! -f $HOMEDIR/.ssh/id_rsa ]; then
    ssh-keygen -b 1024 -N '' -f $HOMEDIR/.ssh/id_rsa
fi

Unfortunately the latest crypto-policies rpm now enforces a minimum key size of 2048 via:

$ grep RSAMinSize /etc/crypto-policies/back-ends/openssh.config
RSAMinSize 2048

this breaks ssh to the overcloud nodes.

I proposed we let ssh-keygen pick a default based on the os policies here: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/854602 .

We should probably look into how we can prevent this change from breaking existing environments where the key needs to be rotated (maybe we can leverage https://bugzilla.redhat.com/show_bug.cgi?id=2025933 ?)

rpm version:

crypto-policies-20220815-1.git0fbe86f.el9.noarch

[root@undercloud-0 ~]# rpm -q --changelog crypto-policies-20220815-1.git0fbe86f.el9.noarch
* Mon Aug 15 2022 Alexander Sosedkin <asosedkin> - 20220815-1.git0fbe86f                                                                                                                                                                                                                                                                    
- openssh: add RSAMinSize option following min_rsa_size

Comment 1 Brendan Shephard 2022-09-01 05:01:10 UTC
Sounds reasonable. Let's back port it to Wallaby and ship it with 17.1

Comment 7 Lukas Svaty 2023-06-16 08:13:29 UTC
Bulk moving target milestone to GA after the release of Beta on 14th June '23.

Comment 15 errata-xmlrpc 2023-08-16 01:12:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.1 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2023:4577


Note You need to log in before you can comment on or make changes to this bug.