> 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/e/ejbca-certificate-management.md).

# EJBCA Certificate Management

EJBCA is a PKI and certificate authority platform. OctoXLabs uses its REST API to add the certificates it knows, with subject, issuer, profile and expiry date, to the inventory.

## Use cases

* Track certificates that expire soon so they can be renewed in time.
* Review certificates by issuing CA and certificate profile.

## Before you begin

### Network

| Source              | Destination | Port                | Protocol                   |
| ------------------- | ----------- | ------------------- | -------------------------- |
| OctoXLabs connector | EJBCA host  | 8442 (configurable) | HTTPS (HTTP if SSL is off) |

### Required permissions

| Scope or role                                                         | Permission | Needed for         |
| --------------------------------------------------------------------- | ---------- | ------------------ |
| OAuth token accepted by EJBCA (from the identity provider EJBCA uses) | Read       | Certificate search |

Not verified: the EJBCA role or access rule needed for the certificate search endpoint.

## Create credentials in EJBCA

{% stepper %}
{% step %}

### Find the identity provider

Check which identity provider EJBCA uses for OAuth.
{% endstep %}

{% step %}

### Get a token

Get an access token from that identity provider and paste it as the API Key.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter      | Required | Type    | Default | Description                                               |
| -------------- | -------- | ------- | ------- | --------------------------------------------------------- |
| IP or Hostname | Yes      | String  | None    | IP address or host name of EJBCA.                         |
| Port           | No       | Integer | `8442`  | Port.                                                     |
| API Key        | Yes      | String  | None    | OAuth bearer token from the identity provider EJBCA uses. |
| SSL            | No       | Boolean | `True`  | Use SSL.                                                  |

## Troubleshooting

| Error message | Cause                                                             | Fix                                                   |
| ------------- | ----------------------------------------------------------------- | ----------------------------------------------------- |
| Not verified  | The connector code defines no custom error text for this adapter. | Check the credentials and network access to the host. |

## Change history

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