config/sysinv/sysinv/sysinv/sysinv/cert_mon
Kyle MacLeod 249c51a0fd Add timeout for get_endpoint_certificate
This commit works around the lack of a proper timeout in the
ssl.get_server_certificate() call. A proper timeout is available in
python 3.8+ (see https://bugs.python.org/issue31870).

We work around the lack of timeout by first attempting a basic socket
connection to the (host, port) with a short timeout (default: 10s). If
that is successful we can continue to fetch the server certificate;
otherwise we abandon the attempt.

Test Plan / Failure Path:

PASS: Verify proper timeout when subcloud is offline/shutdown
PASS: Verify proper behaviour when subcloud is available

Regression:
PASS: Verify feature logging

Story: 2008960
Task: 43545

Change-Id: If0f7c926e136fc776dbc74ed27b767af1af2cf80
Signed-off-by: Kyle MacLeod <kyle.macleod@windriver.com>
2021-10-13 18:54:52 -04:00
..
__init__.py Add cert-mon service 2020-07-20 14:06:31 -04:00
certificate_mon_manager.py Add timeout for get_endpoint_certificate 2021-10-13 18:54:52 -04:00
context.py Add intermediate CA cert monitor and audit 2020-08-25 13:00:01 -04:00
messaging.py Add intermediate CA cert monitor and audit 2020-08-25 13:00:01 -04:00
service.py Fix invalid admin endpoint cert during subcloud upgrade 2021-05-10 16:55:26 -04:00
subcloud_audit_queue.py Unit test covering subcloud audit plus minor bug fix 2021-09-21 10:22:48 -04:00
utils.py Add timeout for get_endpoint_certificate 2021-10-13 18:54:52 -04:00
watcher.py Optimize cert-mon token cache sizing and re-use 2021-10-08 16:25:48 -04:00