Accesso mobile sicuro
Questa pagina contiene le best practice per mantenere sicuri l'app mobile Zabbix e l'adattatore bridge Zabbix.
Proteggi i dispositivi mobili
Per impedire ad altre persone di aprire l'app sul tuo dispositivo mobile, abilita il blocco dell'app nelle Impostazioni dell'app.
Se un dispositivo è stato perso o compromesso, rimuovilo nell'interfaccia web di Zabbix. In questo modo le relative credenziali di accesso vengono revocate e rimosse, impedendo al dispositivo di accedere ulteriormente a Zabbix. A seconda delle autorizzazioni del tuo ruolo utente, puoi rimuovere i dispositivi nelle seguenti sezioni:
- Impostazioni utente > Dispositivi - qualsiasi utente può rimuovere i propri dispositivi (è necessaria l'autorizzazione Gestisci i propri dispositivi).
- Utenti > Dispositivi - un Super amministratore può rimuovere i dispositivi di qualsiasi utente (è necessaria l'autorizzazione Gestisci i dispositivi degli utenti).
Puoi anche limitare le parti di Zabbix a cui è possibile accedere da un dispositivo mobile. A tale scopo, assegna agli utenti un ruolo utente che conceda solo le autorizzazioni richieste dall'app. Le autorizzazioni minime sono le seguenti:
| Sezione | Configurazione |
|---|---|
| Accesso agli elementi dell'interfaccia utente | Deseleziona tutte le caselle di controllo. |
| Accesso ai servizi | Imposta Accesso in lettura e scrittura ai servizi e Accesso in sola lettura ai servizi su None. |
| Accesso ai moduli | Deseleziona tutte le caselle di controllo. |
| Accesso all'API | Deseleziona la casella di controllo Abilitato. |
| Accesso alle azioni | Deseleziona tutte le caselle di controllo. Per consentire agli utenti di aggiornare i problemi nell'app, seleziona anche le azioni necessarie: - Aggiungi commenti ai problemi - Modifica la gravità - Riconosci i problemi - Sopprimi i problemi - Chiudi i problemi - Crea e modifica i propri media Nota che i problemi visualizzabili dagli utenti nell'app dipendono anche dal loro accesso agli host. |
| Dispositivi | Seleziona la casella di controllo Abilitato. Per consentire agli utenti di aggiungere e rimuovere i propri dispositivi mobili, seleziona anche la casella di controllo Gestisci i propri dispositivi; in caso contrario, un Super amministratore deve gestire i loro dispositivi in Utenti > Dispositivi. |
Protezione dell'adapter bridge di Zabbix
L'adapter bridge di Zabbix archivia i propri dati (il file di stato e le chiavi di crittografia) nella directory specificata nel parametro DataDir del file di configurazione dell'adapter bridge di Zabbix.
Assicurarsi che la directory disponga dei permessi 0700 e che tutti i file archiviati al suo interno dispongano dei permessi 0600.
L'adapter bridge di Zabbix inoltra le richieste dai dispositivi mobili all'API di Zabbix.
Per limitare i metodi API che possono essere chiamati tramite l'adapter bridge di Zabbix, utilizzare il parametro AllowedAPIMethods.
Ad esempio, consentire solo il set minimo di metodi richiesto dall'app mobile, o anche un numero inferiore, se non si desidera utilizzare alcune funzionalità dell'app mobile (ad esempio, non consentire event.acknowledge se gli utenti dell'app mobile non devono aggiornare i problemi).
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