Imported CA Certificates not trusted by system

Description

I am operating an install with a Web Application Proxy in between. This proxy inspects outbound traffic by intercepting HTTPS connections.

This is problematic for automatic updates checking, etc since the SSL Context in middlewared will always by unable to validate a self-signed certificates.

If I take the certificates that are put into `/etc/ssl/truenas_cacerts.pem` and append them to `/etc/ssl/cert.pem` (/usr/local/share/certs/ca/ca-root-nss.crt via symlink) then everything works as expected.

I attempted to use `openssl rehash` to create hashes and add them to `/etc/ssl/certs` but that directory doesn't appear to be respected by the Python `ssl` library. When doing that, a `curl` based test begins to work.

Options I can see:
1) Make `generate_ssl_certs.py` manage adding the `/etc/ssl/truenas_cacerts.pem` to `ca-root-nss.crt). This has the issue of having to keep a copy of the original set so they can be merged and updated. This is a problem too if a `pkg install` is done to ca_root_nss.

2) See why the Python `ssl` library default context isn't using the `/etc/ssl/certs` directory and just do a hash and symlink operation. This would be idempotent.

Problem/Justification

None

Impact

None

Activity

Show:

Bug Clerk August 19, 2021 at 6:41 AM

James King July 26, 2021 at 4:17 PM

Dump added Bonnie. More than happy to jump on any call or chat to discuss.

I debated manually adding an SSLContext to all these locations but wanted to make the system trust store work correctly instead.

 

Bonnie Follweiler July 26, 2021 at 2:01 PM

Thank you for the report, .

 Can you please attach a debug file to this ticket? To generate a debug file on TrueNAS CORE, log in to the TrueNAS web interface, go to System > Advanced, then click Save Debug and wait for the file to download to your local system.

In TrueNAS SCALE, this option is in System Settings > Advanced.

Complete

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

More fields

Katalon Platform

Created July 26, 2021 at 12:33 PM
Updated July 6, 2022 at 8:58 PM
Resolved August 19, 2021 at 11:17 AM