This section explains how to configure Áú»¢¶Ä²© to retrieve secrets from CyberArk Vault CV12.
The vault should be installed and configured as described in the official .
To learn about configuring TLS in Áú»¢¶Ä²©, see Storage of secrets.
Access to a secret with database credentials is configured for each Áú»¢¶Ä²© component separately.
To obtain database credentials from the vault for Áú»¢¶Ä²© server or proxy, specify the following configuration parameters in the configuration file:
Vault
- which vault provider should be used;VaultURL
- vault server HTTP[S] URL;VaultDBPath
- query to the vault secret containing database credentials which will be retrieved by keys "Content" and "UserName" (this option can only be used if DBUser and DBPassword are not specified);VaultTLSCertFile
, VaultTLSKeyFile
- SSL certificate and key file names; setting up these options is not mandatory, but highly recommended;VaultPrefix
- custom prefix for the vault path or query, depending on the vault; if not specified, the most suitable default will be used.Vault
, VaultURL
, VaultTLSCertFile
, VaultTLSKeyFile
, and VaultPrefix
configuration parameters are also used for vault authentication when processing secret vault macros by Áú»¢¶Ä²© server (and Áú»¢¶Ä²© proxy, if configured). Áú»¢¶Ä²© server and proxies will not open vault secret macros that contain DB credentials from VaultDBPath.
Áú»¢¶Ä²© server and Áú»¢¶Ä²© proxy read the vault-related configuration parameters from zabbix_server.conf and zabbix_proxy.conf files upon startup.
Vault=CyberArk
VaultURL=https://127.0.0.1:1858
VaultDBPath=AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix_server_database
VaultTLSCertFile=cert.pem
VaultTLSKeyFile=key.pem
VaultPrefix=/AIMWebService/api/Accounts?
curl \
--header "Content type: application/json" \
--cert cert.pem \
--key key.pem \
https://127.0.0.1:1858/AIMWebService/api/Accounts?AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix_server_database
{
"Content": <password>,
"UserName": <username>,
"Address": <address>,
"Database": <Database>,
"PasswordChangeInProcess":<PasswordChangeInProcess>
}
To obtain database credentials from the vault for Áú»¢¶Ä²© frontend, specify the following parameters during frontend installation.
Parameter | Mandatory | Default value | Description |
---|---|---|---|
Vault API endpoint | yes | https://localhost:1858 | Specify the URL for connecting to the vault in the format scheme://host:port |
Vault prefix | no | /AIMWebService/api/Accounts? | Provide a custom prefix for the vault path or query. If not specified, the default is used. |
Vault secret query string | yes | A query, which specifies from where database credentials should be retrieved. Example: AppID=foo&Query=Safe=bar;Object=buzz |
|
Vault certificates | no | After marking the checkbox, additional parameters will appear allowing to configure client authentication. While this parameter is optional, it is highly recommended to enable it for communication with the CyberArk Vault. | |
SSL certificate file | no | conf/certs/cyberark-cert.pem | Path to the SSL certificate file. The file must be in PEM format. If the certificate file also contains the private key, leave the SSL key file parameter empty. |
SSL key file | no | conf/certs/cyberark-key.pem | Name of the SSL private key file used for client authentication. The file must be in PEM format. |
To use CyberArk Vault for storing Vault secret user macro values, make sure that:
Áú»¢¶Ä²© server (and Áú»¢¶Ä²© proxy, if configured) require access to Vault secret macro values from the vault. Áú»¢¶Ä²© frontend does not need such access.
The macro value should contain a query (as query:key
).
See Vault secret macros for detailed information on macro value processing by Áú»¢¶Ä²©.
The colon symbol (":") is reserved for separating the query from the key.
If a query itself contains a forward slash or a colon, these symbols should be URL-encoded ("/" is encoded as "%2F", ":" is encoded as "%3A").
AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix:Content
curl \
--header "Content type: application/json" \
--cert cert.pem \
--key key.pem \
https://127.0.0.1:1858/AIMWebService/api/Accounts?AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix_server_database
{
"Content": <password>,
"UserName": <username>,
"Address": <address>,
"Database" :<Database>,
"PasswordChangeInProcess":<PasswordChangeInProcess>
}
To update an existing configuration for retrieving secrets from a CyberArk Vault:
Update the Áú»¢¶Ä²© server or proxy configuration file parameters as described in the Database credentials section.
Update the DB connection settings by reconfiguring Áú»¢¶Ä²© frontend and specifying the required parameters as described in the Frontend section. To reconfigure Áú»¢¶Ä²© frontend, open the frontend setup URL in the browser:
Alternatively, these parameters can be set in the frontend configuration file (zabbix.conf.php):
$DB['VAULT'] = 'CyberArk';
$DB['VAULT_URL'] = 'https://127.0.0.1:1858';
$DB['VAULT_DB_PATH'] = 'AppID=foo&Query=Safe=bar;Object=buzz';
$DB['VAULT_TOKEN'] = '';
$DB['VAULT_CERT_FILE'] = 'conf/certs/cyberark-cert.pem';
$DB['VAULT_KEY_FILE'] = 'conf/certs/cyberark-key.pem';
$DB['VAULT_PREFIX'] = '';
To update an existing configuration for retrieving secrets from a HashiCorp Vault, see HashiCorp configuration.