Loading controls...
Control: Ensure certificates have sufficient hostname coverage
Description
It is recommended that your certificates cover all the names you wish to use with a site, since you cannot control how your users arrive at the site or how others link to it. Make sure you have added all the necessary domain names to certificate's Subject Alternative Name (SAN).
Usage
Run the control in your terminal:
steampipe check net_insights.control.ssl_certificate_multiple_hostname
Snapshot and share results via Steampipe Cloud:
steampipe loginsteampipe check --share net_insights.control.ssl_certificate_multiple_hostname
Plugins & Tables
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | domain_names |
| DNS domain names. |
SQL
select common_name as resource, case when jsonb_array_length(dns_names) > 1 then 'ok' else 'alarm' end as status, case when jsonb_array_length(dns_names) > 1 then common_name || ' has sufficient hostname coverage.' else common_name || ' don''t have sufficient hostname coverage.' end as reasonfrom net_certificatewhere domain in ( select jsonb_array_elements_text(to_jsonb($1 :: text [ ])) )order by common_name;