Secure mobile access
This page contains best practices for keeping Zabbix mobile app and Zabbix bridge adapter secure.
Protect mobile devices
To prevent other people from opening the app on your mobile device, enable app lock in the app Settings.
If a device has been lost or compromised, remove it in the Zabbix web interface. This revokes and removes its access credentials, so the device can no longer access Zabbix. Depending on your user role permissions, you can remove devices in the following sections:
- User settings > Devices - any user can remove their own devices (requires the Manage own devices permission).
- Users > Devices - Super admin can remove any user's devices (requires the Manage user devices permission).
You can also limit which parts of Zabbix can be accessed from a mobile device. To do this, assign users a user role that grants only the permissions the app requires. The minimal permissions are as follows:
| Section | Configuration |
|---|---|
| Access to UI elements | Clear all checkboxes. |
| Access to services | Set Read-write access to services and Read-only access to services to None. |
| Access to modules | Clear all checkboxes. |
| Access to API | Clear the Enabled checkbox. |
| Access to actions | Clear all checkboxes. To let users update problems in the app, also mark the actions they need: - Add problem comments - Change severity - Acknowledge problems - Suppress problems - Close problems Note that the problems that users can see in the app also depend on their access to hosts. To let users change which push notifications they receive (e.g., severities and active periods), also mark Create and edit own media. This lets them edit their media, including media other than push notifications. |
| Devices | Mark the Enabled checkbox. To let users add and remove their own mobile devices, also mark the Manage own devices checkbox; otherwise, a Super admin must manage their devices in Users > Devices. |
Protect Zabbix bridge adapter
Zabbix bridge adapter stores its data (state file and encryption keys) in the directory specified in the DataDir parameter of Zabbix bridge adapter configuration file.
Make sure that the directory has 0700 permissions, and all files stored in it have 0600 permissions.
Zabbix bridge adapter passes requests from mobile devices to Zabbix API.
To restrict which API methods can be called through Zabbix bridge adapter, use its AllowedAPIMethods parameter.
For example, allow only the minimal set of methods that the mobile app requires, or even fewer, if you do not want some mobile app features to be used (e.g., do not allow event.acknowledge if mobile app users should not update problems).
Zabbix bridge adapter accepts connections from Zabbix server on its ListenPort.
Unless TLSConfig.Mode is set to mtls, Zabbix bridge adapter accepts these connections from any host that can reach this port.
Allow connections to this port only from Zabbix server (e.g., with a firewall, or by setting ListenIP to 127.0.0.1 if Zabbix bridge adapter and Zabbix server run on the same system), or use mTLS.
The health-check endpoints of Zabbix bridge adapter on ListenHealthPort always use unencrypted HTTP without authentication, and their error messages may reveal details about your environment.
If this port is reachable from untrusted networks, restrict access to it (e.g., with a firewall).
Encrypt connections between components
If Zabbix bridge adapter, Zabbix server, and Zabbix frontend (which provides Zabbix API) are installed on separate systems, it is recommended to encrypt the data flow between them. This section provides guidance for securing these connections:
- From Zabbix server to Zabbix bridge adapter
- From Zabbix bridge adapter to Zabbix frontend (API)
This section does not describe how to manage certificates. For general guidance, see Encryption using certificates.
TLS from Zabbix server to Zabbix bridge adapter
Zabbix server uses the URL specified in its BridgeAdapterURL parameter to connect to Zabbix bridge adapter.
The bridge adapter uses its TLSConfig.Mode parameter to determine which connections it accepts:
none(default) - only unencrypted connections.BridgeAdapterURLmust usehttp://.tls- only encrypted connections; the bridge adapter presents its certificate to Zabbix server.BridgeAdapterURLmust usehttps://.mtls- in addition totls, the bridge adapter verifies the client certificate of Zabbix server.
To configure tls:
1. Choose which CA will issue the Zabbix bridge adapter certificate:
- The CA that issued the certificates already in use by Zabbix server - choose this if Zabbix server uses certificate-based encryption with Zabbix proxies or agents (its
TLSCAFile,TLSCertFile, andTLSKeyFileparameters are set). - A CA whose certificate is in the CA store of the operating system where Zabbix server is installed (e.g., a public CA).
- Any other CA (e.g., a private CA of your organization).
2. If you chose any other CA in step 1, prepare the following files on the system where Zabbix server is installed, all in PEM format:
- A CA file with the certificate of the chosen CA.
- A certificate (or certificate chain) for the server, issued by the chosen CA.
- A private key for the server; make sure that it is readable only by the user that runs it (typically,
zabbix).
3. Edit the Zabbix server configuration file:
BridgeAdapterURL=https://zabbix-bridge-adapter.example.com:10054/rpc
# If you chose any other CA in step 1 (already set if you chose the CA already in use by Zabbix server):
TLSCAFile=/etc/zabbix/certs/zabbix_ca_file.crt
TLSCertFile=/etc/zabbix/certs/zabbix_server.crt
TLSKeyFile=/etc/zabbix/certs/zabbix_server.key
4. On the system where Zabbix bridge adapter is installed, prepare the following files, all in PEM format:
- A certificate (or certificate chain) for the bridge adapter, issued by the chosen CA; make sure that its Subject Alternative Name (SAN) extension contains the host name or IP address from Zabbix server's
BridgeAdapterURL. - A private key for the bridge adapter; make sure that it is readable only by the user that runs it (typically,
zabbix-bridge-adapter).
5. Edit the Zabbix bridge adapter configuration file:
TLSConfig.Mode=tls
TLSConfig.CertFile=/etc/zabbix/certs/zabbix_bridge_adapter.crt
TLSConfig.KeyFile=/etc/zabbix/certs/zabbix_bridge_adapter.key
6. Restart Zabbix bridge adapter:
systemctl restart zabbix-bridge-adapter
7. Restart Zabbix server. For example (see other options):
systemctl restart zabbix-server
To configure mtls:
1. Choose which CA will issue the certificates of Zabbix server and Zabbix bridge adapter:
- The CA that issued the certificates already in use by Zabbix server - choose this if Zabbix server uses certificate-based encryption with Zabbix proxies or agents (its
TLSCAFile,TLSCertFile, andTLSKeyFileparameters are set). - Any other CA (e.g., a private CA of your organization).
2. If you chose any other CA in step 1, prepare the following files on the system where Zabbix server is installed, all in PEM format:
- A CA file with the certificate of the chosen CA.
- A certificate (or certificate chain) for the server, issued by the chosen CA.
- A private key for the server; make sure that it is readable only by the user that runs it (typically,
zabbix).
3. Edit the Zabbix server configuration file:
BridgeAdapterURL=https://zabbix-bridge-adapter.example.com:10054/rpc
# Already set if you chose the CA already in use by Zabbix server:
TLSCAFile=/etc/zabbix/certs/zabbix_ca_file.crt
TLSCertFile=/etc/zabbix/certs/zabbix_server.crt
TLSKeyFile=/etc/zabbix/certs/zabbix_server.key
4. On the system where Zabbix bridge adapter is installed, prepare the following files, all in PEM format:
- A CA file with the certificate of the chosen CA (even if it is a public CA, because the bridge adapter does not use the CA store of the operating system).
- A certificate (or certificate chain) for the bridge adapter, issued by the chosen CA; make sure that its Subject Alternative Name (SAN) extension contains the host name or IP address from Zabbix server's
BridgeAdapterURL. - A private key for the bridge adapter; make sure that it is readable only by the user that runs it (typically,
zabbix-bridge-adapter).
5. Edit the Zabbix bridge adapter configuration file:
TLSConfig.Mode=mtls
TLSConfig.CertFile=/etc/zabbix/certs/zabbix_bridge_adapter.crt
TLSConfig.KeyFile=/etc/zabbix/certs/zabbix_bridge_adapter.key
TLSConfig.CAFile=/etc/zabbix/certs/zabbix_ca_file.crt
# Common Name (CN) of the Zabbix server certificate (exact, case-sensitive match; SANs are not checked):
TLSConfig.AllowedCN=zabbix-server
6. Restart Zabbix bridge adapter:
systemctl restart zabbix-bridge-adapter
7. Restart Zabbix server. For example (see other options):
systemctl restart zabbix-server
TLS from Zabbix bridge adapter to Zabbix API
Zabbix bridge adapter uses the URL specified in its ZabbixAPIURL parameter to connect to Zabbix API.
The bridge adapter uses its ZabbixAPITLSConnect parameter to determine how strictly it verifies the Zabbix frontend certificate:
disabled- the connection is not encrypted. Only with this option,ZabbixAPIURLmust usehttp://.required(default) - the connection is encrypted, but the bridge adapter accepts any certificate.verify_ca- the connection is encrypted, and the certificate must be issued by a CA from theZabbixAPITLSCAFilefile.verify_full- the connection is encrypted, the certificate must be issued by a CA from theZabbixAPITLSCAFilefile, and the host name inZabbixAPIURLmust match the certificate.
To configure required, verify_ca, or verify_full:
1. On the system where Zabbix frontend is installed, make sure that:
- Zabbix frontend is served over HTTPS (see Setting up SSL for Zabbix frontend).
- For
verify_full, the Subject Alternative Name (SAN) extension of the Zabbix frontend certificate contains the host name or IP address from the bridge adapter'sZabbixAPIURL.
2. For verify_ca and verify_full, on the system where Zabbix bridge adapter is installed, prepare a PEM file with the CA certificate that issued the Zabbix frontend certificate.
- If the Zabbix frontend certificate is self-signed, the file contains the Zabbix frontend certificate itself.
- If the Zabbix frontend certificate is issued by a public CA, the file can be the CA bundle of the operating system (e.g.,
/etc/ssl/certs/ca-certificates.crton Ubuntu). The bridge adapter uses CA certificates only from this file, not from the CA store of the operating system. - Make sure that the PEM file is readable by the user that runs the bridge adapter (typically,
zabbix-bridge-adapter).
3. Edit the Zabbix bridge adapter configuration file:
ZabbixAPIURL=https://zabbix.example.com/zabbix/api_jsonrpc.php
# For required, verify_ca, or verify_full:
ZabbixAPITLSConnect=verify_full
# For verify_ca or verify_full:
ZabbixAPITLSCAFile=/etc/zabbix/certs/zabbix_api_ca.crt
4. Restart Zabbix bridge adapter:
systemctl restart zabbix-bridge-adapter