Bug 2029634

Summary: sshd - should detect FIPS mode and handle tasks correctly in FIPS mode
Product: Red Hat Enterprise Linux 9 Reporter: Rich Megginson <rmeggins>
Component: rhel-system-rolesAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: Jakub Haruda <jharuda>
Severity: unspecified Docs Contact: Jan Fiala <jafiala>
Priority: unspecified    
Version: 9.0CC: djez, elpereir, gfialova, jafiala, jharuda, jjelen, nhosoi, rhel-cs-system-management-subsystem-qe, spetrosi
Target Milestone: rcKeywords: Triaged
Target Release: 9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:sshd
Fixed In Version: rhel-system-roles-1.11.0-1.el9 Doc Type: Bug Fix
Doc Text:
.The SSHD System Role can manage systems in FIPS mode Previously, the SSHD System Role could not create the `not allowed` HostKey type when called. As a consequence, the SSHD System Role could not manage RHEL 8 and older systems in Federal Information Processing Standard (FIPS) mode. With this update, the SSHD System Role detects FIPS mode and adjusts the default HostKey list correctly. As a result, the system role can manage RHEL systems in FIPS mode with the default HostKey configuration.
Story Points: ---
Clone Of: 1979714 Environment:
Last Closed: 2022-05-17 13:03:10 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:    
Deadline: 2021-12-13   

Description Rich Megginson 2021-12-06 23:20:00 UTC
+++ This bug was initially created as a clone of Bug #1979714 +++

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

--- Additional comment from Rich Megginson on 2021-07-06 22:41:53 UTC ---

@jjelen who should I assign this to?

--- Additional comment from Jakub Jelen on 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.

--- Additional comment from Jakub Jelen on 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.

--- Additional comment from Jakub Jelen on 2021-11-09 19:59:38 UTC ---

Filled a PR adding this functionality in upstream:

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

--- Additional comment from Rich Megginson on 2021-11-09 21:52:20 UTC ---

moving to ASSIGNED until merged upstream

Comment 3 Rich Megginson 2021-12-07 01:10:35 UTC
@jjelen please provide the Doc Text

Comment 17 errata-xmlrpc 2022-05-17 13:03:10 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 (new packages: rhel-system-roles), 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:2443