> Source: https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/SitesAndGateways/Gateways/

# Gateways management

An **Edge Gateway** is the machine through which an access reaches its target. It is installed on the network side where the servers to be reached are, it pairs with the **Mediation Controller**, and it is the one that establishes the flow to the intended machine.

This module is used to declare Edge Gateways and their pairing. It does not attach them to [sites](https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/SitesAndGateways/Sites/): that attachment is done from Sites management, and a gateway not activated there serves no session.

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

## Pairing and token

Declaring an Edge Gateway in the console merely creates an entry. What actually binds it to the platform is a **pairing token**, to be entered when the gateway is installed.

That token is **not** created systematically: it is only created if the *Create a pairing token* box was ticked **and** a gateway certificate was supplied. Without a certificate, saving creates the entry and nothing else.

> **Token shown once**
>
> The window that presents the token offers only two actions, copy or close, and does not reopen. The token then remains readable when editing, in a read-only **Authentication Token** field, but **only while the gateway is awaiting pairing**.

> **Token consumption**
>
> On the gateway's first successful connection, the platform destroys the token and the gateway switches from *awaiting pairing* to *online*. No action is needed to close the pairing, and nothing is to be revoked afterwards.

### Expected certificate CN

The expected CN differs depending on the certificate. This is the most common cause of a pairing failure, and the screen does not indicate it.

- The **gateway certificate** must carry the CN `<gateway name>@<organization>`.
- The **recording certificate** must carry the **FQDN** entered in the form. It must also allow **TLS server use**: without it, the sessions of [privileged Isolate (Web)](https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/Applications/PrivilegedApplications/IsolateWebPrivileged/) applications, recorded through that Edge Gateway, fail. The console reports it when the Docker server configuration is saved, naming the Edge Gateways concerned.

A CN that does not match makes saving fail, with a message giving both the CN found and the CN expected.

## Gateway type

The **Type** column of the list reads **With recording** or **Basic**. This is not a setting: no field of the form determines it.

The platform **detects** it. After a gateway connects, it queries the recording component on the machine; if it answers, the gateway is *With recording*, otherwise it is *Basic*. The test is triggered after a random delay, so as not to saturate the Mediation Controller during grouped reconnections.

> **Type shown after connection**
>
> The result is not delivered at the instant of connection: a freshly connected gateway may read *Basic* for a while. Concluding too early that a gateway lacks the recording capability leads to an unnecessary reinstallation.

### Features depending on the recording capability

- **Privileged applications** are only served by a *With recording* gateway. A site carrying none serves no privileged access.
- The **SMB** and **netBIOS** standard applications require one too, although they record nothing.
- An [LDAP authentication domain](https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/AuthenticationDomains/LDAPDirectory/) attached to a **site** reaches the directory through a gateway of that site, and that choice too is made among *With recording* gateways only.
- The **Download recording certificate** button is enabled only on a gateway that is both **online** and *With recording*.
- In [RDS servers management](https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/Applications/RDSServers/), the toolbar only offers *With recording* gateways.

> **LDAP domain and Basic gateways**
>
> A site carrying only *Basic* gateways cannot serve an [authentication domain](https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/AuthenticationDomains/AuthenticationDomains/) attached to it. It is then no longer one access failing, but the **authentication** of every user of that domain.

## Archive paths

Two local paths indicate where the gateway stores its recordings: on one side the videos of all the privileged applications recorded as video (RDP, VNC, Web, reverse proxy, virtual desktop), on the other the SSH sessions.

They do **not** appear on creation. They can only be set when editing, on a gateway recognised as *With recording*, and they are greyed out while it is offline: the console has to reach the gateway in order to apply the change.

Each path is an **absolute** path, with no space and no `.` or `..` segment (for example `/var/lib/ipdiva/carerecord/archives`): the console refuses any other format.

> **Changing an archive path**
>
> The console warns that the old videos will no longer be accessible and asks for confirmation. It actually takes a precaution: the recordings already made are explicitly given the **old** path, so that they stay readable. On the other hand, the other online gateways that report exactly the same paths (the case of gateways installed on the same machine) have their configuration updated **at the same time**, with no request and no notification.

## Edge Gateway name

The name is limited to 50 characters and only accepts **unaccented letters, digits, the hyphen, the dot and the underscore**. No space, no bracket, no accent, no slash.

> **Naming rule**
>
> Accents, brackets, the space and the slash were accepted in earlier versions; they no longer are.

## Edge Gateway deletion

Three situations prevent deletion, and **the message is the same in all three cases** ("The following gateway is currently being used"):

- the gateway is *ACTIVE* or *PASSIVE* in at least one [site](https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/SitesAndGateways/Sites/);
- an [SSH direct recording configuration](https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/DirectAccess/SshDirectRecordings/) designates it;
- an [LDAP authentication domain](https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/AuthenticationDomains/LDAPDirectory/) designates it as its gateway to the directory.

> **Causes of a deletion refusal**
>
> The message points at sites, but the cause may lie elsewhere: a gateway switched to *UNUSED* in every site may still resist deletion, because of one of the two other causes. Nothing on screen tells them apart.

A multiple deletion is partial by design: free gateways are deleted, the others stay, and the message names the latter.

Deletion unregisters the gateway from the platform router, cuts its connection and destroys its pairing token. The software itself stays installed on the machine.

## Limits

- An Edge Gateway is attached to a site only from [Sites management](https://docs.cyberelements.io/saas/Usage/Administration/AdminConsole/MainWorkPanel/SitesAndGateways/Sites/).
- The recording capability cannot be forced: it is observed.
- Archive paths can be set neither on creation nor on an offline gateway.

---

The field-level detail is described in the [module reference](https://docs.cyberelements.io/saas/Usage/AdminConsoleReference/Gateways/).

The API endpoints that drive this object are described in the [API reference](https://docs.cyberelements.io/saas/API/APIGuide/#get-/publicapi/-org-/gateways/).
