Bug 1955724

Summary: [RFE] Logging Should Meet CIS Benchmark
Product: Red Hat Enterprise Linux 8 Reporter: Bernie Hoefer <bhoefer>
Component: insights-clientAssignee: Jason Jerome <jajerome>
Status: MODIFIED --- QA Contact: Pavol Kotvan <pakotvan>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: ahitacat, ahumbe, cmarinea, dnagorny, gchamoul, gmccullo, jajerome, jstavel, kdixon, link, mgrunwal, prgutier, ravpatil, redakkan, sbalasub, stomsa
Target Milestone: betaKeywords: FutureFeature, Reopened, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-01 10:37:12 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:

Description Bernie Hoefer 2021-04-30 17:36:48 UTC
Description of problem:

Customers are getting dinged because their Insights-registered machines are creating log files with permissions that do not meet the Center for Internet Security (CIS) benchmarks.  Specifically, the audit rule in its section 4.2.3 (page 336 of the PDF):

  https://downloads.cisecurity.org/download?u=1619043954

...for Red Hat Enterprise Linux 8.  (There is a similar audit rule for RHEL 7:

  https://downloads.cisecurity.org/download?u=1619043135
)


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

insights-client-3.1.1-1.el8_3.noarch

# insights-client --version
Client: 3.1.1
Core: 3.0.219-1


How reproducible / Steps to Reproduce:

1. Note that a minimal-install RHEL 8.3 machine's root user has a default umask of 0022.

2. Install the insights-client RPM and register it.


Actual results:

Note the /var/log/insights-client directory gets created with mode 700 (which meets the benchmark), but the files inside it have mode 644 (which run afoul of the benchmark):

# ls -aFl /var/log/i*
total 208
drwx------.  2 root root     62 Apr 30 10:29 ./
drwxr-xr-x. 11 root root   4096 Apr 30 10:29 ../
-rw-r--r--.  1 root root  10939 Apr 30 10:29 insights-client.log
-rw-r--r--.  1 root root 184362 Apr 30 10:29 insights-client.log.1


Expected results:

Files inside /var/log/insights-client should be created with mode 600.

Comment 14 Christian Marineau 2023-02-21 15:53:48 UTC
=== PM Update ===
The resolution to this RFE is currently aligned to Fall 2023. The target release may be re-considered over time, but this change is considered a high priority for 2023.