-
Notifications
You must be signed in to change notification settings - Fork 761
Use default order in configure_gnutls_tls_crypto_policy #13692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We will align the check with the default contents of the /etc/crypto-policies/back-ends/gnutls.config on RHEL 8.10 We can do this because the order doesn't matter, VERS-* priority string keywords are order-independent; gnutls always prefers the higher versions. This is easier than trying to invent some complex regular expression that accounts for ordering. Resolves: https://issues.redhat.com/browse/RHEL-1821
|
Code Climate has analyzed commit 011690e and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 61.7% (0.0% change). View more on Code Climate. |
Mab879
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to reproduce the errors from the UBI 8 Automatus tests locally. Please take look.
$ ./automatus.py rule --datastream ../build/ssg-rhel8-ds.xml --libvirt qemu:///system automatus_rhel8_10 --remediate-using ansible configure_gnutls_tls_crypto_policy
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/mburket/Developer/ComplianceAsCode/content/tests/logs/rule-custom-2025-07-11-1401/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_configure_gnutls_tls_crypto_policy
INFO - Script empty_policy.fail.sh using profile (all) OK
ERROR - Ansible playbook remediation run has exited with return code 2 instead of expected 0
ERROR - The remediation failed for rule 'xccdf_org.ssgproject.content_rule_configure_gnutls_tls_crypto_policy'.
INFO - Script incorrect_policy.fail.sh using profile (all) OK
ERROR - Ansible playbook remediation run has exited with return code 2 instead of expected 0
ERROR - The remediation failed for rule 'xccdf_org.ssgproject.content_rule_configure_gnutls_tls_crypto_policy'.
INFO - Script missing_file.fail.sh using profile (all) OK
ERROR - Ansible playbook remediation run has exited with return code 2 instead of expected 0
ERROR - The remediation failed for rule 'xccdf_org.ssgproject.content_rule_configure_gnutls_tls_crypto_policy'.
INFO - Script correct.pass.sh using profile (all) OK
|
Hi @Mab879 I can't reproduce it on my machine. When I look at the logs from the CI job the Ansible error looks like it has no connection with changes in the PR. Do you have the same errors in your logs? Here is part of |
|
@Mab879 I have created a test PR with a harmless change to trigger Automatus tests for rule configure_gnutls_crypto_policy #13722 and I see that in Automatus UBI 8 it has the same fail as here and if I go to the logs I can see the same Ansible error. It means it isn't caused by the contents of this PR. Allegedly this error is caused by Python version incompatibility between the controller (where the ansible-playbook command runs on) and the target system (in this case the UBI 8 container). I think we need to look into changing the Automatus UBI 8 configuration in general. |
|
Thanks for investigating. Looks like I had an issue with my Python config in the Automatus VM. |
We will align the check with the default contents of the /etc/crypto-policies/back-ends/gnutls.config on RHEL 8.10 We can do this because the order doesn't matter, VERS-* priority string keywords are order-independent; gnutls always prefers the higher versions. This is easier than trying to invent some complex regular expression that accounts for ordering.
Resolves: https://issues.redhat.com/browse/RHEL-1821