|
|
9be3b2 |
From 6eeef4054d707b8b255e9fa600c4c7babffbf5f7 Mon Sep 17 00:00:00 2001
|
|
|
9be3b2 |
From: Matthew Burket <mburket@redhat.com>
|
|
|
9be3b2 |
Date: Mon, 2 Aug 2021 08:37:04 -0500
|
|
|
9be3b2 |
Subject: [PATCH] Add rule for RHEL-08-020090
|
|
|
9be3b2 |
|
|
|
9be3b2 |
---
|
|
|
9be3b2 |
.../sssd/sssd_enable_certmap/rule.yml | 58 +++++++++++++++++++
|
|
|
9be3b2 |
.../sssd_enable_certmap/tests/default.fail.sh | 4 ++
|
|
|
9be3b2 |
.../tests/with_section.pass.sh | 7 +++
|
|
|
9be3b2 |
products/rhel8/profiles/stig.profile | 1 +
|
|
|
9be3b2 |
shared/references/cce-redhat-avail.txt | 1 -
|
|
|
9be3b2 |
.../data/profile_stability/rhel8/stig.profile | 1 +
|
|
|
9be3b2 |
.../profile_stability/rhel8/stig_gui.profile | 1 +
|
|
|
9be3b2 |
7 files changed, 72 insertions(+), 1 deletion(-)
|
|
|
9be3b2 |
create mode 100644 linux_os/guide/services/sssd/sssd_enable_certmap/rule.yml
|
|
|
9be3b2 |
create mode 100644 linux_os/guide/services/sssd/sssd_enable_certmap/tests/default.fail.sh
|
|
|
9be3b2 |
create mode 100644 linux_os/guide/services/sssd/sssd_enable_certmap/tests/with_section.pass.sh
|
|
|
9be3b2 |
|
|
|
9be3b2 |
diff --git a/linux_os/guide/services/sssd/sssd_enable_certmap/rule.yml b/linux_os/guide/services/sssd/sssd_enable_certmap/rule.yml
|
|
|
9be3b2 |
new file mode 100644
|
|
|
9be3b2 |
index 0000000000..0614a2f4a0
|
|
|
9be3b2 |
--- /dev/null
|
|
|
9be3b2 |
+++ b/linux_os/guide/services/sssd/sssd_enable_certmap/rule.yml
|
|
|
9be3b2 |
@@ -0,0 +1,58 @@
|
|
|
9be3b2 |
+documentation_complete: true
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+prodtype: fedora,rhel8
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+title: 'Enable Certmap in SSSD'
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+description: |-
|
|
|
9be3b2 |
+ SSSD should be configured to verify the certificate of the user or group. To set this up
|
|
|
9be3b2 |
+ ensure that section like <tt>certmap/testing.test/rule_name</tt> is setup in
|
|
|
9be3b2 |
+ <tt>/etc/sssd/sssd.conf</tt>. For example
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+ [certmap/testing.test/rule_name]
|
|
|
9be3b2 |
+ matchrule =<SAN>.*EDIPI@mil
|
|
|
9be3b2 |
+ maprule = (userCertificate;binary={cert!bin})
|
|
|
9be3b2 |
+ domains = testing.test
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+rationale: |-
|
|
|
9be3b2 |
+ Without mapping the certificate used to authenticate to the user account, the ability to
|
|
|
9be3b2 |
+ determine the identity of the individual user or group will not be available for forensic
|
|
|
9be3b2 |
+ analysis.
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+severity: medium
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+identifiers:
|
|
|
9be3b2 |
+ cce@rhel8: CCE-86060-1
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+references:
|
|
|
9be3b2 |
+ disa: CCI-000187
|
|
|
9be3b2 |
+ nist: IA-5 (2) (c)
|
|
|
9be3b2 |
+ stigid@rhel8: RHEL-08-020090
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+warnings:
|
|
|
9be3b2 |
+ - general: |-
|
|
|
9be3b2 |
+ Automatic remediation of this control is not available, since all of the settings in
|
|
|
9be3b2 |
+ in the certmap need to be customized.
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+ocil_clause: 'Certmap is not configured in SSSD'
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+ocil: |-
|
|
|
9be3b2 |
+ To verify Certmap is enabled in SSSD, run the following command:
|
|
|
9be3b2 |
+ $ cat sudo cat /etc/sssd/sssd.conf
|
|
|
9be3b2 |
+ If configured properly, output should contain section like the following
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+ [certmap/testing.test/rule_name]
|
|
|
9be3b2 |
+ matchrule =<SAN>.*EDIPI@mil
|
|
|
9be3b2 |
+ maprule = (userCertificate;binary={cert!bin})
|
|
|
9be3b2 |
+ domains = testing.test
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+template:
|
|
|
9be3b2 |
+ name: lineinfile
|
|
|
9be3b2 |
+ vars:
|
|
|
9be3b2 |
+ path: '/etc/sssd/sssd.conf'
|
|
|
9be3b2 |
+ text: '^\[certmap\/.+\/.+\]$'
|
|
|
9be3b2 |
+ backends:
|
|
|
9be3b2 |
+ ansible: "off"
|
|
|
9be3b2 |
+ bash: "off"
|
|
|
9be3b2 |
diff --git a/linux_os/guide/services/sssd/sssd_enable_certmap/tests/default.fail.sh b/linux_os/guide/services/sssd/sssd_enable_certmap/tests/default.fail.sh
|
|
|
9be3b2 |
new file mode 100644
|
|
|
9be3b2 |
index 0000000000..1e31c0da19
|
|
|
9be3b2 |
--- /dev/null
|
|
|
9be3b2 |
+++ b/linux_os/guide/services/sssd/sssd_enable_certmap/tests/default.fail.sh
|
|
|
9be3b2 |
@@ -0,0 +1,4 @@
|
|
|
9be3b2 |
+#!/bin/bash
|
|
|
9be3b2 |
+
|
|
|
9be3b2 |
+touch /etc/sssd/sssd.conf
|
|
|
9be3b2 |
+sed -i "s/\[certmap.*//g" /etc/sssd/sssd.conf
|
|
|
9be3b2 |
diff --git a/linux_os/guide/services/sssd/sssd_enable_certmap/tests/with_section.pass.sh b/linux_os/guide/services/sssd/sssd_enable_certmap/tests/with_section.pass.sh
|
|
|
9be3b2 |
new file mode 100644
|
|
|
9be3b2 |
index 0000000000..911e095f5d
|
|
|
9be3b2 |
--- /dev/null
|
|
|
9be3b2 |
+++ b/linux_os/guide/services/sssd/sssd_enable_certmap/tests/with_section.pass.sh
|
|
|
9be3b2 |
@@ -0,0 +1,7 @@
|
|
|
9be3b2 |
+#!/bin/bash
|
|
|
9be3b2 |
+cat >> /etc/sssd/sssd.conf<< EOF
|
|
|
9be3b2 |
+[certmap/testing.test/rule_name]
|
|
|
9be3b2 |
+matchrule =<SAN>.*EDIPI@mil
|
|
|
9be3b2 |
+maprule = (userCertificate;binary={cert!bin})
|
|
|
9be3b2 |
+domains = testing.test
|
|
|
9be3b2 |
+EOF
|
|
|
9be3b2 |
diff --git a/products/rhel8/profiles/stig.profile b/products/rhel8/profiles/stig.profile
|
|
|
9be3b2 |
index f17a7b88b1..ec0a3b1753 100644
|
|
|
9be3b2 |
--- a/products/rhel8/profiles/stig.profile
|
|
|
9be3b2 |
+++ b/products/rhel8/profiles/stig.profile
|
|
|
9be3b2 |
@@ -503,6 +503,7 @@ selections:
|
|
|
9be3b2 |
# RHEL-08-020080
|
|
|
9be3b2 |
|
|
|
9be3b2 |
# RHEL-08-020090
|
|
|
9be3b2 |
+ - sssd_enable_certmap
|
|
|
9be3b2 |
|
|
|
9be3b2 |
# RHEL-08-020100
|
|
|
9be3b2 |
- accounts_password_pam_retry
|
|
|
9be3b2 |
diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt
|
|
|
9be3b2 |
index 73d025484e..e80557f033 100644
|
|
|
9be3b2 |
--- a/shared/references/cce-redhat-avail.txt
|
|
|
9be3b2 |
+++ b/shared/references/cce-redhat-avail.txt
|
|
|
9be3b2 |
@@ -186,7 +186,6 @@ CCE-86056-9
|
|
|
9be3b2 |
CCE-86057-7
|
|
|
9be3b2 |
CCE-86058-5
|
|
|
9be3b2 |
CCE-86059-3
|
|
|
9be3b2 |
-CCE-86060-1
|
|
|
9be3b2 |
CCE-86061-9
|
|
|
9be3b2 |
CCE-86062-7
|
|
|
9be3b2 |
CCE-86063-5
|
|
|
9be3b2 |
diff --git a/tests/data/profile_stability/rhel8/stig.profile b/tests/data/profile_stability/rhel8/stig.profile
|
|
|
9be3b2 |
index 236e595604..bffa509b69 100644
|
|
|
9be3b2 |
--- a/tests/data/profile_stability/rhel8/stig.profile
|
|
|
9be3b2 |
+++ b/tests/data/profile_stability/rhel8/stig.profile
|
|
|
9be3b2 |
@@ -275,6 +275,7 @@ selections:
|
|
|
9be3b2 |
- sshd_set_keepalive_0
|
|
|
9be3b2 |
- sshd_use_strong_rng
|
|
|
9be3b2 |
- sshd_x11_use_localhost
|
|
|
9be3b2 |
+- sssd_enable_certmap
|
|
|
9be3b2 |
- sssd_enable_smartcards
|
|
|
9be3b2 |
- sssd_offline_cred_expiration
|
|
|
9be3b2 |
- sudo_remove_no_authenticate
|
|
|
9be3b2 |
diff --git a/tests/data/profile_stability/rhel8/stig_gui.profile b/tests/data/profile_stability/rhel8/stig_gui.profile
|
|
|
9be3b2 |
index 9973b5adef..c84ac75c7b 100644
|
|
|
9be3b2 |
--- a/tests/data/profile_stability/rhel8/stig_gui.profile
|
|
|
9be3b2 |
+++ b/tests/data/profile_stability/rhel8/stig_gui.profile
|
|
|
9be3b2 |
@@ -286,6 +286,7 @@ selections:
|
|
|
9be3b2 |
- sshd_set_keepalive_0
|
|
|
9be3b2 |
- sshd_use_strong_rng
|
|
|
9be3b2 |
- sshd_x11_use_localhost
|
|
|
9be3b2 |
+- sssd_enable_certmap
|
|
|
9be3b2 |
- sssd_enable_smartcards
|
|
|
9be3b2 |
- sssd_offline_cred_expiration
|
|
|
9be3b2 |
- sudo_remove_no_authenticate
|