Configure Engines
Configure Cortex Xpanse engines to use custom certificates and notify users if engine disconnects
You can Edit the Engine Configuration File either by modifying the d1.conf file on the engine or when managing engines. You can only configure an engine in if you have installed the engine using the shell installer.
You can configure the server and engine to do the following:
Edit the Engine Configuration File
You can edit the engine configuration by either modifying the d1.conf file on the engine, or in Cortex Xpanse by modifying specific properties in the JSON formatted configuration dialog box (Shell installations only).
Modify the
d1.conffile.On the machine on which you installed the engine, navigate to the
d1.conffile:Installation TypeLocationRPM, DEB, Shell
/usr/local/demistoIf using multiple engines, the location is
/usr/local/demisto/name of the engine>. For example,/usr/local/demisto/d1_e1ZIP
Same folder as the binary.
Modify the file as required. See Common Properties When Editing an Engine Configuration.
You can also Configure the Engine to Use a Web Proxy.
Modify the configuration in Cortex Xpanse.
Ensure that the data is in JSON format. The properties that you specify override the values defined in the
d1.conffile. A use case for modifying the engine configuration is if you want to generate engine logs for a specific log level.From the engines table, select the engine for which you want to modify the configuration.
Click Edit Configuration.
In the JSON formatted configuration dialog box, modify the properties as required. For more information, see Common Properties When Editing an Engine Configuration.

json-config.png
Common Properties When Editing an Engine Configuration
The following table describes the common properties when editing an engine configuration using the d1.conf file (located by default at /usr/local/demisto/) or in the JSON formatted configuration dialog box in Cortex Xpanse.
http_proxy
String
The IP address of the HTTP proxy through which the engine communicates.
The engine d1.conf file.
https_proxy
String
The IP address of the HTTP/s proxy through which the engine communicates.
The engine d1.conf file.
LogLevel
String
debuginfowarning
The engine d1.conf file or in the JSON formatted configuration dialog box.
BindAddress
String
The port on which the engine listens for agent connection requests and communication task responses.
The engine d1.conf file.
EngineURLs
String array
An array of tenant addresses to which the engine tries to connect. If you change the tenant URL, you need to update this parameter.
The engine d1.conf file.
LogFile
String
Path to the d1.log file. If you change the name or location of the d1.log file, you need to update this parameter.
The engine d1.conf file.
engine.allow.data.collection
String
Disables the option to send communication task forms through the engine.
false
The engine d1.conf file.
Configure the Engine to Use a Web Proxy
The engine uses a web proxy if the following environment variables are set:
http_proxyhttps_proxy
If the environment variables are not set, or you wish to use a different settings than those specified in the environment variables, set the configuration with your specific proxy details in the d1.conf file. For example:
Configure the Engine to Call the Server Without Using a Proxy
In some cases, due to specific environment architecture, you may need to configure the engine to use a proxy when working with integrations, but not use a proxy when calling the Cortex Xpanse tenant.
On the computer where you have installed the engine, go to the directory for
d1.conffile.For RPM, DEB, Shell go to
/usr/local/demisto.Add the following configuration:
KeyValueengine.to.server.proxyfalse(default istrue)
Use NGINX as a Reverse Proxy to the Engine
NGINX can act as a reverse proxy that sits between internal applications and external clients, forwarding client requests to the appropriate application. Using NGINX as a reverse proxy in front of the engine enables you to provide network segmentation where the proxy can be put on a public subnet (DMZ) while the engine can be on a private subnet, only accepting traffic from the proxy. Additionally, NGINX provides a number of advanced load balancing and acceleration features that you can utilize.
The following topics describe how to install NGINX, how to use a Self-Signed Certificate for non-production environments, and how to configure NGINX.
Use Engines Through the NGINX Reverse Proxy
If you want to use an engine (d1) through the reverse proxy, you need to modify EngineURLs in the d1.conf file to point to the host and port the NGINX server is listening on.
Install NGINX on the Engine
You can install NGINX on the Red Hat/Amazon (yum) and Ubuntu Linux distributions. For full instructions and available distributions, see NGINX documentation.
On the engine machine, run one of the following commands according to your Linux system:
RedHat/Amazon:
sudo yum install nginxUbuntu:
sudo apt-get install nginx
(Optional) Verify the NGINX installation by running the following command:
sudo nginx -v
Generate a Certificate for NGINX
You should not use self-signed certificates for production systems. It is recommended to use a properly signed certificate for production systems. These instructions are intended only for non-production setups.
To use OpenSSL to generate a self-signed certificate, on the engine machine run the following command:
sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/nginx/cert.key -out /etc/nginx/cert.crtWhen prompted, complete the on-screen instructions to complete the required fields.
Configure NGINX on an Engine
Follow these instructions to configure NGINX on an engine.
Open the following NGINX configuration file with your preferred editor:
/etc/nginx/conf.d/demisto.confRestart the NGINX server, by typing the following command:
sudo service nginx restartVerify you can access the engine by browsing to the NGINX server host.
Configure an Engine to Use Custom Certificates
For communication tasks that go through an engine, you can replace the default self-signed certificate for the engine with your own certificate.
Find the two files created by the engine. The default location is
/usr/local/demisto.d1.key.pemd1.cert.pemReplace the contents of these files with your own certificates.
Change file owner to demisto:
chown -R demisto:demisto d1.key.pemchown -R demisto:demisto d1.cert.pemSet the file permissions:
chmod 600 d1.key.pemchmod 644 d1.cert.pem(Optional) If you are using a key passphrase for your custom certificate, add the passphrase to your engine configuration:
Go to Settings → Configurations → Engines.
Create New Engine and provide an engine name or select an existing engine and Edit Configuration.
Select Use a passphrase for the engine certificate private key.
Click Save.
Last updated
Was this helpful?
