Blame SOURCES/scap-security-guide-0.1.52-harden-openssl-crypto-policy_PR_5925.patch

40a955
From 94ace689f800fde1453b986de02c1d0581174451 Mon Sep 17 00:00:00 2001
40a955
From: Vojtech Polasek <vpolasek@redhat.com>
40a955
Date: Wed, 8 Jul 2020 17:37:50 +0200
40a955
Subject: [PATCH 1/9] create rule, check, bash remediation
40a955
40a955
---
40a955
 .../bash/shared.sh                            |  9 +++++
40a955
 .../oval/shared.xml                           |  1 +
40a955
 .../harden_openssl_crypto_policy/rule.yml     | 33 +++++++++++++++++++
40a955
 shared/references/cce-redhat-avail.txt        |  2 --
40a955
 4 files changed, 43 insertions(+), 2 deletions(-)
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/bash/shared.sh
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/oval/shared.xml
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/bash/shared.sh b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/bash/shared.sh
40a955
new file mode 100644
40a955
index 0000000000..9838a13c95
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/bash/shared.sh
40a955
@@ -0,0 +1,9 @@
40a955
+# platform = Oracle Linux 8,Red Hat Enterprise Linux 8,Red Hat Virtualization 4,multi_platform_fedora
40a955
+
40a955
+cp="Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
40a955
+file=/etc/crypto-policies/local.d/opensslcnf-ospp.config
40a955
+
40a955
+#blank line at the begining to ease later readibility
40a955
+echo '' > "$file"
40a955
+echo "$cp" >> "$file"
40a955
+update-crypto-policies
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/oval/shared.xml b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/oval/shared.xml
40a955
new file mode 100644
40a955
index 0000000000..09199ce4da
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/oval/shared.xml
40a955
@@ -0,0 +1 @@
40a955
+{{{ oval_check_config_file(path="/etc/crypto-policies/back-ends/opensslcnf.config", prefix_regex="^(?:.*\\n)*\s*", parameter="Ciphersuites", value="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256", separator_regex="=", ) }}}
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
new file mode 100644
40a955
index 0000000000..afbdb36a23
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
@@ -0,0 +1,32 @@
40a955
+documentation_complete: true
40a955
+
40a955
+prodtype: rhel8
40a955
+
40a955
+title: 'Harden OpenSSL Crypto Policy'
40a955
+
40a955
+description: |-
40a955
+    Crypto Policies are means of enforcing certain cryptographic settings for selected applications including OpenSSL.
40a955
+    OPenSSL is by default configured to modify its configuration based on currently configured Crypto-Policy. However, in certain cases it might be needed to override the Crypto Policy specific to OpenSSL r and leave rest of the Crypto Policy intact.
40a955
+    This can be done by dropping a file named <tt>opensslcnf-xxx.config</tt>, replacing <tt>xxx</tt> with arbitrary identifier, into <tt>/etc/crypto-policies/local.d</tt>. This has to be followed by running <tt>update-crypto-policies</tt> so that changes are applied.
40a955
+    Changes are propagated into <tt>/etc/crypto-policies/back-ends/opensslcnf.config</tt>. This rule checks if this file contains predefined <tt>Ciphersuites</tt>  variable configured with predefined value.
40a955
+
40a955
+rationale: |-
40a955
+    The Common Criteria requirements specify that certain parameters for OpenSSL are configured e.g. cipher suites. Currently particular requirements specified by CC are stricter compared to any existing Crypto Policy.
40a955
+
40a955
+severity: medium
40a955
+
40a955
+identifiers:
40a955
+    cce@rhel8: 84286-4
40a955
+
40a955
+references:
40a955
+    nist: AC-17(a),AC-17(2),CM-6(a),MA-4(6),SC-13,SC-12(2),SC-12(3)
40a955
+    ospp : FCS_SSHS_EXT.1
40a955
+    srg: SRG-OS-000250-GPOS-00093,SRG-OS-000033-GPOS-00014,SRG-OS-000120-GPOS-00061
40a955
+
40a955
+ocil_clause: 'Crypto Policy for OpenSSL is not configured according to CC requirements'
40a955
+
40a955
+ocil: |-
40a955
+    To verify if the OpenSSL uses defined Crypto Policy, run:
40a955
+    
$ grep 'Ciphersuites' /etc/crypto-policies/back-ends/opensslcnf.config | tail -n 1
40a955
+    and verify that the line matches
40a955
+    
84285-6
40a955
diff --git a/shared/references/cce-redhat-avail.txt b/shared/references/cce-redhat-avail.txt
40a955
index afc0d80417..01b321b6d5 100644
40a955
--- a/shared/references/cce-redhat-avail.txt
40a955
+++ b/shared/references/cce-redhat-avail.txt
40a955
@@ -904,8 +904,6 @@ CCE-84281-5
40a955
 CCE-84282-3
40a955
 CCE-84283-1
40a955
 CCE-84284-9
40a955
-CCE-84285-6
40a955
-CCE-84286-4
40a955
 CCE-84287-2
40a955
 CCE-84288-0
40a955
 CCE-84289-8
40a955
40a955
From ddc8380b44f907872f6f3b9b0d10421329e3c0a1 Mon Sep 17 00:00:00 2001
40a955
From: Vojtech Polasek <vpolasek@redhat.com>
40a955
Date: Wed, 8 Jul 2020 17:38:32 +0200
40a955
Subject: [PATCH 2/9] add tests
40a955
40a955
---
40a955
 .../harden_openssl_crypto_policy/tests/correct.pass.sh    | 7 +++++++
40a955
 .../tests/correct_commented.fail.sh                       | 7 +++++++
40a955
 .../tests/correct_followed_by_incorrect.fail.sh           | 8 ++++++++
40a955
 .../tests/empty_policy.fail.sh                            | 7 +++++++
40a955
 .../tests/incorrect_followed_by_correct.pass.sh           | 8 ++++++++
40a955
 .../tests/incorrect_policy.fail.sh                        | 7 +++++++
40a955
 .../tests/missing_file.fail.sh                            | 7 +++++++
40a955
 7 files changed, 51 insertions(+)
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct.pass.sh
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct_commented.fail.sh
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct_followed_by_incorrect.fail.sh
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/empty_policy.fail.sh
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/incorrect_followed_by_correct.pass.sh
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/incorrect_policy.fail.sh
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/missing_file.fail.sh
40a955
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct.pass.sh b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct.pass.sh
40a955
new file mode 100644
40a955
index 0000000000..9e59b30bd2
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct.pass.sh
40a955
@@ -0,0 +1,7 @@
40a955
+#!/bin/bash
40a955
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8
40a955
+# profiles = xccdf_org.ssgproject.content_profile_ospp
40a955
+
40a955
+configfile=/etc/crypto-policies/back-ends/opensslcnf.config
40a955
+
40a955
+echo "Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" > "$configfile"
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct_commented.fail.sh b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct_commented.fail.sh
40a955
new file mode 100644
40a955
index 0000000000..91863849b3
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct_commented.fail.sh
40a955
@@ -0,0 +1,7 @@
40a955
+#!/bin/bash
40a955
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8
40a955
+# profiles = xccdf_org.ssgproject.content_profile_ospp
40a955
+
40a955
+configfile=/etc/crypto-policies/back-ends/opensslcnf.config
40a955
+
40a955
+echo "#Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" > "$configfile"
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct_followed_by_incorrect.fail.sh b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct_followed_by_incorrect.fail.sh
40a955
new file mode 100644
40a955
index 0000000000..f44957d3e1
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/correct_followed_by_incorrect.fail.sh
40a955
@@ -0,0 +1,8 @@
40a955
+#!/bin/bash
40a955
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8
40a955
+# profiles = xccdf_org.ssgproject.content_profile_ospp
40a955
+
40a955
+configfile=/etc/crypto-policies/back-ends/opensslcnf.config
40a955
+
40a955
+echo "Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" > "$configfile"
40a955
+echo "Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" >> "$configfile"
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/empty_policy.fail.sh b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/empty_policy.fail.sh
40a955
new file mode 100644
40a955
index 0000000000..5b14fe8ef4
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/empty_policy.fail.sh
40a955
@@ -0,0 +1,7 @@
40a955
+#!/bin/bash
40a955
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8
40a955
+# profiles = xccdf_org.ssgproject.content_profile_ospp
40a955
+
40a955
+configfile=/etc/crypto-policies/back-ends/opensslcnf.config
40a955
+
40a955
+echo "Ciphersuites=" > "$configfile"
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/incorrect_followed_by_correct.pass.sh b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/incorrect_followed_by_correct.pass.sh
40a955
new file mode 100644
40a955
index 0000000000..6be3bb2ffa
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/incorrect_followed_by_correct.pass.sh
40a955
@@ -0,0 +1,8 @@
40a955
+#!/bin/bash
40a955
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8
40a955
+# profiles = xccdf_org.ssgproject.content_profile_ospp
40a955
+
40a955
+configfile=/etc/crypto-policies/back-ends/opensslcnf.config
40a955
+
40a955
+echo "Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" > "$configfile"
40a955
+echo "Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256" >> "$configfile"
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/incorrect_policy.fail.sh b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/incorrect_policy.fail.sh
40a955
new file mode 100644
40a955
index 0000000000..b4fd0f97be
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/incorrect_policy.fail.sh
40a955
@@ -0,0 +1,7 @@
40a955
+#!/bin/bash
40a955
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8
40a955
+# profiles = xccdf_org.ssgproject.content_profile_ospp
40a955
+
40a955
+configfile=/etc/crypto-policies/back-ends/opensslcnf.config
40a955
+
40a955
+echo "Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256" > "$configfile"
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/missing_file.fail.sh b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/missing_file.fail.sh
40a955
new file mode 100644
40a955
index 0000000000..2d11d227cb
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/tests/missing_file.fail.sh
40a955
@@ -0,0 +1,7 @@
40a955
+#!/bin/bash
40a955
+# platform = multi_platform_fedora,Red Hat Enterprise Linux 8
40a955
+# profiles = xccdf_org.ssgproject.content_profile_ospp
40a955
+
40a955
+configfile=/etc/crypto-policies/back-ends/opensslcnf.config
40a955
+
40a955
+rm -f "$configfile"
40a955
40a955
From b08a7f3889e4592dc54a431aa4cfb6983990daba Mon Sep 17 00:00:00 2001
40a955
From: Vojtech Polasek <vpolasek@redhat.com>
40a955
Date: Thu, 9 Jul 2020 09:05:38 +0200
40a955
Subject: [PATCH 3/9] remove blank line from remediation
40a955
40a955
---
40a955
 .../crypto/harden_openssl_crypto_policy/bash/shared.sh         | 3 +--
40a955
 1 file changed, 1 insertion(+), 2 deletions(-)
40a955
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/bash/shared.sh b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/bash/shared.sh
40a955
index 9838a13c95..be6f84f83d 100644
40a955
--- a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/bash/shared.sh
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/bash/shared.sh
40a955
@@ -3,7 +3,6 @@
40a955
 cp="Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
40a955
 file=/etc/crypto-policies/local.d/opensslcnf-ospp.config
40a955
 
40a955
-#blank line at the begining to ease later readibility
40a955
-echo '' > "$file"
40a955
+
40a955
 echo "$cp" >> "$file"
40a955
 update-crypto-policies
40a955
40a955
From d249fbe6f2b0cc8b6cd8a0bb02b03ead04e1dd12 Mon Sep 17 00:00:00 2001
40a955
From: Vojtech Polasek <vpolasek@redhat.com>
40a955
Date: Thu, 9 Jul 2020 09:06:02 +0200
40a955
Subject: [PATCH 4/9] fix separator regex in oval
40a955
40a955
---
40a955
 .../crypto/harden_openssl_crypto_policy/oval/shared.xml         | 2 +-
40a955
 1 file changed, 1 insertion(+), 1 deletion(-)
40a955
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/oval/shared.xml b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/oval/shared.xml
40a955
index 09199ce4da..37be62ee39 100644
40a955
--- a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/oval/shared.xml
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/oval/shared.xml
40a955
@@ -1 +1 @@
40a955
-{{{ oval_check_config_file(path="/etc/crypto-policies/back-ends/opensslcnf.config", prefix_regex="^(?:.*\\n)*\s*", parameter="Ciphersuites", value="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256", separator_regex="=", ) }}}
40a955
+{{{ oval_check_config_file(path="/etc/crypto-policies/back-ends/opensslcnf.config", prefix_regex="^(?:.*\\n)*\s*", parameter="Ciphersuites", value="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256", separator_regex="\s*=\s*", ) }}}
40a955
40a955
From 0b203279dde378cd45f05ec93a9653e1bc3b6002 Mon Sep 17 00:00:00 2001
40a955
From: Vojtech Polasek <vpolasek@redhat.com>
40a955
Date: Thu, 9 Jul 2020 09:06:29 +0200
40a955
Subject: [PATCH 5/9] reformat rule, fix wrong ocil
40a955
40a955
---
40a955
 .../harden_openssl_crypto_policy/rule.yml     | 22 ++++++++++++++-----
40a955
 1 file changed, 16 insertions(+), 6 deletions(-)
40a955
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
index afbdb36a23..d019d6cd32 100644
40a955
--- a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
@@ -5,13 +5,23 @@ prodtype: rhel8
40a955
 title: 'Harden OpenSSL Crypto Policy'
40a955
 
40a955
 description: |-
40a955
-    Crypto Policies are means of enforcing certain cryptographic settings for selected applications including OpenSSL.
40a955
-    OPenSSL is by default configured to modify its configuration based on currently configured Crypto-Policy. However, in certain cases it might be needed to override the Crypto Policy specific to OpenSSL r and leave rest of the Crypto Policy intact.
40a955
-    This can be done by dropping a file named <tt>opensslcnf-xxx.config</tt>, replacing <tt>xxx</tt> with arbitrary identifier, into <tt>/etc/crypto-policies/local.d</tt>. This has to be followed by running <tt>update-crypto-policies</tt> so that changes are applied.
40a955
-    Changes are propagated into <tt>/etc/crypto-policies/back-ends/opensslcnf.config</tt>. This rule checks if this file contains predefined <tt>Ciphersuites</tt>  variable configured with predefined value.
40a955
+    Crypto Policies are means of enforcing certain cryptographic settings for
40a955
+    selected applications including OpenSSL. OPenSSL is by default configured to
40a955
+    modify its configuration based on currently configured Crypto-Policy.
40a955
+    However, in certain cases it might be needed to override the Crypto Policy
40a955
+    specific to OpenSSL r and leave rest of the Crypto Policy intact. This can
40a955
+    be done by dropping a file named <tt>opensslcnf-xxx.config</tt>, replacing
40a955
+    <tt>xxx</tt> with arbitrary identifier, into
40a955
+    <tt>/etc/crypto-policies/local.d</tt>. This has to be followed by running
40a955
+    <tt>update-crypto-policies</tt> so that changes are applied. Changes are
40a955
+    propagated into <tt>/etc/crypto-policies/back-ends/opensslcnf.config</tt>.
40a955
+    This rule checks if this file contains predefined <tt>Ciphersuites</tt>
40a955
+    variable configured with predefined value.
40a955
 
40a955
 rationale: |-
40a955
-    The Common Criteria requirements specify that certain parameters for OpenSSL are configured e.g. cipher suites. Currently particular requirements specified by CC are stricter compared to any existing Crypto Policy.
40a955
+    The Common Criteria requirements specify that certain parameters for OpenSSL
40a955
+    are configured e.g. cipher suites. Currently particular requirements
40a955
+    specified by CC are stricter compared to any existing Crypto Policy.
40a955
 
40a955
 severity: medium
40a955
 
40a955
@@ -30,4 +40,4 @@ ocil: |-
40a955
     To verify if the OpenSSL uses defined Crypto Policy, run:
40a955
     
$ grep 'Ciphersuites' /etc/crypto-policies/back-ends/opensslcnf.config | tail -n 1
40a955
     and verify that the line matches
40a955
-    
84285-6
40a955
+    
Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
40a955
40a955
From aa2555bdfe67ab41978ae92924580527c7a725eb Mon Sep 17 00:00:00 2001
40a955
From: Vojtech Polasek <vpolasek@redhat.com>
40a955
Date: Mon, 13 Jul 2020 09:49:34 +0200
40a955
Subject: [PATCH 6/9] update references
40a955
40a955
---
40a955
 .../integrity/crypto/harden_openssl_crypto_policy/rule.yml    | 4 ++--
40a955
 1 file changed, 2 insertions(+), 2 deletions(-)
40a955
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
index d019d6cd32..075e381906 100644
40a955
--- a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
@@ -31,8 +31,8 @@ identifiers:
40a955
 
40a955
 references:
40a955
     nist: AC-17(a),AC-17(2),CM-6(a),MA-4(6),SC-13,SC-12(2),SC-12(3)
40a955
-    ospp : FCS_SSHS_EXT.1
40a955
-    srg: SRG-OS-000250-GPOS-00093,SRG-OS-000033-GPOS-00014,SRG-OS-000120-GPOS-00061
40a955
+    ospp: FCS_TLSC_EXT.1.1
40a955
+    srg: SRG-OS-000250-GPOS-00093
40a955
 
40a955
 ocil_clause: 'Crypto Policy for OpenSSL is not configured according to CC requirements'
40a955
 
40a955
40a955
From c4e0e35f3dc4abb1cea952aed4216499c622f1cf Mon Sep 17 00:00:00 2001
40a955
From: Vojtech Polasek <vpolasek@redhat.com>
40a955
Date: Mon, 13 Jul 2020 09:49:48 +0200
40a955
Subject: [PATCH 7/9] add ansible remediation
40a955
40a955
---
40a955
 .../ansible/shared.yml                           | 16 ++++++++++++++++
40a955
 1 file changed, 16 insertions(+)
40a955
 create mode 100644 linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/ansible/shared.yml
40a955
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/ansible/shared.yml b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/ansible/shared.yml
40a955
new file mode 100644
40a955
index 0000000000..d5c2c2b9f7
40a955
--- /dev/null
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/ansible/shared.yml
40a955
@@ -0,0 +1,16 @@
40a955
+# platform = Red Hat Enterprise Linux 8
40a955
+# reboot = true
40a955
+# strategy = restrict
40a955
+# complexity = low
40a955
+# disruption = low
40a955
+
40a955
+- name: "Ensure that the correct crypto policy configuration exists in /etc/crypto-policies/local.d/opensslcnf-ospp.config"
40a955
+  lineinfile:
40a955
+    path: "/etc/crypto-policies/local.d/opensslcnf-ospp.config"
40a955
+    line: "Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
40a955
+    create: yes
40a955
+    insertafter: EOF
40a955
+
40a955
+- name: "Update system crypto policy for changes to take effect"
40a955
+  command:
40a955
+    cmd: "update-crypto-policies"
40a955
40a955
From 3a33b284dc3da993b1b98e75f805ebf018d7f2e9 Mon Sep 17 00:00:00 2001
40a955
From: vojtapolasek <krecoun@gmail.com>
40a955
Date: Wed, 15 Jul 2020 09:26:11 +0200
40a955
Subject: [PATCH 8/9] fix typos
40a955
MIME-Version: 1.0
40a955
Content-Type: text/plain; charset=UTF-8
40a955
Content-Transfer-Encoding: 8bit
40a955
40a955
Co-authored-by: Jan Černý <jcerny@redhat.com>
40a955
---
40a955
 .../integrity/crypto/harden_openssl_crypto_policy/rule.yml  | 6 +++---
40a955
 1 file changed, 3 insertions(+), 3 deletions(-)
40a955
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
index 075e381906..ce0351aa34 100644
40a955
--- a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
@@ -6,10 +6,10 @@ title: 'Harden OpenSSL Crypto Policy'
40a955
 
40a955
 description: |-
40a955
     Crypto Policies are means of enforcing certain cryptographic settings for
40a955
-    selected applications including OpenSSL. OPenSSL is by default configured to
40a955
-    modify its configuration based on currently configured Crypto-Policy.
40a955
+    selected applications including OpenSSL. OpenSSL is by default configured to
40a955
+    modify its configuration based on currently configured Crypto Policy.
40a955
     However, in certain cases it might be needed to override the Crypto Policy
40a955
-    specific to OpenSSL r and leave rest of the Crypto Policy intact. This can
40a955
+    specific to OpenSSL and leave rest of the Crypto Policy intact. This can
40a955
     be done by dropping a file named <tt>opensslcnf-xxx.config</tt>, replacing
40a955
     <tt>xxx</tt> with arbitrary identifier, into
40a955
     <tt>/etc/crypto-policies/local.d</tt>. This has to be followed by running
40a955
40a955
From e5fa539ea5274e723a428a835673598899a301fa Mon Sep 17 00:00:00 2001
40a955
From: Vojtech Polasek <vpolasek@redhat.com>
40a955
Date: Wed, 15 Jul 2020 09:36:06 +0200
40a955
Subject: [PATCH 9/9] update rule references
40a955
40a955
---
40a955
 .../integrity/crypto/harden_openssl_crypto_policy/rule.yml    | 4 ++--
40a955
 1 file changed, 2 insertions(+), 2 deletions(-)
40a955
40a955
diff --git a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
index ce0351aa34..0cbead2a6d 100644
40a955
--- a/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
+++ b/linux_os/guide/system/software/integrity/crypto/harden_openssl_crypto_policy/rule.yml
40a955
@@ -30,8 +30,8 @@ identifiers:
40a955
 
40a955
 references:
40a955
-    nist: AC-17(a),AC-17(2),CM-6(a),MA-4(6),SC-13,SC-12(2),SC-12(3)
40a955
+    nist: SC-8(1),SC-13
40a955
     ospp: FCS_TLSC_EXT.1.1
40a955
-    srg: SRG-OS-000250-GPOS-00093
40a955
+    srg: SRG-OS-000396-GPOS-00176,SRG-OS-000424-GPOS-00188,SRG-OS-000478-GPOS-00223
40a955
 
40a955
 ocil_clause: 'Crypto Policy for OpenSSL is not configured according to CC requirements'
40a955