-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't workingdependenciesPull requests that update a dependency filePull requests that update a dependency filepythonPull requests that update Python codePull requests that update Python code
Description
Describe the bug
Self-signed certificates generated without the Subject Alternative Name (SAN) attribute are not validated by the Python requests library. This is due to stricter requirements in certificate verification.
Moreover, the requests library relies on certifi for trusted CAs, which means it does not trust self-signed certificates by default.
The requests library can be configured to use the local certificate store by setting
REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt. But, this need to be done in the supervisor's systemd config to make all supervisor services trust the self-signed certificate.
[Service]
Environment=REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crtWe should update the role to do the following:
- Add SAN attribute in the when generating self-signed certificate
- Add the self-signed certificate to the local store (copy the certificate to /usr/local/share/ca-certificate/wireguard_updater.crt and run update-ca-certificates)
- Update the supervisor's systemd setting, such that all supervisor processes trust this self-signed certificate.
P.S.: Let's double check the requirements before proceeding with the change
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdependenciesPull requests that update a dependency filePull requests that update a dependency filepythonPull requests that update Python codePull requests that update Python code
Type
Projects
Status
To do (ansible/docker)