check_ssllabs: new plugin
This MR introduces check_ssllabs
, a new plugin to check the SSL Labs score of a web server, using the SSL Labs v4 API.
Example output for a new report (including verbose stderr
logging):
$ check_ssllabs -H ligo.gravity.cf.ac.uk -w B+ -e macleoddm@cardiff.ac.uk --verbose --cache 200
2024-03-18 10:45:11 | check_ssllabs | DEBUG | GET https://api.ssllabs.com/api/v4/analyze?host=ligo.gravity.cf.ac.uk&all=done&fromCache=on&maxAge=200
2024-03-18 10:45:12 | check_ssllabs | DEBUG | Analysis status is DNS
2024-03-18 10:45:12 | check_ssllabs | DEBUG | Waiting for 30 seconds...
2024-03-18 10:45:42 | check_ssllabs | DEBUG | GET https://api.ssllabs.com/api/v4/analyze?host=ligo.gravity.cf.ac.uk&all=done
2024-03-18 10:45:43 | check_ssllabs | DEBUG | Analysis status is IN_PROGRESS
2024-03-18 10:45:43 | check_ssllabs | DEBUG | Waiting for 30 seconds...
2024-03-18 10:46:13 | check_ssllabs | DEBUG | GET https://api.ssllabs.com/api/v4/analyze?host=ligo.gravity.cf.ac.uk&all=done
2024-03-18 10:46:13 | check_ssllabs | DEBUG | Analysis status is IN_PROGRESS
2024-03-18 10:46:13 | check_ssllabs | DEBUG | Waiting for 30 seconds...
2024-03-18 10:46:43 | check_ssllabs | DEBUG | GET https://api.ssllabs.com/api/v4/analyze?host=ligo.gravity.cf.ac.uk&all=done
2024-03-18 10:46:44 | check_ssllabs | DEBUG | Analysis status is READY
SSLLabs score for ligo.gravity.cf.ac.uk is 'A'
Last scan start time: 2024-03-18 10:45:12+00:00
Details: https://www.ssllabs.com/ssltest/analyze.html?d=ligo.gravity.cf.ac.uk
Example output for a cached report (executed ten minutes later):
$ check_ssllabs -H ligo.gravity.cf.ac.uk -w B+ -e macleoddm@cardiff.ac.uk --verbose --cache 200
2024-03-18 11:54:44 | check_ssllabs | DEBUG | GET https://api.ssllabs.com/api/v4/analyze?host=ligo.gravity.cf.ac.uk&all=done&fromCache=on&maxAge=200
2024-03-18 11:54:45 | check_ssllabs | DEBUG | Analysis status is READY
SSL Labs score for ligo.gravity.cf.ac.uk is 'A'
Last scan start time: 2024-03-18 10:45:12+00:00
Details: https://www.ssllabs.com/ssltest/analyze.html?d=ligo.gravity.cf.ac.uk
This would need to be plumbed into any actual dashboard instances carefully so as not to abuse the SSL Labs API, but that's a topic for another forum.
cc @warren-anderson @satyanarayan.raypitambarmohapatra @philippe.grassia
Edited by Duncan Macleod