> Source: https://docs.cyberelements.io/bastion/4.7/lt/Installation/MediationController/Prerequisites/

# Prerequisites of the Mediation Controller

The prerequisites of the Mediation Controller depend on the architecture of the platform: Standalone, Cluster or multi-node. Each section below details them for each architecture.

## Machine

Both physical and virtual machines can be used to install CyberElements Bastion.
The product does not perform any virtualisation, so the embedded virtualisation option does not need to be enabled for virtual machines.

### OS

CyberElements Bastion 4.7 runs on 64-bit Debian 13 (Trixie) machines.
It is recommended to use machines without a graphical interface and to limit the installed components to the SSH server: in the software selection screen of the Debian installer, keep only `SSH server` checked (`standard system utilities` is checked by default).

> **Information**
>
> Version 4.7 no longer runs on Debian 12 (Bookworm). A platform installed in version 4.6 moves to Debian 13 during its [version upgrade](https://docs.cyberelements.io/bastion/4.7/lt/Upgrade/Introduction/).

> **Recommendation**
>
> The security hardening guide details the minimal Debian installation, the follow-up of the Debian version and of its security maintenance, and the removal of the packages installed by default: see [R1](https://docs.cyberelements.io/bastion/4.7/lt/Security/SystemHardening/SystemInstallation/#r1), [R2](https://docs.cyberelements.io/bastion/4.7/lt/Security/SystemHardening/SystemInstallation/#r2) and [R4](https://docs.cyberelements.io/bastion/4.7/lt/Security/SystemHardening/SystemInstallation/#r4).

### CPU

A CPU with 4 cores will cover most use cases for the product.

### RAM

> **Attention**
>
> The RAM values given below are indicative only, as there are many variables that can affect RAM consumption (product features used or elements installed in parallel with the product on the machine).

RAM consumption generally depends on the number of simultaneous users that the platform can accommodate:

- Between 1 and 5 simultaneous users: 2 GB of RAM minimum, 4 GB recommended.
- Between 5 and 20 simultaneous users: 4 GB of RAM minimum.
- For 20 or more simultaneous users: 8 GB of RAM minimum.

### Disk

This server will have increasing volume in the following directories:

- `/var/log/`: directory containing the various system logs.
- `/var/lib/postgresql/17/main/`: directory containing local database data.
- `/var/ipdiva/`: directory containing product-specific data.

Isolating the different directories in different partitions is not mandatory but recommended. You can follow these instructions:

| Mount point | Options | Minimum size (GB) |
|---|---|---|
| `/boot` | nosuid,nodev,noexec | 1 |
| `/opt` | nosuid,nodev | 2 |
| `/tmp` | nosuid,nodev | 4 |
| `/srv` | nosuid,nodev | 1 |
| `/home` | nosuid,nodev,noexec | 6 |
| `/usr` | nodev | 6 |
| `/var` | nosuid | 5 |
| `/var/log` | nosuid,nodev,noexec | 5 |
| `/var/tmp` | nosuid,nodev,noexec | 2 |
| `swap` | No option | Depending on RAM (half less) |
| `/` | No option | 2 GB or more depending on the available disk space |

> **Example**
>
> For a server with 4 GB of RAM (which requires 2 GB of `swap`), the disk space required with the previous partitioning is a minimum of 36 GB.

> **Recommendation**
>
> The security hardening guide proposes a reference partitioning with its mount options, which differs on some points from the table above: see [R3](https://docs.cyberelements.io/bastion/4.7/lt/Security/SystemHardening/SystemInstallation/#r3).

## Network

> **Recommendation**
>
> The security hardening guide details the local firewall rules to be applied to these flows: see [Local firewall](https://docs.cyberelements.io/bastion/4.7/lt/Security/LocalFirewall/).

### Standalone platform

A CyberElements Bastion Standalone platform will require:

- 2 IP addresses for the Mediation Controller server (carried by the same network interface)

The Mediation Controller server is usually placed in a DMZ, but it can also be placed in a private DMZ or hosted on a public cloud. This will depend on the platform's use case (for example: remote access for service providers or securing internal access to protected areas).

> **Information**
>
> The security hardening guide states the recommended network placement. The Mediation Controller can be exposed directly on the Internet through a public IP address; CyberElements nevertheless recommends installing it in a DMZ, public or with private addressing (in the latter case the necessary ports are published through NAT rules configured on the perimeter firewall or router). The Edge Gateway requires no direct Internet access in operation and no inbound access from the Internet; a limited access may be authorised during maintenance operations.

To better identify the different machine addresses, they will be referred to as follows in the documentation:

| IP address name | Signification |
|---|---|
| `IP_MC_WEB` | Primary IP address of the Mediation Controller server, which enables access to web consoles. |
| `IP_MC_SSL` | Second IP address of the Mediation Controller server used by the SSL Router component. |

> **Information**
>
> Although both flows use TCP port 443, they are generally carried by **distinct logical interfaces or IP addresses**: an application interface, which carries the flows the server needs to work (HTTPS, SSH, DNS, NTP, SMTP, access to the APT repositories) and an interface dedicated to the SSL Router used by the Edge Gateways to establish the VPN/SSL tunnel with the Mediation Controller.

> **Information**
>
> The flow information shown assumes that the Mediation Controller server is located in the DMZ and that the Edge Gateway server also has the HTML5 Gateway role located in the LAN.

**WAN to DMZ flow**

> The IP addresses of the Mediation Controller can either be public IP addresses directly assigned to the Mediation Controller server or public IP addresses that are NATed to private IP addresses (recommended).
>
> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | User workstation | `IP_MC_WEB` | TCP 443 (if using the standard port) | Allow access to web consoles and applications running directly in the browser. |
> | User workstation | `IP_MC_SSL` | TCP 443 (if using the standard port) | Establish a TLS tunnel to encrypt the flow passing through the CyberElements Bastion client. |
> | `IP_GW` | `IP_MC_WEB` | TCP 443 (if using the standard port) | When the Edge Gateway is located on a remote network. Connection to the Edge Gateway pairing system. |
> | `IP_GW` | `IP_MC_SSL` | TCP 443 (if using the standard port) | When the Edge Gateway is located on a remote network. Connect to the SSL Router to establish a TLSv1.3 tunnel and route product communications through it. |

**DMZ to WAN flow**

> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | `IP_MC_WEB` | Debian repositories | TCP 80 | Required for installing CyberElements Bastion dependencies and keeping the system up to date. The documentation and virtual appliances use `ftp.fr.debian.org` and `security.debian.org`. |
> | `IP_MC_WEB` | `packages.microsoft.com` | TCP 443 | Microsoft repository for installing and updating MS SQL drivers. Only required if access to an MS SQL database is desired (virtual appliances have MS SQL drivers). |
> | `IP_MC_WEB` | NTP time server | UDP 123 | Optional if the server needs to synchronise its clock with a server in the DMZ. By default, the Debian pools are used: `0.debian.pool.ntp.org`, `1.debian.pool.ntp.org`, `2.debian.pool.ntp.org` and `3.debian.pool.ntp.org`. |
> | `IP_MC_WEB` | SMTP server | TCP 25, 465, 587 | Required if an SMTP server must be used for sending emails and is located in the WAN. |
> | `IP_MC_WEB` | DNS server | UDP 53 | Required for DNS resolution. It can be located in the WAN or DMZ. |
> | `IP_MC_WEB` | `api.neomia.ai` | TCP 443 | (Optional) Connection to the APIs of the [Neomia Pulse](https://docs.cyberelements.io/bastion/4.7/lt/Integration/MFA/NeomiaPulseIntegration/) behavioural biometric MFA product. |
> | `IP_MC_WEB` | EU: `keepersecurity.eu` US: `keepersecurity.com` AU: `keepersecurity.com.au` CA: `keepersecurity.ca` JP: `keepersecurity.jp` | TCP 443 | (Optional) Connection to the [Keeper EPM](https://docs.cyberelements.io/bastion/4.7/lt/Integration/Vault/KeeperSecurityIntegration/) vault depending on its location. |
> | `IP_MC_WEB` | Address of the LockSelf instance | TCP 443 | (Optional) Connection to the [LockSelf](https://docs.cyberelements.io/bastion/4.7/lt/Usage/Administration/AdminConsole/MainWorkPanel/Vault/LockSelf/LockSelfVault/) vault. |
> | `IP_MC_WEB` | EU: `identity.bitwarden.eu`, `api.bitwarden.eu` US: `identity.bitwarden.com`, `api.bitwarden.com` Self-hosted: address of the server | TCP 443 | (Optional) Connection to the [Bitwarden](https://docs.cyberelements.io/bastion/4.7/lt/Usage/Administration/AdminConsole/MainWorkPanel/Vault/Bitwarden/BitwardenVault/) vault depending on its location. |

**DMZ to DMZ flow**

> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | `IP_MC_WEB` | NTP time server | UDP 123 | If the server needs to synchronise its clock with a server in the DMZ. |
> | `IP_MC_WEB` | SMTP server | TCP 25, 465, 587 | Required if an SMTP server must be used for sending emails and is located in the DMZ. |
> | `IP_MC_WEB` | Database server | TCP 1433, 5432, or any other custom port | Required if you want to use an external database located in the DMZ. |
> | `IP_MC_WEB` | DNS server | UDP 53 | Required for DNS resolution. It can be located in the DMZ or the WAN. |
> | `IP_MC_WEB` | `IP_HTML5_GW` | TCP 8080 | Required if an HTML5 Gateway is installed on a [dedicated Debian server](https://docs.cyberelements.io/bastion/4.7/lt/Installation/HTML5Gateway/InstallDebian/) in the DMZ: connection of the Mediation Controller to its HTML5 service. |

**LAN to DMZ flow**

> | Source(s) | Destination(s) | Destination port | Comments |
> |---|---|---|---|
> | `IP_GW` `IP_HTML5_GW` | `IP_MC_WEB` | TCP 443 (if using the standard port) | Connection to the Edge Gateway pairing system. |
> | `IP_GW` `IP_HTML5_GW` | `IP_MC_SSL` | TCP 443 (if using the standard port) | Connection to the SSL Router to establish a TLSv1.3 tunnel and route product communications through it. |
> | Client workstation | `IP_MC_WEB` | TCP 443 (if using the standard port) | Connection to the product's various web consoles. |
> | Client workstation | `IP_MC_SSL` | TCP 443 (if using the standard port) | Establish a TLS tunnel to encrypt the flow passing through the CyberElements Bastion client. |
> | Administrator workstation | `IP_MC_WEB` | TCP 22 | SSH connection to the Mediation Controller server. |

> **Information**
>
> A firewall or a router placed upstream and performing deep packet inspection (DPI) or protection against distributed denial-of-service (DDoS) attacks strengthens overall security. That device must not, however, alter the SSL/TLS packets used by the product.

> **Information**
>
> The flows towards the Debian repositories belong to **maintenance** operations, and are distinguished from the flows required in operation. Network devices generally filter on IP addresses rather than on domain names; since the addresses of the repositories and of the external services may change over time, a fresh DNS resolution should be performed regularly so as to check that the filtering rules remain consistent with the addresses actually used.

> **Recommendation**
>
> Where the historical non-standard port **22123** is kept in a Standalone architecture, that choice must be documented and reflected in the filtering rules and in the administration procedures: see [R29](https://docs.cyberelements.io/bastion/4.7/lt/Security/Ssh/#r29).

### Cluster platform

A CyberElements Bastion Cluster platform will require:

- 2 real IP addresses per Mediation Controller server (carried by the same network interface)
- 3 virtual IP addresses for the cluster to function

> **Additional information**
>
> The real and virtual IP addresses of the Mediation Controller servers must all belong to the same subnet.

> **Incompatibilities with the use of virtual IPs**
>
> Virtual IPs have load balancing managed with IPVS (IP Virtual Server).
> Load balancing requires several prerequisites to function properly:
>
> - Disable Reverse Path Forwarding (RPF) features for Mediation Controllers and IPs carried by these machines.
> - On VMware, the `VMXNET3` network adapter, the one of the Cluster virtual appliances, and the `E1000E` adapter are both suitable for the Mediation Controller servers.

Mediation Controller servers are usually placed in a DMZ, but they can also be placed in a private DMZ or hosted on a public cloud. This will depend on the platform's use case (for example: remote access for service providers or securing internal access to protected areas).

> **Information**
>
> The security hardening guide states the recommended network placement. The Mediation Controller can be exposed directly on the Internet through a public IP address; CyberElements nevertheless recommends installing it in a DMZ, public or with private addressing (in the latter case the necessary ports are published through NAT rules configured on the perimeter firewall or router). The Edge Gateway requires no direct Internet access in operation and no inbound access from the Internet; a limited access may be authorised during maintenance operations.

To better identify the different machine addresses, they will be referred to as follows in the documentation:

| :------------------ | :------------ | | `RIP_MC_WEB_MASTER` | Primary IP address of the MASTER Mediation Controller server, which provides access to the Web consoles. | | `RIP_MC_WEB_SLAVE` | Primary IP address of the SLAVE Mediation Controller server, which provides access to the Web consoles. | | `RIP_MC_SSL_MASTER` | Second IP address of the MASTER Mediation Controller server used by the SSL Router component. | | `RIP_MC_SSL_SLAVE` | Second IP address of the SLAVE Mediation Controller server used by the SSL Router component. | | `VIP_MC_WEB` | Virtual IP address of the Mediation Controller cluster, which provides access to the web consoles. | | `VIP_MC_SSL` | Virtual IP address of the Mediation Controller cluster, which provides access to the SSL Router. | | `VIP_MC_ZEO` | Virtual IP address of the Mediation Controller cluster, enabling access to an internal product configuration database. |

> **Information**
>
> Although both flows use TCP port 443, they are generally carried by **distinct logical interfaces or IP addresses**: an application interface, which carries the flows the server needs to work (HTTPS, SSH, DNS, NTP, SMTP, access to the APT repositories) and an interface dedicated to the SSL Router used by the Edge Gateways to establish the VPN/SSL tunnel with the Mediation Controller.

> **Information**
>
> The flow information provided assumes that the Mediation Controller servers are located in the DMZ and that the Edge Gateway servers, which also act as HTML5 Gateways, are located in the LAN.

**WAN to DMZ flow**

> The IP addresses of the Mediation Controller can either be public IP addresses directly assigned to the Mediation Controller server or public IP addresses that are NATed to private IP addresses (recommended).
>
> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | User workstation | `VIP_MC_WEB` | TCP 443 (if using the standard port) | Allow access to web consoles and applications running directly in the browser. |
> | User workstation | `VIP_MC_SSL` | TCP 443 (if using the standard port) | Establish a TLS tunnel to encrypt the flow passing through the CyberElements Bastion client. |
> | `IP_GW` | `VIP_MC_WEB` | TCP 443 (if using the standard port) | When the Edge Gateway is located on a remote network. Connection to the Edge Gateway pairing system. |
> | `IP_GW` | `VIP_MC_SSL` | TCP 443 (if using the standard port) | When the Edge Gateway is located on a remote network. Connection to the SSL Router to establish a TLSv1.3 tunnel and route product communications through it. |

**DMZ to WAN flow**

> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | Debian repositories | TCP 80 | Required for installing dependencies for CyberElements Bastion and for keeping the system up to date. The documentation and virtual appliances use `ftp.fr.debian.org` and `security.debian.org`. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | `packages.microsoft.com` | TCP 443 | Microsoft repository for installing and updating MS SQL drivers. Only required if access to an MS SQL database is desired (virtual appliances have MS SQL drivers). |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | NTP time server | UDP 123 | Optional if the server needs to synchronise its clock with a server in the DMZ. By default, the Debian pools are used: `0.debian.pool.ntp.org`, `1.debian.pool.ntp.org`, `2.debian.pool.ntp.org` and `3.debian.pool.ntp.org`. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | SMTP server | TCP 25, 465, 587 | Required if an SMTP server must be used for sending emails and is located in the WAN. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | DNS server | UDP 53 | Required for DNS resolution. It can be located in the WAN or DMZ. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | `api.neomia.ai` | TCP 443 | (Optional) Connection to the MFA product’s APIs using behavioural biometrics [Neomia Pulse](https://docs.cyberelements.io/bastion/4.7/lt/Integration/MFA/NeomiaPulseIntegration/). |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | EU: `keepersecurity.eu` US: `keepersecurity.com` AU: `keepersecurity.com.au` CA: `keepersecurity.ca` JP: `keepersecurity.jp` | TCP 443 | (Optional) Connection to the vault [Keeper EPM](https://docs.cyberelements.io/bastion/4.7/lt/Integration/Vault/KeeperSecurityIntegration/) depending on its location. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | Address of the LockSelf instance | TCP 443 | (Optional) Connection to the [LockSelf](https://docs.cyberelements.io/bastion/4.7/lt/Usage/Administration/AdminConsole/MainWorkPanel/Vault/LockSelf/LockSelfVault/) vault. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | EU: `identity.bitwarden.eu`, `api.bitwarden.eu` US: `identity.bitwarden.com`, `api.bitwarden.com` Self-hosted: address of the server | TCP 443 | (Optional) Connection to the [Bitwarden](https://docs.cyberelements.io/bastion/4.7/lt/Usage/Administration/AdminConsole/MainWorkPanel/Vault/Bitwarden/BitwardenVault/) vault depending on its location. |

**DMZ to DMZ flow**

> > **Additional information**
> >
> > Mediation Controller servers must be able to communicate with each other from and to any of their addresses, regardless of the protocol.
>
> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | NTP time server | UDP 123 | If the server needs to synchronise its clock with a server in the DMZ. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | SMTP server | TCP 25, 465, 587 | Required if an SMTP server must be used for sending emails and is located in the DMZ. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | Database server | TCP 1433, 5432, or any other custom port | Required if you want to use an external database located in the DMZ. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | DNS server | UDP 53 | Required for DNS resolution. It can be located in the DMZ or the WAN. |
> | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | `IP_HTML5_GW` | TCP 8080 | Required if an HTML5 Gateway is installed on a [dedicated Debian server](https://docs.cyberelements.io/bastion/4.7/lt/Installation/HTML5Gateway/InstallDebian/) in the DMZ: connection of the Mediation Controller to its HTML5 service. |

**LAN to DMZ flow**

> | Source(s) | Destination | Destination port | Comments |
> |---|---|---|---|
> | `IP_GW` `IP_HTML5_GW` | `VIP_MC_WEB` `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | TCP 443 (if using the standard port) | Connection to the Edge Gateway pairing system. |
> | `IP_GW` `IP_HTML5_GW` | `VIP_MC_SSL` `RIP_MC_SSL_MASTER` `RIP_MC_SSL_SLAVE` | TCP 443 (if using the standard port) | Connection to the SSL Router to establish a TLSv1.3 tunnel and route product communications through it. |
> | Client workstation | `VIP_MC_WEB` `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | TCP 443 (if using the standard port) | Connection to the product's various web consoles. |
> | Client workstation | `VIP_MC_SSL` `RIP_MC_SSL_MASTER` `RIP_MC_SSL_SLAVE` | TCP 443 (if using the standard port) | Establish a TLS tunnel to encrypt the flow passing through the CyberElements Bastion client. |
> | Administrator workstation | `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | TCP 22 | SSH connection to the Mediation Controller server. |

> **Information**
>
> A firewall or a router placed upstream and performing deep packet inspection (DPI) or protection against distributed denial-of-service (DDoS) attacks strengthens overall security. That device must not, however, alter the SSL/TLS packets used by the product.

> **Information**
>
> The flows towards the Debian repositories belong to **maintenance** operations, and are distinguished from the flows required in operation. Network devices generally filter on IP addresses rather than on domain names; since the addresses of the repositories and of the external services may change over time, a fresh DNS resolution should be performed regularly so as to check that the filtering rules remain consistent with the addresses actually used.

> **Recommendation**
>
> Where the historical non-standard port **22123** is kept in a Standalone architecture, that choice must be documented and reflected in the filtering rules and in the administration procedures: see [R29](https://docs.cyberelements.io/bastion/4.7/lt/Security/Ssh/#r29).

### Multi-node platform

Each node meets the network prerequisites of a [Standalone platform](#network-standalone), with the following addition:

- each node connects to the other nodes over SSH (`TCP 22`, or the port of the SSH service if it was changed) and to the database server. Local firewall rules must allow these flows.

> **Recommendation**
>
> The security hardening guide details the local firewall rules, the hardening of the SSH service and of an external database: see [Local firewall](https://docs.cyberelements.io/bastion/4.7/lt/Security/LocalFirewall/), [SSH](https://docs.cyberelements.io/bastion/4.7/lt/Security/Ssh/) and [R79](https://docs.cyberelements.io/bastion/4.7/lt/Security/SessionRecordings/#r79).

## Database

### Standalone platform

CyberElements Bastion uses different databases (DB) for its operation.

1. System configuration database. This database is used to store all the settings for the `/system` administration interface. In a standalone installation, this database is created and managed directly by the product using a PostgreSQL server installed on the Mediation Controller server.
2. Organisation configuration database. Each organisation created on the Mediation Controller server will require a different DB to contain all the organisation settings and logs. This database is usually hosted on the Mediation Controller server and its local PostgreSQL database, but it can also be moved to the DMZ or LAN.
3. Vault database. Each organisation created triggers the creation of a specific DB for the product vault, which is stored by default on the Mediation Controller server. This database can be outsourced to the LAN provided that an Edge Gateway can access it.

When using external databases, the supported database types are:

- PostgreSQL version 17 (the version provided by Debian 13, also used by the local database of the Mediation Controller)
- Microsoft SQL Server and its [supported versions without maintenance extension](https://learn.microsoft.com/en-us/sql/sql-server/end-of-support/sql-server-end-of-support-overview?view=sql-server-ver16#lifecycle-dates)

> **Recommendation**
>
> The security hardening guide details the hardening of an external database (network flows, connection account, encryption, backups): see [R79](https://docs.cyberelements.io/bastion/4.7/lt/Security/SessionRecordings/#r79).

### Cluster platform

CyberElements Bastion uses different databases (DB) for its operation.

1. System configuration database. This database is used to store all the settings for the `/system` administration interface and **must be named** `default`.

   > **Attention!**
   >
   > You must create the `default` database before connecting to CyberElements Bastion (it is not created automatically).
2. Organisation configuration database. Each organisation created on the Mediation Controller server will require a different DB to contain all the organisation settings and logs.
3. Vault database. Each organisation created triggers the creation of a specific DB for the product vault, which is stored by default on the Mediation Controller server. This database can be outsourced to the LAN provided that an Edge Gateway can access it.

When using external databases (nominal case in Cluster), the supported database types are:

- PostgreSQL version 17 for all 3 databases.
- Microsoft SQL Server and its [supported versions without maintenance extension](https://learn.microsoft.com/en-us/sql/sql-server/end-of-support/sql-server-end-of-support-overview?view=sql-server-ver16#lifecycle-dates) for organizational configuration databases and vault outsourcing.

> **Recommendation**
>
> The security hardening guide details the hardening of an external database (network flows, connection account, encryption, backups): see [R79](https://docs.cyberelements.io/bastion/4.7/lt/Security/SessionRecordings/#r79).

### Multi-node platform

CyberElements Bastion uses different databases (DB) for its operation. On a multi-node platform, the `default` database and the organisation databases are mandatorily hosted outside the Mediation Controllers.

1. System configuration database. This database is used to store all the settings for the `/system` administration interface and **must be named** `default`.

   > **Attention!**
   >
   > You must create the `default` database before connecting to CyberElements Bastion (it is not created automatically).

   The `default` database is shared by all the nodes: it is hosted on a PostgreSQL 17 server reachable from every node. The connection role that owns it is created with the superuser attribute, as the product creates the databases of the organisations with it. For a PostgreSQL cluster, the `default` database is created as described on the [PostgreSQL cluster installation](https://docs.cyberelements.io/bastion/4.7/lt/Installation/Dependencies/PostgreSQLCluster/Installation/Install/#creation-of-the-default-database-required-for-installing-cyberelements-bastion) page.
2. Organisation configuration database. Each organisation created on the Mediation Controller server will require a different DB to contain all the organisation settings and logs.
3. Vault database. Each organisation created triggers the creation of a specific DB for the product vault, which is stored by default on the Mediation Controller server. This database can be outsourced to the LAN provided that an Edge Gateway can access it.

When using external databases (mandatory on a multi-node platform), the supported database types are:

- PostgreSQL version 17 for all 3 databases (mandatory for the `default` database).
- Microsoft SQL Server and its [supported versions without maintenance extension](https://learn.microsoft.com/en-us/sql/sql-server/end-of-support/sql-server-end-of-support-overview?view=sql-server-ver16#lifecycle-dates) for organizational configuration databases and vault outsourcing.

A [PostgreSQL cluster](https://docs.cyberelements.io/bastion/4.7/lt/Installation/Dependencies/PostgreSQLCluster/PostgreSQLClusterIntroduction/) is recommended so that the database does not become a single point of failure.

> **Recommendation**
>
> The security hardening guide details the hardening of an external database (network flows, connection account, encryption, backups): see [R79](https://docs.cyberelements.io/bastion/4.7/lt/Security/SessionRecordings/#r79).

## Licence

The Mediation Controller server requires a licence to function.
The licence can be obtained from Systancia using the following licence request form: [Request a licence](https://www.systancia.com/en/my-systancia/marketplace/systancia-cleanroom/systancia-cleanroom-licences-activation-cleanroom/)

On a multi-node platform: each node has its own licence, whose listening address and port correspond to the SSL address of the node.

## Certificates

CyberElements Bastion uses TLS encryption for internal communications and HTTPS to secure web access, requiring the use of various x509 certificates. The information below summarises the different certificates required, their purpose, and the minimum settings.

> **Recommendation**
>
> The security hardening guide details the protection of the Edge Gateway certificate and private key, and the recommended TLS configuration: see [Edge Gateway certificate and private key](https://docs.cyberelements.io/bastion/4.7/lt/Security/GatewayCertificates/) and [TLS 1.2 and TLS 1.3](https://docs.cyberelements.io/bastion/4.7/lt/Security/Tls/).

> **Certificate security constraint**
>
> Regardless of the certificate used, ensure that it complies with [OpenSSL security level 2](https://docs.openssl.org/3.0/man3/SSL_CTX_set_security_level/#default-callback-behaviour), which can be summarised as follows:
>
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits.
> - The certificate signature must not be MD5 or SHA-1 (SHA-512 is preferred).

### Standalone or multi-node platform

This server uses four different certificates:

- A web certificate to enable HTTPS.
- A certificate for the SSL Router component responsible for setting up TLS tunnels and routing traffic between them.
- A certificate for the Watchdog component responsible for monitoring the proper functioning of the SSL Router.
- A certificate for the CyberElements Bastion client to enable it to connect to the SSL Router and establish a TLSv1.3 tunnel.

**Web certificate**

> > **Recommendation**
> >
> > The web certificate should preferably be issued by a public Certification Authority (CA) that is recognised as trustworthy.
> > This will ensure that users do not receive any alerts related to the certificate used (provided that it is valid and covers the name with which the user initiated the connection) without any additional action. The use of a certificate issued by an internal PKI requires the deployment of the CA certificate on user workstations.
>
> The web certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 398 days (13 months).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The value of the `Common Name` attribute must be the DNS name (or wildcard) for which the certificate is intended.
> - The `Key Usage` attribute must have the values `critical`, `digitalSignature` and `keyEncipherment`.
> - The `Extended Key Usage` attribute must have the `id-kp-serverAuth` value (OpenSSL uses the `serverAuth` value).
> - The `Subject Alternative Name` attribute must contain at least one entry corresponding to the primary DNS name; other entries may be added to cover other DNS names or IP addresses.
>
> Accepted certificate format: `P12` or `PEM` (with two files, one for the certificate and one for the private key).

**SSL Router certificate**

> The SSL Router certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 1095 days (3 years).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The value of the `Common Name` attribute must be the IP address or a DNS name redirecting to `IP_MC_SSL`.
> - The `Key Usage` attribute must have the values `critical`, `digitalSignature` and `keyEncipherment`.
> - The `Extended Key Usage` attribute must have the value `serverAuth`.
>
> Accepted certificate format: `P12`.

**Watchdog certificate**

> The Watchdog certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 1095 days (3 years).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The `Common Name` attribute must have a value that is an identification name for the Watchdog, for example “Watchdog”.
> - The `Key Usage` attribute must have the values `critical` and `digitalSignature`.
> - The `Extended Key Usage` attribute must have the value `clientAuth`.
>
> Accepted certificate format: `P12`.

**CyberElements Bastion client certificate**

> The CyberElements Bastion client certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 1095 days (3 years).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The `Common Name` attribute must have a value that is a customer identification name, for example “cyberelements-cleanroom-client”.
> - The `Key Usage` attribute must have the values `critical` and `digitalSignature`.
> - The `Extended Key Usage` attribute must have the value `clientAuth`.
>
> Accepted certificate format: `P12` with a password of **at least 8 alphanumeric characters** (special characters, accented letters, or hyphens are not supported).

Each node keeps its own certificates: those of a [Standalone platform](#certificates-standalone) apply to each node.

### Cluster platform

This server uses five different certificates:

- A web certificate to enable HTTPS.
- A certificate for the SSL Router component responsible for setting up TLS tunnels and routing traffic between them.
- A certificate for the Watchdog component responsible for monitoring the proper functioning of the SSL Router.
- A certificate for the CyberElements Bastion client to enable it to connect to the SSL Router and establish a TLSv1.3 tunnel.
- A certificate for inter-server exchanges between Mediation Controllers (only for the `SLAVE` server).

**Web certificate**

> > **Recommendation**
> >
> > The web certificate should preferably be issued by a public Certification Authority (CA) that is recognised as trustworthy.
> > This will ensure that users do not receive any alerts related to the certificate used (provided that it is valid and covers the name with which the user initiated the connection) without any additional action. The use of a certificate issued by an internal PKI requires the deployment of the CA certificate on user workstations.
>
> The web certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 398 days (13 months).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The value of the `Common Name` attribute must be the DNS name (or wildcard) for which the certificate is intended.
> - The `Key Usage` attribute must have the values `critical`, `digitalSignature` and `keyEncipherment`.
> - The `Extended Key Usage` attribute must have the `id-kp-serverAuth` value (OpenSSL uses the `serverAuth` value).
> - The `Subject Alternative Name` attribute must contain at least one entry corresponding to the primary DNS name; other entries may be added to cover other DNS names or IP addresses.
>
> Accepted certificate format: `P12` or `PEM` (with two files, one for the certificate and one for the private key).

**SSL Router certificate**

> The SSL Router certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 1095 days (3 years).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The value of the `Common Name` attribute must be the IP address or a DNS name redirecting to `IP_MC_SSL`.
> - The `Key Usage` attribute must have the values `critical`, `digitalSignature` and `keyEncipherment`.
> - The `Extended Key Usage` attribute must have the value `serverAuth`.
>
> Accepted certificate format: `P12`.

**Watchdog certificate**

> The Watchdog certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 1095 days (3 years).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The `Common Name` attribute must have a value that is an identification name for the Watchdog, for example “Watchdog”.
> - The `Key Usage` attribute must have the values `critical` and `digitalSignature`.
> - The `Extended Key Usage` attribute must have the value `clientAuth`.
>
> Accepted certificate format: `P12`.

**CyberElements Bastion client certificate**

> The CyberElements Bastion client certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 1095 days (3 years).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The `Common Name` attribute must have a value that is a customer identification name, for example “cyberelements-cleanroom-client”.
> - The `Key Usage` attribute must have the values `critical` and `digitalSignature`.
> - The `Extended Key Usage` attribute must have the value `clientAuth`.
>
> Accepted certificate format: `P12` with a password of **at least 8 alphanumeric characters** (special characters, accented letters, or hyphens are not supported).

**Interserver certificate**

> The CyberElements Bastion interserver certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 1095 days (3 years).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The `Common Name` attribute must have an identification name as its value, for example “interserver-cleanroom”.
> - The `Key Usage` attribute must have the values `critical` and `digitalSignature`.
> - The `Extended Key Usage` attribute must have the value `clientAuth`.
>
> Accepted certificate format: `P12` with a password of at least 8 characters without special characters.
