You are reading the documentation of OpenCTI 7.260811 LTS · 7.260811.0-lts.1, supported until 2027-09.Latest is 7.261119.0 →
How-to guide

Run integrations behind a proxy

Send XTM Composer and the integrations it runs through an HTTP or HTTPS proxy, including a TLS-intercepting proxy with its own certificate authority.

OpenCTIOpenAEVXTM ComposerFor platform engineers

This page sends XTM Composer and the integrations it deploys through your proxy. The settings belong to each platform block, opencti or openaev, so OpenCTI and OpenAEV integrations can use different proxies. Install XTM Composer first: see Install XTM Composer.

XTM COMPOSERINTEGRATIONSPROXYIN NO_PROXYXTM ComposerOPENCTI__WITH_PROXY=trueIntegration containersHTTP_PROXY, HTTPS_PROXY,NO_PROXYYour proxyhttp://proxy.example.com:8080OpenCTI or OpenAEVopencti, openaevRabbitMQrabbitmq
  1. XTM Composer → Integration containers: proxy and CA
  2. XTM Composer → OpenCTI or OpenAEV: direct
  3. Integration containers → Your proxy: other traffic
  4. Integration containers → OpenCTI or OpenAEV: direct
  5. Integration containers → RabbitMQ: direct
XTM Composer gives each integration it creates the proxy and its certificate authority, and both XTM Composer and the integrations reach the hosts of NO_PROXY directly

Before you start

  • The URL of your proxy, such as http://proxy.example.com:8080, and the hosts that must not go through it.
  • For a proxy that intercepts TLS, its certificate authority as a PEM file.

Turn on the proxy

  1. Add the proxy to the environment of XTM Composer: its env file, such as composer.env, or the environment of its service, in docker-compose.override.yml for xtm-docker. For OpenAEV, replace OPENCTI__ with OPENAEV__.

    OPENCTI__WITH_PROXY=true
    OPENCTI__HTTP_PROXY=http://proxy.example.com:8080
    OPENCTI__HTTPS_PROXY=http://proxy.example.com:8080
    OPENCTI__NO_PROXY=localhost,127.0.0.1,opencti,openaev,rabbitmq
    

    Put in NO_PROXY every host XTM Composer and the integrations reach directly: the platform and RabbitMQ at least, as the XTM stack names them here.

  2. Restart XTM Composer. Integrations get the proxy when XTM Composer creates their container. For an integration already deployed, change its configuration with Update, or stop it and remove its container: XTM Composer then creates it again.

KeyEnvironment variableDefaultEffect
opencti.with_proxyOPENCTI__WITH_PROXYfalsetrue turns the proxy on for this platform. With false, XTM Composer ignores every proxy, including the HTTP_PROXY variables of its own environment
opencti.http_proxyOPENCTI__HTTP_PROXYThe proxy for HTTP. Without it, XTM Composer uses HTTP_PROXY from its own environment
opencti.https_proxyOPENCTI__HTTPS_PROXYThe proxy for HTTPS. Without it, XTM Composer uses HTTPS_PROXY from its own environment
opencti.no_proxyOPENCTI__NO_PROXYComma-separated hosts, domains or CIDR ranges reached without the proxy, such as opencti,.example.com,10.0.0.0/8. Without it, NO_PROXY from the environment of XTM Composer. It applies to the integrations and to the requests of XTM Composer to the platform

With the proxy on, XTM Composer sends its own requests to the platform through it, except to the hosts of no_proxy, and gives each integration container HTTP_PROXY, HTTPS_PROXY and NO_PROXY. When you set no_proxy but neither http_proxy nor https_proxy, XTM Composer takes the proxy for its own requests from HTTP_PROXY and HTTPS_PROXY of its environment, else from ALL_PROXY.

Up to XTM Composer 3.261021.1, no_proxy applied to the integrations only: with http_proxy or https_proxy set, XTM Composer reached the platform through the proxy even when the platform was in the list.

Trust a TLS-intercepting proxy

A proxy that decrypts HTTPS presents certificates signed by its own authority. Give that authority to the integrations:

KeyEnvironment variableDefaultEffect
opencti.https_proxy_caOPENCTI__HTTPS_PROXY_CACertificates to trust: a list of file paths or PEM blocks. As an environment variable, a JSON array such as ["/certs/proxy-ca.pem"]
opencti.https_proxy_reject_unauthorizedOPENCTI__HTTPS_PROXY_REJECT_UNAUTHORIZEDtruefalse gives the integrations NODE_TLS_REJECT_UNAUTHORIZED=0, which turns off certificate checks in Node.js integrations. Prefer https_proxy_ca
  1. Make the PEM file readable by XTM Composer, which reads the paths: mount it in its container, for example at /certs/proxy-ca.pem, and add the variable to its environment. In a shell, put the value in single quotes.

    OPENCTI__HTTPS_PROXY_CA=["/certs/proxy-ca.pem"]
    
  2. On Docker, Podman, Docker Swarm or Portainer, let the container engine see the bundle XTM Composer writes. XTM Composer writes the certificates to /tmp/xtm-composer-proxy-ca/ and asks the engine to mount that file in each integration. The engine looks for it on the host, so when XTM Composer runs in a container, mount the same host folder at the same path:

    -v /tmp/xtm-composer-proxy-ca:/tmp/xtm-composer-proxy-ca
    

    On Kubernetes, nothing to add: XTM Composer puts the bundle in a Secret named after the integration's Deployment, <deployment>-proxy-ca cut to 63 characters, and mounts it from there. From XTM Composer 3.261121.0, when the integration's name is not a valid Kubernetes name, such as one longer than 63 characters, the Deployment name ends with 8 characters of a hash, and so does the Secret: see the naming rule in XTM Composer architecture.

  3. Restart XTM Composer, then recreate the integrations as in the previous procedure.

Each integration then finds the bundle at /etc/ssl/certs/xtm-proxy-ca.crt, and the variables that point most runtimes to it: SSL_CERT_FILE, REQUESTS_CA_BUNDLE, NODE_EXTRA_CA_CERTS and CURL_CA_BUNDLE.

Note

These settings are only for the proxy. The certificate of the platform itself is configured on the platform: see Trust your certificate authority and proxy. To make XTM Composer accept an invalid platform certificate while you test, set OPENCTI__UNSECURED_CERTIFICATE=true.

Check that it works

Check the proxy XTM Composer uses for its own requests, in its logs at start:

docker logs xtm-composer 2>&1 | grep -E 'Using HTTPS? proxy'
Check that it worked

A line Using HTTP proxy or Using HTTPS proxy per platform, with its no_proxy list and its source: explicit for the URL of the platform block, environment for a URL read from the environment. When the block sets no proxy URL and no no_proxy, XTM Composer uses the proxy variables of its environment and logs no such line.

Then read the environment of an integration container XTM Composer created after the change:

docker ps --filter label=opencti-manager --format '{{.Names}}'
docker inspect --format '{{range .Config.Env}}{{println .}}{{end}}' <container name> | grep -E '^(HTTP_PROXY|HTTPS_PROXY|NO_PROXY|SSL_CERT_FILE)='
Check that it worked

It prints HTTP_PROXY, HTTPS_PROXY and NO_PROXY with your values, and SSL_CERT_FILE=/etc/ssl/certs/xtm-proxy-ca.crt when you set a certificate authority. With MANAGER__DEBUG__SHOW_ENV_VARS=true, XTM Composer also logs these variables when it starts a container, with the proxy URLs redacted.

What's next

NextTroubleshoot XTM Composer
Deploy
Install, configure, secure, scale and upgrade the platform.

Published

Overview
Run the XTM platform locally
OverviewDeploy with an AI agent