> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/tools/enterprise/mariadb-enterprise-manager/administration/security-in-enterprise-manager.md).

# Security in Enterprise Manager

Overview of security best practices within Enterprise Manager, including securing the UI, managing audit logs, and enforcing strict access controls.

MariaDB Enterprise Manager provides security at multiple levels, including transport-layer encryption for all components, secure authentication, and a detailed audit log.

{% hint style="info" %}
This guide covers the primary security configurations. For Users, Roles and Permissions, see [User Management](https://mariadb.com/docs/tools/enterprise/mariadb-enterprise-manager/administration/user-management.md).
{% endhint %}

### SSL/TLS Certificate Management

The Enterprise Manager installation generates a self-signed TLS certificate and key for immediate use. For production environments, you should use your own custom certificates.

{% stepper %}
{% step %}
**Place custom certificates**

Copy your custom certificate and private key into `enterprise-manager/certs/`, using the names `cert.pem` and `key.pem`
{% endstep %}

{% step %}
**Restart Enterprise Manager**

To apply the changes, restart the services:

```
docker compose up -d
```

{% endstep %}
{% endstepper %}

### Enabling the Audit Log

The audit log records all REST API requests made to MariaDB Enterprise Manager, providing a clear trail of administrative actions for security and compliance.

{% stepper %}
{% step %}
**Step: Navigate to the directory**

Open a terminal and change into your MariaDB Enterprise Manager installation directory.

```
cd enterprise-manager/
```

{% endstep %}

{% step %}
**Step: Edit the .env file**

Open the environment file using a text editor.

```
nano .env
```

{% endstep %}

{% step %}
**Step: Update the audit log variable**

Inside the editor, locate the line for the audit API setting.

* Find this line:

```
MEMA_AUDIT_API=false
```

* Change it to:

```
MEMA_AUDIT_API=true
```

{% endstep %}

{% step %}
**Step: Save and exit**

Save the changes and exit the editor.
{% endstep %}

{% step %}
**Step: Restart Enterprise Manager**

The change requires a restart to take effect.

```
docker compose up -d
```

{% endstep %}
{% endstepper %}

### Configuring Secure Connections

#### Agent to Enterprise Manager Connections

The connection from the `mema-agent` to the Enterprise Manager server is secured using HTTPS.

* To enable encryption: ensure the URL provided in the agent setup command uses `https://`.

```
mema-agent setup --endpoint=https://<MEM_Address> ...
```

* To bypass certificate checks: if you are using a self-signed or non-trusted TLS certificate on the Enterprise Manager server, you can add the `--otlp-insecure` flag to the agent setup command. This is recommended only for testing environments.

#### Enterprise Manager to Monitored Databases

You can configure secure TLS connections from Enterprise Manager to your monitored MariaDB Servers and MaxScale instances when you first add them.

In the "Add Database" page:

<figure><img src="https://2850516351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkuTXWg0NDbRx6XUeYpGD%2Fuploads%2Fgit-blob-04e110c37c12c72ad26d1dbdb87d7811b2e5b199%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

1. Toggle the SSL/TLS option to ON.
2. To validate the server's certificate against your Certificate Authority (CA), provide the path to your CA file in the Certificate Authority field. The file must be located in the `enterprise-manager/certs/` directory and the path must begin with `/certs/`.
3. Check Verify peer certificate to enable validation.
4. (Optional) Check Verify peer host to ensure the server's hostname matches the certificate.
5. If the database requires client-side certificates for authentication, provide the paths to your client certificate and key in the Certificate and Key fields, respectively. These files must also be in the `enterprise-manager/certs/` directory.

{% hint style="warning" %}
All certificate and key files referenced for server validation or client authentication must be placed in the `enterprise-manager/certs/` directory on the host and referenced with a path beginning with `/certs/`.
{% endhint %}

### Enterprise Manager and GridGain Control Center connections <a href="#enterprise-manager-and-gridgain-control-center-connections" id="enterprise-manager-and-gridgain-control-center-connections"></a>

When Enterprise Manager is connected to GridGain Control Center, Enterprise Manager, Control Center, the GridGain nodes and the browser connect over HTTPS. Each connection answers two separate questions:

* **Is this the real server?** The server presents its TLS certificate, and the caller checks it against its trust store.
* **Is this the real caller?** The server checks a signed token, a client secret or a user session.

| Connection                                               | How the caller trusts the server                                                                                                                                                                       | How the server trusts the caller                                                                                                                                                                                                                 |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Enterprise Manager → Control Center (cluster list)       | Enterprise Manager trusts the CA file set in **Control Center CA certificate path**. If the field is empty, Enterprise Manager uses the CA list inside its container, which is enough for a public CA. | Enterprise Manager signs a JSON Web Token (JWT) with its private key and sends it with each call. The token is valid for 5 minutes. Control Center checks the signature with Enterprise Manager's public keys from `/jwks`. No password is used. |
| Control Center → Enterprise Manager (single sign-on)     | Control Center checks Enterprise Manager's certificate against its Java trust store.                                                                                                                   | At `/token`, Control Center signs in as the Enterprise Manager user `cc_sso_service_account`, using the SSO client secret as the password. `/jwks` serves only public keys and needs no sign-in.                                                 |
| GridGain nodes → Enterprise Manager, port 4318 (metrics) | Each node checks Enterprise Manager's certificate against its Java trust store.                                                                                                                        | The receiver accepts metrics from any client that connects over TLS.                                                                                                                                                                             |

**Reading the cluster list.** Control Center caches Enterprise Manager's public keys for 5 minutes, and fetches them again when a token carries an unknown key ID. Control Center reads the clusters as the account `em-service-user@controlcenter.local`, which it creates when it starts.

**Single sign-on.** When a user clicks **Manage GridGain**, Control Center exchanges a short authorization code, valid for 30 seconds, at Enterprise Manager's `/token`. In return it gets an ID token, signed by Enterprise Manager, that carries the user's email and Control Center role.

<sub>*This page is: Copyright © 2026 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}
