Bug 2096911

Summary: Add support for `lock root account` and `allow root ssh login with password`
Product: Red Hat Enterprise Linux 9 Reporter: Marek Haicman <mhaicman>
Component: oscap-anaconda-addonAssignee: Matěj Týč <matyc>
Status: NEW --- QA Contact: Release Test Team <release-test-team>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.0CC: jstodola, mhaicman, wsato
Target Milestone: rcKeywords: TestCaseNeeded, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Marek Haicman 2022-06-14 14:30:49 UTC
Description of problem:
Anaconda added option to "Allow root SSH login with password" into GUI to circumvent default change in the SSH. As the `scap-security-guide` profiles in many cases require `PermitRootLogin no`, we are directly countering this option. Given the paradigm that whatever is configured by Anaconda is integrated as a special Anaconda-based check, we need it as well.

Version-Release number of selected component (if applicable):
2.0.0-8.el9

How reproducible:
reliably

Steps to Reproduce:
1. begin GUI installation of RHEL9
2. select OSPP profile
3. create root password, tick "allow root ssh login with password"
4. start installation
5. finish installation

Actual results:
no issue is encountered, /etc/ssh/sshd_config contains line
PermitRootLogin no

Expected results:
Installation won't start, as there's conflict of requirements

Additional info:
Anaconda team plans to add kickstart support via Bug 2033849 into 9.1

Comment 2 Marek Haicman 2022-06-15 17:12:20 UTC
To extend expected result:
When the misalignment happens (i.e. profile selected is opinionated about the option and the configuration in the "root password" spoke is not align with that), the addon hub icon should reflect the issue (or the issue can be represented any other way), and installation should not be allowed to start.