Skip to content

Conversation

@richm
Copy link
Contributor

@richm richm commented Jul 29, 2025

https://issues.redhat.com/browse/RHEL-87511

The system_ca_certs: true flag in NM tells wpa_supplicant to load the
legacy single‑file CA bundle (historically at /etc/pki/tls/cert.pem).
Under CentOS Stream 9 (and RHEL 8), that path existed (either as a file
or a symlink to the bundle), so the default “system” loading worked.

On CentOS Stream 10 (RHEL 10), Red Hat switched to a hashed directory
trust store and removed /etc/pki/tls/cert.pem to optimize OpenSSL
performance as indicated in
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10-beta/html/10.0_beta_release_notes/removed-features
and https://issues.redhat.com/browse/RHEL-50293. wpa_supplicant's
"system_ca_certs" code still tries the old cert.pem path, sees
"No such file or directory" and aborts the TLS setup:

OpenSSL: tls_connection_ca_cert - Failed to load root certificates - No such file or directory
EAP‑TLS: Failed to initialize SSL.

Hence system_ca_certs: true silently fails on Stream 10 because
there is no longer a single‑file CA bundle at that location.

Signed-off-by: Rich Megginson rmeggins@redhat.com

Summary by Sourcery

Tests:

  • Add Ansible task to symlink the hashed trust store bundle to /etc/pki/tls/cert.pem when missing on EL10

@richm richm requested a review from liangwen12year as a code owner July 29, 2025 17:30
@sourcery-ai
Copy link

sourcery-ai bot commented Jul 29, 2025

Reviewer's Guide

Introduce a conditional shell task in the 802.1x test playbook to symlink the legacy CA bundle path on EL10, ensuring wpa_supplicant’s system_ca_certs flag can locate /etc/pki/tls/cert.pem.

File-Level Changes

Change Details Files
Add EL10-specific workaround to create /etc/pki/tls/cert.pem symlink
  • Insert a shell task guarded by a file existence check
  • Use bash with set -euxo pipefail and redirect stdout to stderr
  • Create a symlink from /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem to /etc/pki/tls/cert.pem
  • Mark the task as idempotent with changed_when: false
tests/playbooks/tests_802_1x.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @richm - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.25%. Comparing base (1b57520) to head (ddef519).
⚠️ Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #798      +/-   ##
==========================================
+ Coverage   43.11%   43.25%   +0.13%     
==========================================
  Files          12       12              
  Lines        3124     3121       -3     
==========================================
+ Hits         1347     1350       +3     
+ Misses       1777     1771       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@richm
Copy link
Contributor Author

richm commented Jul 29, 2025

[citest]

https://issues.redhat.com/browse/RHEL-87511

The `system_ca_certs: true` flag in NM tells wpa_supplicant to load the
legacy single‑file CA bundle (historically at /etc/pki/tls/cert.pem).
Under CentOS Stream 9 (and RHEL 8), that path existed (either as a file
or a symlink to the bundle), so the default “system” loading worked.

On CentOS Stream 10 (RHEL 10), Red Hat switched to a hashed directory
trust store and removed `/etc/pki/tls/cert.pem` to optimize OpenSSL
performance as indicated in
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10-beta/html/10.0_beta_release_notes/removed-features
and https://issues.redhat.com/browse/RHEL-50293. wpa_supplicant's
"system_ca_certs" code still tries the old cert.pem path, sees
"No such file or directory" and aborts the TLS setup:

```
OpenSSL: tls_connection_ca_cert - Failed to load root certificates - No such file or directory
EAP‑TLS: Failed to initialize SSL.
```

Hence `system_ca_certs: true` silently fails on Stream 10 because
there is no longer a single‑file CA bundle at that location.

The new ansible-lint does not like variables in play names.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm richm force-pushed the test-fix-802-certs branch from e7291ee to ddef519 Compare July 29, 2025 18:06
@richm
Copy link
Contributor Author

richm commented Jul 29, 2025

[citest]

@richm
Copy link
Contributor Author

richm commented Jul 30, 2025

[citest_bad]

@richm richm merged commit b10a495 into linux-system-roles:main Jul 30, 2025
43 of 48 checks passed
@richm richm deleted the test-fix-802-certs branch July 30, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant