Bug 1955724 - [RFE] Logging Should Meet CIS Benchmark
Summary: [RFE] Logging Should Meet CIS Benchmark
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: insights-client
Version: 8.3
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: beta
: ---
Assignee: Štěpán Tomsa
QA Contact: Pavol Kotvan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-30 17:36 UTC by Bernie Hoefer
Modified: 2021-05-02 14:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

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.


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