> Source: https://docs.cyberelements.io/saas/ga/Usage/Administration/AdminConsole/ConfigurationWorkPanel/ApiKeys/

# API keys

An **API key** is the secret a program presents in order to drive CyberElements without going through the console. It is the only way to authenticate a call to the tenant's public API.

The screen allows a key to be generated, renewed and revoked, but never read back.

![](https://docs.cyberelements.io/saas/img/cyberelements/CYE_AdminConsole_Config_ApiKeys_Module.png)

> **No scope**
>
> There is **no notion of scope**: no attached permission, no restriction to a family of objects, no read-only mode. The holder of a valid key can read and write everything the public API exposes for that tenant: applications, categories, domains, virtual machines, workflows, [vault](https://docs.cyberelements.io/saas/ga/Usage/Administration/AdminConsole/MainWorkPanel/Vault/Vault/). The only means of limitation is the **list of allowed IP addresses**.

## Key owner

A key belongs to a **local administrator** of the tenant, and an owner can hold only one. A request for a second key for the same person is refused, with a pointer to renewing the existing row instead.

> **The admin account**
>
> The admin account is not in the owner list. It is deliberately excluded, including from a direct call: its key is managed on the platform side, by CyberElements, and is attached to the tenant itself. The two kinds of key coexist without interfering.

> **Delegated administrators**
>
> A delegated administrator cannot receive a key: generation and renewal are refused for them, and a key attached to one would **authenticate nothing** on the API. The screen nevertheless keeps the ability to show and revoke such a row, for inherited configurations.

## Display of the secret

The platform does not keep the key, only its fingerprint. The clear value is therefore presented **once**, in the window that follows generation or renewal, and no screen can find it again afterwards.

> **Lost key**
>
> A lost key cannot be recovered. The only solution is to **renew** (which produces a new secret and makes the old one unusable at once) or to **revoke** and recreate. Either way, any integration that was using the key stops working immediately. That is why renewal asks for confirmation when the key in place is still valid.

## Address restriction

The allowed-addresses block is **collapsed at creation**, and it is prefilled with the wildcard: a key created without opening it is usable **from anywhere**. On a key that serves a permanently installed integration, opening this block and entering the real address is the only measure that limits the consequences of a leak. This restriction is set before handing out the key.

Three entry forms are accepted: a single address, an address range, or a subnet.

> **Subnet notation**
>
> A subnet is written on the network address, in CIDR notation. `10.0.0.0/24` is accepted; `10.0.0.5/24` is **refused** rather than silently reinterpreted as the network containing it. There is no per-octet wildcard (`10.0.0.*` does not exist): only the full wildcard, which allows every address, is recognised.

> **Platform address list**
>
> A second address list exists at platform level. It is set in the server configuration, outside the console, and it applies **before** the key's own: if it is filled in, no outside address can use the API, whatever the key. A correctly configured key that still does not work should therefore be checked on that side.

## Status column

Three states are possible:

- **Valid**: the key is within its lifetime.
- **Expired**: its lifetime has run out. A lifetime of zero means *unlimited* and never produces this state.
- **Compromised**: the row no longer matches its integrity fingerprint.

> **Compromised state**
>
> This state does not mean that the key leaked. It signals that a row was **modified outside the console**, directly in the database. The platform then refuses to renew it (renewing would amount to signing the substitution): the only solution is to **revoke** and generate a new key.

> **Diagnosing an authentication refusal**
>
> Invalid fingerprint, expired key, disallowed address: all three causes produce the **same** message on the caller's side, which does not say which one applies. Diagnosis is therefore done from the screen (the key's status and its address list) rather than from the API's answer.

## Expiry reminder

A key with a limited lifetime stops working without notice. The platform can send an email reminder before the deadline, but **the setting is not in this screen**: it is in the [general options](https://docs.cyberelements.io/saas/ga/Usage/Administration/AdminConsole/ConfigurationWorkPanel/GeneralOptions/), where the reminder is enabled, the number of days of notice is set, and the [SMTP server](https://docs.cyberelements.io/saas/ga/Usage/Administration/AdminConsole/ConfigurationWorkPanel/SmtpServers/) and sender address are chosen.

> **Reminder limits**
>
> The reminder is **never** sent for a key with an unlimited lifetime; it is sent **once only** per key, with no follow-up; and the owner's address can only be resolved for a local administrator or an account from an LDAP directory: for a **SAML** or **OIDC** domain, no email goes out.

## Availability

The module **only appears if the public API has been enabled on the platform**. This is a server setting, made at installation or by the operator, not a console setting: nothing in the interface enables it, and nothing signals that it is off. The module is then absent.

> **Delegation**
>
> The module is not among the permissions a [delegated administration profile](https://docs.cyberelements.io/saas/ga/Usage/Administration/AdminConsole/ConfigurationWorkPanel/DelegatedAdminProfiles/) can grant.

## Limits

- No scope: a key gives access to everything the public API exposes for its tenant.
- One key per owner; delegated administrators are excluded.
- The secret is shown at generation and renewal only, and is never recoverable.
- Renewal invalidates the old key **immediately**, with no overlap period: a rotation without interruption is not possible.
- Revocation deletes the row: there is no history of revoked keys.
- The expiry reminder is set elsewhere, requires an SMTP server, and covers neither unlimited keys nor owners from a SAML or OIDC domain.
- Using the key itself is described in the [API guide](https://docs.cyberelements.io/saas/ga/API/APIGuide/).
