Bug 1979714

Summary: sshd - should detect FIPS mode and handle tasks correctly in FIPS mode
Product: Red Hat Enterprise Linux 8 Reporter: Rich Megginson <rmeggins>
Component: rhel-system-rolesAssignee: Jakub Jelen <jjelen>
Status: CLOSED ERRATA QA Contact: David Jež <djez>
Severity: unspecified Docs Contact: Eliane Ramos Pereira <elpereir>
Priority: unspecified    
Version: 8.4CC: djez, elpereir, gfialova, jjelen, nhosoi, spetrosi
Target Milestone: beta   
Target Release: 8.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:sshd
Fixed In Version: rhel-system-roles-1.11.0-1.el8 Doc Type: Bug Fix
Doc Text:
.The SSH server role now detects FIPS mode and handles tasks correctly in FIPS mode Previously, when managing RHEL8 and older systems in FIPS mode, one of the default hostkeys was not allowed to be created. As a consequence, the SSH server role operation failed to generate the `not allowed key` type when invoked. With this fix, the SSH server role detects FIPS mode and adjusts default hostkey list accordingly. As a result, the SSH server role can now manage systems in FIPS mode with default hostkeys configuration.
Story Points: ---
Clone Of:
: 2029634 (view as bug list) Environment:
Last Closed: 2022-05-10 14:12:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1942527    
Bug Blocks:    

Description Rich Megginson 2021-07-06 19:35:53 UTC
Description of problem:

The sshd role should handle managing a system which is in FIPS mode.  There may be tasks which should not be applied in FIPS mode, settings which are not applicable, etc.  Here is an example:

"We are attempting to use the SSH system role on RHEL7 systems which are in FIPS mode due to a security policy requirement. When trying to run this role through Ansible the playbook fails at SSH key generation task with error message "ED25519 keys are not allowed in FIPS mode". This is because the ed225519 key type is not available, as noted here: https://access.redhat.com/solutions/3643252."

There may be other tasks that will not work in FIPS mode, or other settings which should be skipped in FIPS mode.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
https://github.com/linux-system-roles/linux-system-roles.github.io/issues/66

Comment 1 Rich Megginson 2021-07-06 22:41:53 UTC
@jjelen who should I assign this to?

Comment 2 Jakub Jelen 2021-07-07 08:33:05 UTC
Its probably up to me. Thanks for heads up. I will check what we can do about that.

Comment 3 Jakub Jelen 2021-07-07 08:44:13 UTC
FYI, the workaround posted in https://github.com/linux-system-roles/linux-system-roles.github.io/issues/66#issuecomment-875025844

  sshd_HostKey:
    - /etc/ssh/ssh_host_rsa_key
    - /etc/ssh/ssh_host_ecdsa_key

Is the correct solution for now and works for the reporter.

Comment 4 Jakub Jelen 2021-11-09 19:59:38 UTC
Filled a PR adding this functionality in upstream:

https://github.com/willshersystems/ansible-sshd/pull/173

Comment 5 Rich Megginson 2021-11-09 21:52:20 UTC
moving to ASSIGNED until merged upstream

Comment 7 Rich Megginson 2021-12-07 01:27:33 UTC
@jjelen please provide Doc Text

Comment 20 errata-xmlrpc 2022-05-10 14:12:08 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 (rhel-system-roles bug fix and enhancement update), 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/RHBA-2022:1896