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

Connect the modules to each other

Register OpenCTI, OpenAEV and OpenCRQ with XTM One, link OpenCTI and OpenAEV, connect OpenCRQ to both, and give XTM Composer its tokens, with the public and internal URLs each link uses.

All modulesFor platform engineers

This page connects the modules of the XTM stack: OpenCTI, OpenAEV and OpenCRQ to XTM One, OpenCTI and OpenAEV to each other, OpenCRQ to both, and XTM Composer to both. xtm-docker wires every link from .env, so on a new stack you mostly set one shared secret and check the result. Read it too when you publish the platforms on other URLs, or run a module outside xtm-docker.

INTEGRATIONSPLATFORMSAT THE CENTERXTM ComposerDeploys integrations in DockerOpenCTIhttp://opencti:8080OpenAEVhttp://openaev:8080OpenCRQhttp://opencrq:3002XTM Onehttp://xtm-one:4000
  1. XTM Composer → OpenCTI: OpenCTI admin token
  2. XTM Composer → OpenAEV: OpenAEV admin token
  3. OpenAEV → OpenCTI: security coverage
  4. OpenCTI → XTM One: registration token
  5. OpenAEV → XTM One: registration token
  6. OpenCRQ → XTM One: registration token
  7. OpenCRQ → OpenCTI: reads threats
  8. OpenCRQ → OpenAEV: reads results
  9. XTM One → OpenCTI: calls as the user
  10. XTM One → OpenAEV: calls as the user
OpenCTI, OpenAEV and OpenCRQ register with XTM One, OpenAEV answers security coverage requests from OpenCTI, OpenCRQ reads both, and XTM Composer runs the integrations of OpenCTI and OpenAEV

Before you start

LinkWhere it is set in xtm-dockerAddressCredential
OpenCTI registers with XTM Oneopencti serviceXTM__XTM_ONE_URL=http://xtm-one:4000XTM__XTM_ONE_TOKEN, from PLATFORM_REGISTRATION_TOKEN
OpenAEV registers with XTM Oneopenaev serviceOPENAEV_XTM_ONE_URL=http://xtm-one:4000OPENAEV_XTM_ONE_TOKEN, from PLATFORM_REGISTRATION_TOKEN
OpenCRQ registers with XTM Oneopencrq serviceXTM_ONE__URL=http://xtm-one:4000, and the public URL of OpenCRQ in XTM_ONE__PLATFORM_URLXTM_ONE__TOKEN, from PLATFORM_REGISTRATION_TOKEN
XTM One accepts the registrationsxtm-one and xtm-one-worker servicesPLATFORM_REGISTRATION_TOKEN
XTM One calls OpenCTI, OpenAEV and OpenCRQxtm-one serviceOPENCTI_API_URL=http://opencti:8080, OPENAEV_API_URL=http://openaev:8080, OPENCRQ_API_URL=http://opencrq:3002A short-lived token signed for each user
OpenAEV answers OpenCTIopenaev serviceopenaev.xtm.opencti.api-url=http://opencti:8080/graphqlOPENAEV_XTM_OPENCTI_TOKEN, from OPENCTI_ADMIN_TOKEN
OpenCTI links to OpenAEVopencti serviceXTM__OPENAEV_URL (public)None: a link in the interface
OpenCRQ reads OpenCTI, for one tenantopencrq serviceCONNECTORS__OPENCTI__<tenant>__URLCONNECTORS__OPENCTI__<tenant>__TOKEN
OpenCRQ reads OpenAEV, for one tenantopencrq serviceCONNECTORS__OPENAEV__<tenant>__URLCONNECTORS__OPENAEV__<tenant>__TOKEN
XTM Composer runs integrationsxtm-composer servicehttp://opencti:8080, http://openaev:8080OPENCTI_ADMIN_TOKEN, OPENAEV_ADMIN_TOKEN

This version of OpenCTI signs no short-lived token for XTM One. At each registration, it creates for every user with an email an API token named XTM One, which never expires, and sends it to XTM One, which calls OpenCTI with it. A revoked XTM One token is created again at the next registration.

Register the platforms with XTM One

Each platform registers itself with XTM One, then registers again every 5 minutes: the registration is also its heartbeat. Once a platform is registered, its users get the XTM One assistant in its interface, and XTM One can work with its data.

  1. Generate the registration token and put it in .env. OpenCTI, OpenAEV, OpenCRQ, xtm-one and xtm-one-worker all read this one variable, so the value is the same everywhere.

    TOKEN=$(openssl rand -hex 32)
    sed -i.bak "s/^PLATFORM_REGISTRATION_TOKEN=.*/PLATFORM_REGISTRATION_TOKEN=${TOKEN}/" .env
    
    Warning

    A platform outside xtm-docker, or a second XTM One, must use the exact same value. XTM One refuses every registration while the token is not set, and the published default xtm-default-registration-token cannot register a new platform. After 10 failed attempts in a minute, XTM One refuses a client with HTTP 429 until the minute ends.

  2. Give XTM One the admin email of the platforms. XTM One matches users by email between the modules, so XTM_ONE_ADMIN_EMAIL must be the admin email of OpenCTI and OpenAEV.

    grep -E '^(OPENCTI|OPENAEV|XTM_ONE)_ADMIN_EMAIL=' .env
    

    The three lines show the same address.

  3. Apply the change.

    docker compose up -d
    

    OpenCTI and OpenAEV register 30 seconds after they start, OpenCRQ as soon as it starts.

    Check that it worked

    This version of OpenCTI does not report XTM One among its dependencies. Check that it logs no registration failure:

    docker compose logs opencti | grep "\[XTM One\] Registration failed"
    

    The command prints nothing.

    For OpenCRQ, docker compose logs opencrq | grep "Registered with XTM One" prints a line: see Finish the setup of OpenCRQ.

    In XTM One, My Profile > MCP Endpoint shows each registered platform as Connected.

Public and internal URLs

Each module has two URLs, and the signed calls between them use both.

  • The public URL is the one users open in their browser. It is also the module's identity: every token a module signs names it as the issuer, and every token sent to a module must be addressed to it. xtm-docker builds it from *_EXTERNAL_SCHEME, *_HOST and *_PORT in .env, and passes it as APP__BASE_URL to OpenCTI, OPENAEV_BASE-URL to OpenAEV, XTM_ONE__PLATFORM_URL to OpenCRQ, and BASE_URL to both XTM One containers.
  • The internal URL is only where the other containers connect: http://opencti:8080, http://openaev:8080, http://opencrq:3002 and http://xtm-one:4000. The public host names therefore do not need to resolve inside Docker. OpenCRQ opens OpenCTI objects at the internal URL of its connection, as Connect the first tenant describes.

When you publish the platforms on other URLs, change the three variables of each platform together, with the scheme set to https over TLS, as described in Publish the platforms over HTTPS. Keep these rules:

  • BASE_URL must be the same on xtm-one and xtm-one-worker: the worker signs the tokens of background work, and the platforms refuse a token from another issuer. xtm-docker sets both from the same variables.

  • Keep XTM_AUTH_ACCEPTED_AUDIENCES=http://xtm-one:4000 on xtm-one. It lets XTM One accept tokens addressed to the URL the platforms reach it on.

  • Keep the clocks of the hosts synchronized with NTP. Each module signs its tokens for 10 minutes, and XTM One refuses a token from a clock more than 60 seconds ahead.

    This version of OpenCTI signs the tokens of its calls to the XTM One assistant for one hour, with no issuer nor audience, and has no setting for that lifetime.

Check that it worked

XTM One publishes the identity it signs with:

curl -s "http://localhost:$XTM_ONE_PORT/xtm/auth/metadata"

The issuer is the public URL of XTM One, such as https://xtm-one.example.com, whatever URL you reach it on.

If the assistant answers but every action on a platform's data fails with 401, look for the reason in the XTM One logs: the message names the issuer, the audience or the key URL that did not match.

docker compose logs xtm-one | grep "XTM JWT rejected"

xtm-docker links the two platforms in both directions:

OpenAEV to OpenCTI

OpenAEV registers in OpenCTI as an enrichment connector named OpenAEV Coverage - <tenant>, which answers the security coverage requests of OpenCTI.

Setting on openaevValue in xtm-dockerRole
OPENAEV_XTM_OPENCTI_ENABLEtrueTurns the link on
OPENAEV_XTM_OPENCTI_URLThe public URL of OpenCTILinks to OpenCTI
openaev.xtm.opencti.api-url, passed in SPRING_APPLICATION_JSONhttp://opencti:8080/graphqlThe API OpenAEV calls. Without it, OpenAEV calls the public URL followed by /graphql
OPENAEV_XTM_OPENCTI_TOKEN${OPENCTI_ADMIN_TOKEN}The OpenCTI token OpenAEV registers with

The api-url key holds a hyphen, which Spring does not read from an environment variable of that form, so xtm-docker passes it as JSON. These keys configure the default tenant of OpenAEV. With several tenants, each one has its own keys, openaev.xtm.opencti.<tenant id>.enable, .url, .api-url and .token: see OpenAEV configuration.

OpenCTI to OpenAEV

OpenCTI reads one setting: XTM__OPENAEV_URL, the public URL of OpenAEV. The OpenAEV entry of the product switcher in the OpenCTI interface opens it, and shows Platform connected while it is set.

xtm-docker also sets XTM__OPENAEV_API_URL=http://openaev:8080 and XTM__OPENAEV_TOKEN=${OPENAEV_ADMIN_TOKEN} on opencti. OpenCTI reads neither: it makes no call to OpenAEV, so no certificate setting applies to this link. The coverage data comes from OpenAEV, through the connector of the other tab.

xtm:opengrc_url (XTM__OPENGRC_URL) is the URL of OpenCRQ, under its former name, OpenGRC. OpenCTI passes it to the interface, but no screen uses it yet. A later release renames it after OpenCRQ, still reads this name as a deprecated fallback, and adds OpenCRQ to the product switcher. xtm-docker sets both names to the public URL of OpenCRQ: XTM__OPENGRC_URL, the one OpenCTI 7.261119.0 reads, and XTM__OPENCRQ_URL, the one later releases read first.

xtm-docker also sets APP__GRAPHQL__PLAYGROUND__FORCE_DISABLED_INTROSPECTION=false on opencti. OpenAEV sends a GraphQL introspection query before it registers its coverage connector, and OpenCTI refuses introspection by default since 7.261109.0: without this setting, the connector of the other tab does not register. See Query OpenCTI with GraphQL.

Check that it worked

List the connectors OpenCTI knows:

curl -s "http://localhost:$OPENCTI_PORT/graphql" \
  -H "Authorization: Bearer $OPENCTI_ADMIN_TOKEN" -H 'Content-Type: application/json' \
  -d '{"query":"{ connectors { name active connector_scope } }"}'

The list holds OpenAEV Coverage - 2cffad3a-0001-4078-b0e2-ef74274022c3, the default tenant of OpenAEV, with the scope security-coverage.

OpenCRQ reads the threats of OpenCTI and the simulation results of OpenAEV, for each of its tenants separately. The connection of a tenant is two variables per platform on the opencrq service, keyed by the tenant's identifier, which its Settings > Parameters page in OpenCRQ shows under Identifier: see Connect the first tenant, and every connector in Connectors of each tenant.

A connection set this way comes up enabled. At each start, for every tenant it holds with these variables, OpenCRQ does the following:

  • OpenAEV. It creates the service account OpenAEV (deployment) in the tenant's Connectors group, and binds the OpenAEV connector to it.
  • OpenCTI. It creates the Live Stream OpenCRQ threat feed in OpenCTI, with the token of the connection, or brings its filter back to what OpenCRQ needs: the Intrusion Sets, Threat Actors, Campaigns and Reports, and the targets, uses and attributed-to relationships between them and what they target or use. It then binds that stream with the service account OpenCTI (deployment).

xtm-docker also prepares the other direction, from OpenAEV to OpenCRQ, for an OpenAEV release that reads it: on openaev, OPENAEV_XTM_OPENCRQ_URL (the public URL of OpenCRQ), OPENAEV_XTM_OPENCRQ_TOKEN (OPENCRQ_ADMIN_TOKEN) and openaev.xtm.opencrq.api-url (http://opencrq:3002/trpc, in SPRING_APPLICATION_JSON). OpenAEV 3.261118.0 reads none of them. The same SPRING_APPLICATION_JSON turns on BULK_SNAPSHOT_EXPORT, the preview feature of OpenAEV that the OpenAEV connector of OpenCRQ reads the simulation results from: see Read the snapshot export of OpenAEV.

These steps never replace a choice a tenant administrator made in Integrations: an account already bound, a stream already chosen or a connector turned off stay as they are. A variable that names a tenant the platform does not hold is skipped, and a platform that does not answer leaves its connector for the next start. xtm-docker sets these variables for the tenant of OPENCRQ_TENANT_ID, by default the tenant OpenCRQ creates at its first start, which is therefore connected from that start. For a tenant created later, in the Enterprise Edition, add its variables and run docker compose up -d so that OpenCRQ starts again and connects it.

To create or update its stream, the user of the OpenCTI token needs Manage data sharing or Bypass all capabilities: the admin token of OpenCTI holds the second. With another token, OpenCRQ changes nothing in OpenCTI, and a connector nobody configured stays idle, its page saying which capability the token lacks. Grant the capability in OpenCTI and restart OpenCRQ, or let a tenant administrator choose a stream with Configure: see Connect OpenCTI with a Live Stream. OpenCRQ finds its stream again by a marker in the stream's description, so a stream renamed in OpenCTI still counts; an edit to its filter is replaced at the next start.

Check that it worked

Ask OpenCTI for its streams:

curl -s "http://localhost:$OPENCTI_PORT/graphql" \
  -H "Authorization: Bearer $OPENCTI_ADMIN_TOKEN" -H 'Content-Type: application/json' \
  -d '{"query":"{ streamCollections { edges { node { name stream_live } } } }"}'

The list holds OpenCRQ threat feed, with stream_live set to true. In OpenCRQ, the tenant's Settings > Security > Service accounts lists OpenCTI (deployment) and OpenAEV (deployment).

Give XTM Composer its tokens

XTM Composer deploys and runs the integrations that users choose in the interface of OpenCTI and OpenAEV. xtm-docker configures it from .env:

Setting on xtm-composerValue in xtm-dockerRole
MANAGER__ID${XTM_COMPOSER_ID}The identifier of this XTM Composer, a UUID
OPENCTI__ENABLE, OPENAEV__ENABLEtrue, trueIt manages both platforms
OPENCTI__URL, OPENAEV__URLhttp://opencti:8080, http://openaev:8080The platforms, inside the stack
OPENCTI__TOKEN, OPENAEV__TOKEN${OPENCTI_ADMIN_TOKEN}, ${OPENAEV_ADMIN_TOKEN}The token it uses on each platform
OPENCTI__DAEMON__DOCKER__NETWORK_MODE, OPENAEV__DAEMON__DOCKER__NETWORK_MODE${COMPOSE_PROJECT_NAME}_defaultThe Docker network of the integrations it starts, so that they reach the platforms by service name
MANAGER__CREDENTIALS_KEY_FILEPATH/keys/private_key.pemThe RSA key that the rsa-key-generator service creates at the first start, in the rsakeys volume

Every other setting of XTM Composer is in Configure XTM Composer.

What's next

NextExtract intelligence from documents on premises
Deploy
Install, configure, secure, scale and upgrade the platform.

Published

Overview
Run the XTM platform locally
OverviewDeploy with an AI agent