Bug 1829669

Summary: Document how to install an arbitrary pre-generated policy in RHEL 8.2 and above
Product: Red Hat Enterprise Linux 8 Reporter: James Ralston <ralston>
Component: crypto-policiesAssignee: Tomas Mraz <tmraz>
Status: CLOSED ERRATA QA Contact: Ondrej Moriš <omoris>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: jcsible, nmavrogi, omoris
Target Milestone: rcKeywords: ManPageChange, Triaged
Target Release: 8.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: crypto-policies-20200527-1.git0a29b28.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:58:27 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 James Ralston 2020-04-30 03:09:18 UTC
Description of problem:

In the crypto-policies package before RHEL 8.2, additional policies were added to the system by creating a custom policy directory and populating all of the back-end files in that directory.

We leveraged that capability to roll our own custom policy for our RHEL8 hosts. It worked well.

But starting with RHEL 8.2, the mechanism to create custom policies has changed. Instead of creating the required back-end files, one creates a POLICY.pol file, and (optionally) various MODIFICATIONS.pmod files. Rather than focusing on specific applications, the *.pol policy language tends to describe the overall state of the system in terms of permitted ciphers, hashes, key lengths, et. al.

Unfortunately, this change has broken our ability to install our own custom policy by pre-generating the necessary back-end files.

Yes, we see the value of the simplistic *.pol policy language for novice administrators. But for advanced configurations, precise and application-specific tailoring is necessary, and the current policy language is wholly inadequate for this task. (This is particularly true in cases where compliance with various standards is required, and compliance with said standards is audited.)

Please bring back the ability to specify an exact back-end policy structure.

Specifically, if I run:

$ update-crypto-policies --set MYPOLICY

…if none of these policy files exists:

/etc/crypto-policies/policies/MYPOLICY.pol
/usr/share/crypto-policies/policies/MYPOLICY.pol

…but a pre-generated back-end directory structure exists:

/usr/share/crypto-policies/MYPOLICY/
/usr/share/crypto-policies/MYPOLICY/bind.txt
/usr/share/crypto-policies/MYPOLICY/gnutls.txt
/usr/share/crypto-policies/MYPOLICY/java.txt
/usr/share/crypto-policies/MYPOLICY/krb5.txt
/usr/share/crypto-policies/MYPOLICY/libreswan.txt
/usr/share/crypto-policies/MYPOLICY/libssh.txt
/usr/share/crypto-policies/MYPOLICY/nss.txt
/usr/share/crypto-policies/MYPOLICY/opensshserver.txt
/usr/share/crypto-policies/MYPOLICY/openssh.txt
/usr/share/crypto-policies/MYPOLICY/opensslcnf.txt
/usr/share/crypto-policies/MYPOLICY/openssl.txt

…then update-crypto-policies should simply install the contents of the /usr/share/crypto-policies/MYPOLICY directory to /etc/crypto-policies/back-ends directory and assert that the MYPOLICY policy is in effect.

Without functionality like this, we will have no choice but to simply stomp the contents of the /etc/crypto-policies/back-ends directory with the specific back-end policy we need, because there is no way to express the nuances of the application-specific policies we need using the *.pol language.

We don't want to do this. We recognize that attempting to centralize Linux cryptographic configuration is a laudable goal, and we are grateful that Red Hat has undertaken this (challenging!) endeavor. We also see the value in attempting to simply the cryptographic configuration for novice administrators. But this simplification cannot come at the cost of preventing non-novice administrators from exerting exact control over the various policies for the various back-ends.

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

20191128-2.git23e1bf1.el8

Comment 1 Tomas Mraz 2020-04-30 07:19:25 UTC
This should work fine. It should be sufficient to provide an empty /etc/crypto-policies/policies/MYPOLICY.pol and the hardcoded back-ends from /usr/share/crypto-policies/MYPOLICY/*.txt should still be used and symlinked into the /etc/crypto-policies/back-ends.

If that does not work, then it would be a bug.

Comment 2 James Ralston 2020-05-05 04:33:19 UTC
I can confirm that providing an empty MYPOLICY.pol file does indeed cause the pre-generated back-ends from /usr/share/crypto-policies/MYPOLICY to be symlinked into /etc/crypto-policies/back-ends.

Could this logic be documented in crypto-policies(7), please? It is not currently documented, and it is not necessarily obvious, either.

Thanks!

Comment 10 errata-xmlrpc 2020-11-04 01:58:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (crypto-policies bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4536