> 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/adapters/c/certman.md).

# CertMan

CertMan is an on-premises certificate lifecycle management system with a read-only API. OctoXLabs reads its certificate inventory with validity windows and status, so that expiry can be tracked.

## Use cases

* **Track certificates that are about to expire.** Collect only active certificates by setting the Status parameter to Active, then review their expiry dates in the Certificates inventory.
* **Find expired or revoked certificates still in inventory.** Leave Status empty to collect the whole inventory, including Expired and Revoked certificates, and review them in the Certificates inventory.

## Before you begin

### Network

| Source              | Destination                             | Port                            | Protocol                 |
| ------------------- | --------------------------------------- | ------------------------------- | ------------------------ |
| OctoXLabs connector | CertMan host (IP or Hostname parameter) | 443 by default (Port parameter) | HTTPS (TLS 1.2 or newer) |

If the key is restricted to specific IP addresses, give the CertMan administrator the outbound IP address of the connector first. Requests from any other address are rejected with an access denied error.

### Required permissions

| Scope or role                   | Permission | Needed for           |
| ------------------------------- | ---------- | -------------------- |
| Integration API key (read only) | Read       | Listing certificates |

## Create credentials in CertMan

{% stepper %}
{% step %}

### Ask for an integration key

Ask your CertMan administrator to generate an integration API key. It is read only and starts with the `certman_sk_` prefix.
{% endstep %}

{% step %}

### Copy the key

Copy the key in full, without spaces. CertMan shows the key only once and stores just a digest of it, so a lost key has to be regenerated.
{% endstep %}

{% step %}

### Allow the connector IP

If the key is restricted to IP addresses, give the administrator the outbound IP address of the connector.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter      | Required | Type    | Default | Description                                                                                                              |
| -------------- | -------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |
| IP or Hostname | Yes      | String  | None    | CertMan host. The base address comes from whoever installed CertMan.                                                     |
| Port           | No       | Integer | 443     | CertMan port.                                                                                                            |
| API Key        | Yes      | String  | None    | Read-only API key. Stored as a sensitive value.                                                                          |
| Is Secure      | No       | Boolean | True    | Use SSL for HTTP requests. CertMan requires HTTPS with TLS 1.2 or newer. Advanced option.                                |
| Status         | No       | Choice  | Empty   | Collects only certificates in one state: Active, Expired, Revoked, Pending, Denied or Failed. Empty collects everything. |
| Timeout        | No       | Integer | 30      | Seconds to wait for an API response. Advanced option.                                                                    |

## Troubleshooting

| Error message                                                  | Cause                                                          | Fix                                                                              |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| Max retries exceeded for {url}                                 | CertMan kept answering 503.                                    | Run discovery again later.                                                       |
| Status Code: `, followed by URL, Method and the response body` | CertMan answered with an error status, for example 401 or 403. | Check the key, and that the connector IP is allowed if the key is IP restricted. |

## Change history

{% hint style="info" %}
Available starting from version 6.7.2.
{% endhint %}
