> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/documentation/use-octoxlabs/inventories/certificates.md).

# Certificates

Track your certificates and their expiry status, from adapters and from certificate files that you upload yourself.

### Track your certificates and their expiry status, from adapters and from certificate files that you upload yourself." icon: certificate

The Certificate Inventory lists the certificates that your adapters found, with the subject, the issuer, the type and the dates of each one, and an expiry status that tells you which ones need attention. Use it to catch certificates before they expire, to find weak signature algorithms, and to track certificates that no adapter reports by uploading them yourself. The console page is called **Certificate Inventory** and its menu entry is **Certificates**.

### Where the data comes from

Two kinds of records share the inventory:

* **Adapter certificates.** Adapters that report certificates add one record per certificate. A certificate is identified by its name, and records of different adapters are not merged, see Discovery and Aggregation.
* **Custom certificates.** Certificates that you upload yourself. They are written to the inventory at the next discovery and show the **octoxlabs-certificate** adapter.

### Open the inventory

In the left menu, choose **Inventories** > **Certificates**. The list opens on the latest completed discovery, and **Discovery Date** lets you look at an earlier run. The toolbar, the chart strip and the query box work as described in Inventories. Under **Certificates** in the menu you also find **Custom Certificate**, **Saved Queries** and **Tags**.

### Columns

The default columns are below. `Name` is fixed and opens the detail page. Use **Columns** > **Edit Columns** to add more and **Reset Columns** to return to this set.

| Column                      | What it shows                                                                                |
| --------------------------- | -------------------------------------------------------------------------------------------- |
| `Adapters`                  | The adapter that reported the certificate. Custom certificates show `octoxlabs-certificate`. |
| `Name`                      | The certificate name.                                                                        |
| `SubjectCN`                 | The common names of the subject. A certificate for several domains lists them all.           |
| `IssuerCN`                  | The common name of the issuer.                                                               |
| `CertificateType`           | The certificate type, for example **Wildcard Certificate** or **Server Certificate**.        |
| `CreatedDate`, `ExpiryDate` | When the certificate became valid and when it expires.                                       |
| `ExpiryStatus`              | The expiry status as a colored tag. See below.                                               |
| `SignatureAlgorithm`        | The signature algorithm.                                                                     |

#### Expiry status

OctoXLabs recalculates the status of every certificate during each discovery that covers certificates. In queries the status is the lower case word, for example `ExpiryStatus = expired`. The thresholds depend on the lifetime of the certificate, which is the time between `CreatedDate` and `ExpiryDate`.

| Status       | When it applies                                                                                           |
| ------------ | --------------------------------------------------------------------------------------------------------- |
| **Good**     | More time is left than the warning threshold.                                                             |
| **Warning**  | The days left are at or below the warning threshold: one tenth of the lifetime, but at most 90 days.      |
| **Critical** | The days left are at or below the critical threshold: one twentieth of the lifetime, but at most 30 days. |
| **Expired**  | The expiry date has passed.                                                                               |
| **Unknown**  | The certificate has no expiry date.                                                                       |

If a certificate has no created date, the thresholds are 90 days for **Warning** and 30 days for **Critical**. As an example, a certificate valid for one year becomes **Warning** 36 days before it expires, and **Critical** 18 days before.

### Filter and search

Type a query or build one with **Query Wizard**. Clicking a value in one of these columns adds it to the query: `Tags`, `SubjectCN`, `IssuerCN`, `CertificateType`, `ExpiryStatus` and `SignatureAlgorithm`.

```
ExpiryStatus = expired AND ExpiryDate last now-3d/d
```

All fields and operators are in the OctoXLabs Query Reference.

### Actions

* **Actions** > **Add Tag** tags the certificates you selected. This is the only bulk action on the page.
* **Download** creates a report of the current query and columns as **CSV**, **PDF** or **XLSX**. The report is built in the background and appears under **Reports**. See Generate a Report.
* To chart expiry, use the **Certificate Expiry Status** widget, described in the Chart and Widget Reference.

### Upload your own certificates

Use custom certificates for certificates that no adapter reports. Open **Inventories** > **Certificates** > **Custom Certificate**. The list shows the **Subject CN**, **Certificate Name**, **Description**, **Issuer CN**, **Certificate Type**, **Created Date**, **Expiry Date** and **Signature Algorithm** of each custom certificate. Each row has edit and delete actions, and a certificate name must be unique.

Choose **Upload**, then **Single Upload** or **Multiple Upload**.

{% tabs %}
{% tab title="Single upload" %}
Use this for one certificate. OctoXLabs reads the details from the file for you, or you can type them.

{% stepper %}
{% step %}

#### Select the certificate file

Under **Upload Certificate to Fill Form**, choose a file in the **.pem**, **.cer**, **.der**, **.pfx** or **.p12** format. For a **.pfx** or **.p12** file, enter the **Password**.
{% endstep %}

{% step %}

#### Decode the file

Choose **Decode**. OctoXLabs fills **Issuer CN**, **Signature Algorithm**, **Created Date**, **Expiry Date** and **Subject CN** from the file. If the password is wrong or the PFX or P12 file is damaged, the decode fails and the form stays empty.
{% endstep %}

{% step %}

#### Complete and save

Under **Certificate Details**, enter the **Certificate Name**, pick the **Certificate Type**, add a **Description** if you like, and check the other fields. **Subject CN** takes several values separated with commas. Save the form.
{% endstep %}
{% endstepper %}

OctoXLabs keeps only these details. It does not store the certificate file or its password.
{% endtab %}

{% tab title="Multiple upload" %}
Use this for many certificates at once. It is available since OctoXLabs 6.2.0.

* Put the certificates in one ZIP file. All files in the ZIP must be of the same type (except PFX) and in a format that single upload supports. The ZIP must not contain password-protected PFX files. Unsupported or invalid files are skipped.
* Choose **Multiple Upload**, select the ZIP under **Certificate Upload**, and choose **Upload**. The upload runs in the background. A notification tells you when it completes, or completes with errors. See **System Activities** for the details of failed files.
* Each certificate is named after its file, without the extension, and gets the type **Custom Certificate**. If a custom certificate with that name exists, it is updated.
  {% endtab %}
  {% endtabs %}

Custom certificates appear in the inventory after the next discovery.

<details>

<summary>Certificate types you can choose</summary>

Edge Certificate, Origin CA Certificate, Custom Certificate, Universal Certificate, Root Certificate, Intermediate Certificate, Self-signed Certificate, Server Certificate, Client Certificate, Code Signing Certificate, Email / S-MIME Certificate, Document Signing Certificate, Domain Validation (DV) Certificate, Organization Validation (OV) Certificate, Extended Validation (EV) Certificate, Wildcard Certificate, Multi-domain / SAN Certificate and Unknown Certificate.

</details>

### The certificate detail page

Click a certificate name to open it. The cards at the top show:

* **Certificate Name**, **Signature Algorithm** and **Certificate Type**.
* **Source**, the adapter, with the **Subject CN** and the **Issuer CN**.
* **Number of Days Remaining** (or **Expired**), **Created Date** and **Expiry Date**.
* Tags and notes for the certificate.

Below the cards, choose **Pretty View**, **Raw** or **Dependency Map**. The tabs show the merged **OctoXLabs** view and the data of the reporting adapter. The **Discovery Date** selector shows the certificate as it was in an earlier discovery.

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Licence Inventory</strong></td><td>Track license expiry and usage.</td><td></td></tr><tr><td><strong>Domain Inventory</strong></td><td>Domain and DNS records.</td><td></td></tr><tr><td><strong>Add an SSL Certificate</strong></td><td>Install a certificate on the OctoXLabs console itself.</td><td></td></tr><tr><td><strong>Create and Save Queries</strong></td><td>Save a query for certificates that are about to expire.</td><td></td></tr></tbody></table>
