You are reading the documentation of OpenCTI 7.260309 LTS · 7.260309.0-lts.8, supported until 2027-04.Latest is 7.261119.0 →
How-to guide

Configure XTM Composer

Set the identity, key, platforms and container engine of XTM Composer, with a YAML file or environment variables, and the options each engine applies to the integration containers.

OpenCTIOpenAEVXTM ComposerEnterprise EditionFor platform engineers

This page explains how XTM Composer reads its configuration and gives the settings you need to connect it to OpenCTI and OpenAEV and to your container engine. Every key, with its type and default, is in the XTM Composer sections of OpenCTI integration settings, generated from the code: they list the opencti keys, and the openaev keys are the same.

SETTINGS, LAST ONE WINSXTM COMPOSERCONTAINER ENGINEconfig/default.yamlShipped in the imageconfig/<COMPOSER_ENV>.yamlproduction.yaml by defaultEnvironment variables__ between levelsXTM Composerdaemon.selector per platformDockerA containerPodmanA containerKubernetesA Deployment, the defaultDocker SwarmA replicated servicePortainerA container through its API
  1. config/default.yaml → XTM Composer: read first
  2. config/<COMPOSER_ENV>.yaml → XTM Composer: overrides
  3. Environment variables → XTM Composer: wins
  4. XTM Composer → Docker: docker
  5. XTM Composer → Podman: podman
  6. XTM Composer → Kubernetes: kubernetes
  7. XTM Composer → Docker Swarm: swarm
  8. XTM Composer → Portainer: portainer
XTM Composer merges three sources of settings, the last one winning, and creates each integration on the engine that the selector of its platform names

Where settings come from

XTM Composer merges three sources, the last one winning:

  1. config/default.yaml, shipped in the image at /opt/xtm-composer/config/default.yaml.
  2. config/<COMPOSER_ENV>.yaml, if it exists. COMPOSER_ENV is production by default, so the file is /opt/xtm-composer/config/production.yaml.
  3. Environment variables. A variable is the path of the key in capitals, with __ between levels: manager.logger.level is MANAGER__LOGGER__LEVEL, opencti.daemon.docker.network_mode is OPENCTI__DAEMON__DOCKER__NETWORK_MODE.

To use a file in a container, mount that one file, not the folder: default.yaml must stay in place.

docker run -d --name xtm-composer \
  -v "$PWD/production.yaml:/opt/xtm-composer/config/production.yaml:ro" \
  -v "$PWD/keys:/keys:ro" \
  -v /var/run/docker.sock:/var/run/docker.sock \
  filigran/xtm-composer:latest

Lists, such as extra_hosts or cap_add, go in the YAML file. A YAML file does not expand variables: write the values, or give secrets as environment variables.

XTM Composer itself

KeyEnvironment variableDefaultSet it to
manager.idMANAGER__IDdefault-manager-idA stable identifier, such as a UUID. The platforms know XTM Composer by it, and it labels every container XTM Composer manages
manager.nameMANAGER__NAMEFiligran connector managerThe name the platforms show
manager.credentials_key_filepathMANAGER__CREDENTIALS_KEY_FILEPATHThe path of the 4096-bit RSA private key, PKCS#8 PEM. Wins over credentials_key when both are set
manager.credentials_keyMANAGER__CREDENTIALS_KEYThe key itself, when you cannot mount a file
manager.execute_scheduleMANAGER__EXECUTE_SCHEDULE10Seconds between two reconciliations
manager.ping_alive_scheduleMANAGER__PING_ALIVE_SCHEDULE60Seconds between two pings to each platform
manager.image_tag_suffixMANAGER__IMAGE_TAG_SUFFIXNone, and -fips in the FIPS image of XTM Composer-fips or -ubi9, to run the FIPS or Red Hat Universal Base Image (UBI) builds of the integrations. Another value stops XTM Composer at start
manager.logger.levelMANAGER__LOGGER__LEVELinfotrace, debug, info, warn or error
manager.logger.formatMANAGER__LOGGER__FORMATjsonjson or pretty

One of credentials_key_filepath and credentials_key is required: XTM Composer stops at start without a key. When it serves OpenAEV alone, it reads the key only at its first registration, and logs the error then.

XTM Composer adds manager.image_tag_suffix to the tag of every integration image it deploys, for both platforms and on every container engine:

  • opencti/connector-mitre:6.9.0 becomes opencti/connector-mitre:6.9.0-fips, and an image without a tag gets latest-fips.
  • A tag that already ends with the suffix keeps it once, and an image pinned by digest (@sha256:…) stays as it is.
  • With a private registry, the suffix goes after the tag: registry.example.com/opencti/connector-mitre:6.9.0-fips.

Every integration you deploy needs an image with that tag. OpenAEV publishes no FIPS images, as Install offline or with FIPS 140-3 says. When the image cannot be pulled, XTM Composer deploys nothing and logs the reason on the integration in the platform: see Troubleshoot XTM Composer. An empty value turns the suffix off, in the FIPS image too: MANAGER__IMAGE_TAG_SUFFIX="".

Keep manager.logger.directory and manager.logger.console at their default, true: XTM Composer then writes its logs to its standard output and to daily files in a logs folder next to its executable.

The platforms

opencti and openaev take the same keys. Replace OPENCTI__ with OPENAEV__ for OpenAEV.

KeyEnvironment variableDefaultSet it to
opencti.enableOPENCTI__ENABLEtrue (false for openaev)true to serve this platform
opencti.urlOPENCTI__URLhttp://host.docker.internal:4000The URL of the platform, as XTM Composer and its integrations reach it. XTM Composer also gives it to every integration as OPENCTI_URL or OPENAEV_URL
opencti.tokenOPENCTI__TOKENChangeMeAn API token of the platform
opencti.unsecured_certificateOPENCTI__UNSECURED_CERTIFICATEfalsetrue to accept an invalid or self-signed certificate on the platform. Not for production
opencti.request_timeoutOPENCTI__REQUEST_TIMEOUT30Seconds before a request to the platform times out
opencti.connect_timeoutOPENCTI__CONNECT_TIMEOUT10Seconds before a connection to the platform times out
opencti.logs_scheduleOPENCTI__LOGS_SCHEDULE10Seconds between two sends of the logs of an integration

The proxy keys of each platform are in Run integrations behind a proxy, the registry keys in Pull integrations from a private registry.

The container engine

opencti.daemon.selector, or OPENCTI__DAEMON__SELECTOR, says where XTM Composer runs the integrations of the platform: docker, podman, kubernetes (the default), swarm or portainer. Each platform has its own daemon block, so OpenCTI and OpenAEV can use different engines.

The block of the selected engine shapes what XTM Composer creates for each integration: a container, a Swarm service or a Kubernetes Deployment. It sets the network the integration joins, how it resolves names, its Linux privileges and the resources it may use.

  • The options apply to every integration of the platform alike. There is no value per integration.
  • XTM Composer reads them when it creates a container. An integration already deployed gets a change only when its container is created again: change its configuration with Update, or remove its container.
  • The keys are under opencti.daemon.<engine>, and under openaev.daemon.<engine> for OpenAEV. A key with one value also takes an environment variable, such as OPENCTI__DAEMON__DOCKER__PRIVILEGED=false. A list or a map, such as cap_drop or sysctls, goes in the YAML file.
  • A key you leave out keeps the default of the engine.

OpenCTI integration settings gives the type of every key, engine by engine.

Docker

XTM Composer talks to the Docker daemon through its socket, mounted in the XTM Composer container, and starts each integration as a container next to it. The opencti.daemon.docker block is optional, and so is each of its keys: without them, the integrations get the defaults of Docker. The types are in XTM Composer: Docker.

Key under opencti.daemon.dockerEffect on the integration containersDefault
socket_pathThe Docker API socket XTM Composer uses, as a path or a unix:// URL/var/run/docker.sock
network_modeThe network they join. Name the network of the platform and RabbitMQ, xtm_default in xtm-docker: on another network, an integration cannot reach the platform and fails at start. host and none also workThe bridge network of Docker
extra_hostsLines added to their /etc/hosts, as host:ip. host-gateway as the IP stands for the hostNone
dnsThe DNS servers they useThose of the host
dns_searchThe domains added to a short host nameThose of the host
privilegedtrue gives them every privilege on the host. Leave it off unless an integration documents the needfalse
cap_addLinux capabilities added, such as NET_ADMINThe default set of Docker
cap_dropLinux capabilities removed. ALL removes every one: test your integrations after the changeThe default set of Docker
security_optSecurity options: no-new-privileges:true, a seccomp= or apparmor= profile, SELinux label= optionsThe profiles of Docker
userns_modeUser namespace. host turns off the remapping of a daemon set with userns-remapThe setting of the daemon
pid_modePID namespace. host lets them see the processes of the hostTheir own namespace
ipc_modeIPC namespace: private, shareable or hostThe default of the daemon
uts_modeUTS namespace. host gives them the host name of the hostTheir own namespace
runtimeThe OCI runtime declared in the daemon, such as runsc for gVisorThe default runtime, usually runc
shm_sizeThe size of /dev/shm, in bytes64 MB
sysctlsKernel parameters of their namespaces, as a map: net.ipv4.tcp_keepalive_time: "600"Those of the host
ulimitsResource limits, each with a name, a soft and a hard value. An entry without all three is ignoredThe limits of the daemon

Example CERT runs OpenCTI with xtm-docker on one host. It hardens the integrations: no Linux capability, no privilege escalation, its internal DNS, and more open files for the large feeds it imports.

opencti:
  daemon:
    selector: docker
    docker:
      network_mode: xtm_default
      extra_hosts:
        - "proxy.example.com:10.0.20.5"
      dns:
        - 10.0.0.53
      dns_search:
        - example.com
      privileged: false
      cap_drop:
        - ALL
      security_opt:
        - "no-new-privileges:true"
      shm_size: 134217728
      ulimits:
        - name: nofile
          soft: 65536
          hard: 65536
Podman

XTM Composer drives Podman through its Docker-compatible API socket, rootful or rootless, on a Linux host only. The opencti.daemon.podman block takes the keys of the Docker tab, with the same effect. The block is optional, and so is each of its keys. The types are in XTM Composer: Podman.

Key under opencti.daemon.podmanEffect on the integration containersDefault
socket_pathThe Podman API socket, as a path or a unix:// URL. Another scheme stops XTM Composer at startThe first socket that exists: $XDG_RUNTIME_DIR/podman/podman.sock, then /run/user/<uid>/podman/podman.sock (not for root), then /run/podman/podman.sock
network_modeThe network they join, such as the network of the platform. Check it with podman network inspectThe default network of Podman
extra_hosts, dns, dns_search, privileged, cap_add, cap_drop, security_opt, userns_mode, pid_mode, ipc_mode, uts_mode, runtime, shm_size, sysctls, ulimitsAs in the Docker tabThe defaults of Podman

XDG_RUNTIME_DIR is read from the environment of XTM Composer, at each attempt to find the socket.

Example CERT runs a rootful Podman on a Red Hat Enterprise Linux host, with the socket mounted in the XTM Composer container at the default path:

opencti:
  daemon:
    selector: podman
    podman:
      socket_path: /run/podman/podman.sock
      network_mode: xtm_default
      cap_drop:
        - ALL
      security_opt:
        - "no-new-privileges:true"
      ulimits:
        - name: nofile
          soft: 65536
          hard: 65536
Kubernetes

XTM Composer uses the service account of its pod, or the current kubeconfig context. It creates one Deployment per integration in its own namespace, with one replica when the integration is started and none when it is stopped. The default configuration holds the block, so the kubernetes selector works with no key. The types are in XTM Composer: Kubernetes.

Key under opencti.daemon.kubernetesEffect on the integration DeploymentsDefault
image_pull_policyWhen Kubernetes pulls the image: Always, IfNotPresent or Never. Another value logs a warning and falls back to IfNotPresentIfNotPresent
image_resourcesThe requests and limits of every integration container, in the Kubernetes resources format. YAML onlyNone: the LimitRange of the namespace applies, if any
base_deploymentA Deployment manifest XTM Composer starts every integration Deployment from. What XTM Composer sets wins: name, labels, replicas, the integration container. The rest of the base is kept, such as pod annotations, nodeSelector, tolerations, affinity or a pod securityContext. YAML onlyNone
base_deployment_jsonThe same manifest as a JSON string, for an environment variable. Read only when base_deployment is not set. A string that is not valid JSON makes XTM Composer fail when it deploys an integrationNone

Example CERT keeps its integrations on the nodes it dedicates to them, with bounded resources:

opencti:
  daemon:
    selector: kubernetes
    kubernetes:
      image_pull_policy: IfNotPresent
      image_resources:
        requests:
          cpu: 250m
          memory: 256Mi
        limits:
          cpu: "1"
          memory: 1Gi
      base_deployment:
        metadata:
          labels:
            team: example-cert
        spec:
          template:
            spec:
              nodeSelector:
                workload: integrations
              tolerations:
                - key: dedicated
                  operator: Equal
                  value: integrations
                  effect: NoSchedule
              securityContext:
                seccompProfile:
                  type: RuntimeDefault

Without a file, give the base as OPENCTI__DAEMON__KUBERNETES__BASE_DEPLOYMENT_JSON='{"spec":{"template":{"spec":{"nodeSelector":{"workload":"integrations"}}}}}'.

Docker Swarm

XTM Composer talks to /var/run/docker.sock on a Swarm manager node: there is no socket key. It creates one replicated service per integration, with one replica when the integration is started and none when it is stopped. The XTM stack runs on Docker Compose: use this engine when your platform runs on a Swarm cluster of your own.

The opencti.daemon.swarm block is required with the swarm selector, even with a single key: without it, XTM Composer stops at start with Missing swarm configuration. Every key in it is optional. The types are in XTM Composer: Docker Swarm.

Key under opencti.daemon.swarmEffect on the integration servicesDefault
networkThe overlay network the services attach to. Name the network of the platform and RabbitMQ, or the integrations cannot reach themNone
extra_hostsLines of their /etc/hosts, written as in that file: 10.0.20.5 proxy.example.com. XTM Composer passes them to Swarm as they are, so the host:ip form of Docker does not work hereNone
dns, dns_searchThe DNS servers and the search domains of the containersThose of the node
cap_add, cap_dropLinux capabilities added or removedThe default set of Docker
sysctlsKernel parameters of their namespaces, as a mapThose of the node
ulimitsResource limits, each with a name, a soft and a hard value. An entry without all three is ignoredThe limits of the daemon
hostnameThe host name of the containers. Every integration of the platform gets the same oneThe container ID
userThe user the containers run as, as uid:gid or a nameThe user of the image
read_onlytrue mounts the root filesystem read-only. An integration that writes files there failsfalse
inittrue runs an init process that forwards signals and reaps child processesThe default of the daemon
stop_grace_periodThe time a container gets to stop before it is killed, in nanoseconds: 10000000000 is 10 seconds10 seconds
resources.cpu_limitThe CPU a service may use, in nano CPUs: 1000000000 is one CPUNo limit
resources.memory_limitThe memory a service may use, in bytes. Above it, the container is killedNo limit
resources.cpu_reservationThe CPU a node must have free to run the service, in nano CPUsNone
resources.memory_reservationThe memory a node must have free to run the service, in bytesNone
placement_constraintsThe nodes the services may run on, such as node.role==worker or node.labels.integrations==trueAny node
placement_preferencesLabels to spread the services across, such as node.labels.zoneNone
restart_conditionWhen Swarm restarts a container: none, on-failure or any. Another value counts as anyany
restart_delayThe wait between two restarts, in nanoseconds5 seconds
restart_max_attemptsThe maximum number of restarts. 0 sets no limitNo limit

Example CERT runs OpenCTI on a Swarm cluster of three zones, with the overlay network xtm_backend. It runs the integrations on labelled worker nodes, spread across zones, within one CPU and 1 GB each:

opencti:
  daemon:
    selector: swarm
    swarm:
      network: xtm_backend
      extra_hosts:
        - "10.0.20.5 proxy.example.com"
      dns_search:
        - example.com
      cap_drop:
        - ALL
      init: true
      stop_grace_period: 30000000000
      resources:
        cpu_limit: 1000000000
        memory_limit: 1073741824
        cpu_reservation: 250000000
        memory_reservation: 268435456
      placement_constraints:
        - node.role==worker
        - node.labels.integrations==true
      placement_preferences:
        - node.labels.zone
      restart_condition: any
      restart_delay: 10000000000
      restart_max_attempts: 0
Portainer

XTM Composer creates the integration containers through the Portainer API, in one Docker environment of Portainer. It calls the Docker API that Portainer exposes for that environment, with the API key in the X-API-KEY header, and does not check the certificate of Portainer. Only network_mode and stack shape the containers: the container options of the Docker tab do not apply. The types are in XTM Composer: Portainer.

Key under opencti.daemon.portainerEffectDefault
apiThe Portainer URL, with its porthttps://host.docker.internal:9443, and https://localhost:9443 for OpenAEV
api_keyA Portainer access token of a user who manages containers in the environment. Give it as an environment variableChangeMe
env_idThe ID of the environment: the number in its address in Portainer3
env_typedocker, the only type supported. Another value stops XTM Composer at startdocker
api_versionThe Docker API version of the calls. Lower it for an older Docker Enginev1.44
stackA name set as the com.docker.compose.project label of each container, so that Portainer shows them in that stackNone, and opencti-dev for OpenAEV
network_modeThe network the containers join, such as the network of the platformNone, and opencti-dev_default for OpenAEV

The default configuration gives the openaev block stack: opencti-dev and network_mode: opencti-dev_default. When OpenAEV uses Portainer, set both: otherwise its integrations try to join a network that does not exist.

Example CERT manages its Docker host in Portainer, as environment 2, with the token given as OPENCTI__DAEMON__PORTAINER__API_KEY:

opencti:
  daemon:
    selector: portainer
    portainer:
      api: https://portainer.example.com:9443
      env_id: "2"
      env_type: docker
      api_version: v1.44
      stack: xtm
      network_mode: xtm_default

Show what an integration receives

To see the environment XTM Composer gives each container it starts, set MANAGER__DEBUG__SHOW_ENV_VARS=true: it logs a Starting connector line with the variables, secrets replaced by ***REDACTED***. MANAGER__DEBUG__SHOW_SENSITIVE_ENV_VARS=true shows the secrets too: use it only while you debug, then turn it off.

A complete example

ExampleServe both platforms of Example CERT from one Docker host

Example CERT runs OpenCTI and OpenAEV with xtm-docker. /opt/xtm-composer/config/production.yaml for an XTM Composer that serves both platforms on Docker, with the key mounted at /keys/private_key.pem and the tokens given as OPENCTI__TOKEN and OPENAEV__TOKEN:

manager:
  id: 8215614c-7139-422e-b825-b20fd2a13a23
  name: XTM Composer
  credentials_key_filepath: /keys/private_key.pem
opencti:
  enable: true
  url: http://opencti:8080
  daemon:
    selector: docker
    docker:
      network_mode: xtm_default
openaev:
  enable: true
  url: http://openaev:8080
  daemon:
    selector: docker
    docker:
      network_mode: xtm_default

Replace the id with a UUID of your own, generated once with python3 -c 'import uuid; print(uuid.uuid4())'. XTM Composer then registers with both platforms and starts their integrations on the xtm_default network.

Check that it works

Restart XTM Composer and read its first lines: it logs Starting XTM composer with its version and its image_tag_suffix, then Successfully loaded RSA private key (PKCS#8 format), then Manager registered for each platform it serves. A setting it cannot read stops it at start, with an error that names the setting.

What's next

NextDeploy a first integration with XTM Composer
Deploy
Install, configure, secure, scale and upgrade the platform.

Published

Overview
Run the XTM platform locally
OverviewDeploy with an AI agent