turbot/steampipe-mod-net-insights

Dashboard: SSL Certificate Report

A server certificate is a digital certificate issued to the server for two main purposes – to authenticate the server's identity and create a secure communication channel with the client.

This report answers the following questions:

  • Is the certificate valid?
  • How long is the certificate valid?
  • Is the certificate self-signed?
  • Was the certificate revoked by the certificate authority?
  • Is the certificate using any insecure certificate algorithms?
  • Are there any additional certificates?
This dashboard contains 1 input and 3 tables.

Usage

Install the mod:

mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-net-insights

Start the Powerpipe server:

steampipe service start
powerpipe server

Open http://localhost:9033 in your browser and select SSL Certificate Report dashboard.

You could also snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe dashboard run net_insights.dashboard.ssl_certificate_report --share

Queries

This dashboard uses the the following queries:
select
c ->> 'common_name' as "Common Name",
TO_CHAR((c ->> 'not_before')::timestamp, 'Dy, DD Mon YYYY HH24:MI:SS TZ') as "Valid From",
TO_CHAR((c ->> 'not_after')::timestamp, 'Dy, DD Mon YYYY HH24:MI:SS TZ') || ' (expires in ' || date_trunc('day', age((c ->> 'not_after')::timestamp, now())) || ')' as "Valid Until",
c ->> 'public_key_algorithm' || ' ' || (c ->> 'public_key_length')::text || ' bits' as "Key",
c ->> 'issuer_name' as "Issuer",
c ->> 'signature_algorithm' as "Signature Algorithm"
from
net_certificate,
jsonb_array_elements(chain) as c
where
domain = $1
order by domain;
{
"$1": "domain_input"
}

Tags