Description |
This article describes how to fix the SSL CERTIFICATE_VERIFY_FAILED error when configuring the Generic Log API Poller (HTTPS Advanced).
The Generic Log API Poller (HTTPS_Advanced) Integration permits the FortiSIEM to poll any server using HTTPS API. The API uses HTTPS protocol and in case the server you are polling is using a non-default server certificate, the SSL connection will require the server's certificate to be trusted. If the server is not trusted, the Python script of the poller (genericHttpApiPoller.py) will output the following error:
failed (Generic HTTP API Failed due to general error, failed to get events. Reason: HTTPSConnectionPool(host='example.host.name', port=443): Max retries exceeded with url: /connect/token (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)'))) |
Scope | FortiSIEM. |
Solution | To be able to communicate with the third-party server, the FortiSIEM needs to know where to find the server's certificate.
Open a SSH session on the FortiSIEM.
The second step will declare the cacert.pem in the genericHttpApiPoller.py :
As explained in the link https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification, the requests library either takes verify=False either takes a certfile. The script should now verify the server's certificate against the CA bundle and make the connection successful. |