Open jan-cerny opened 2 years ago
I think that the problem with the rpm_verify_hashes
happens because the file /etc/crypto-policies/back-ends/gnutls.config
will point to the crypto policy defined in the system. In the following case the DEFAULT
crypto policy is being used.
# update-crypto-policies --show
DEFAULT
# ls -la /etc/crypto-policies/back-ends/gnutls.config
lrwxrwxrwx. 1 root root 45 Sep 6 09:22 /etc/crypto-policies/back-ends/gnutls.config -> /usr/share/crypto-policies/DEFAULT/gnutls.txt
The only way I see avoiding this problem is to copy the file from the desired crypto policy first and then modifying it.
so basically we have 2 different problems here:
Description of problem:
Rule configure_gnutls_tls_crypto_policy expects the old format for /etc/crypto-policies/back-ends/gnutls.config that was present in RHEL 8.
On RHEL 8, it looks like this:
However, on RHEL 9, it looks like this:
The rule expects the RHEL8 related format, it says:
During a remediation of a STIG profile, this causes that the /etc/crypto-policies/back-ends/gnutls.config is remediated to the old version and then the rule rpm_verify_hashes fails because a file owned by the crypto-policies rpm package changed.
We can see this problem very often in the testing farm CI jobs executed on CS 9 that are triggered by our PRs, for example: https://artifacts.dev.testing-farm.io/ff0ddbe2-cba3-4b6b-806e-5a8dcc176fcc/
SCAP Security Guide Version:
current upstream head as of 2022-08-03 as of HEAD cedbd31ab378a0024e055656d81df2a00c2be117
Operating System Version:
9
Steps to Reproduce:
Actual Results:
rule uses the old gnutls.config format and remediates the system to use the old gnutls.config format
Expected Results:
rule uses the new gnutls.config format and doesn't conflict with rule rpm_verify_permissions
Additional Information/Debugging Steps:
https://github.com/ComplianceAsCode/content/issues/7279