Loading controls...
Control: Certificates should be valid
Description
It is recommended that the certificate is not being used before the time when the certificate is valid from.
Usage
Run the control in your terminal:
steampipe check net_insights.control.ssl_certificate_valid
Snapshot and share results via Steampipe Cloud:
steampipe loginsteampipe check --share net_insights.control.ssl_certificate_valid
Plugins & Tables
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | domain_names |
| DNS domain names. |
SQL
select common_name as resource, case when now() < not_before then 'alarm' else 'ok' end as status, case when now() < not_before then common_name || ' is not yet valid.' else common_name || ' is valid.' end as reasonfrom net_certificatewhere domain in ( select jsonb_array_elements_text(to_jsonb($1 :: text [ ])) )order by common_name;