Skip to content

Commit fde4635

Browse files
[docker] add xtm-composer (opencti #7328)
1 parent e03caf6 commit fde4635

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ CONNECTOR_EXPORT_FILE_TXT_ID=ca715d9c-bd64-4351-91db-33a8d728a58b
1313
CONNECTOR_IMPORT_FILE_STIX_ID=72327164-0b35-482b-b5d6-a5a3f76b845f
1414
CONNECTOR_IMPORT_DOCUMENT_ID=c3970f8a-ce4b-4497-a381-20b7256f56f0
1515
CONNECTOR_ANALYSIS_ID=4dffd77c-ec11-4abe-bca7-fd997f79fa36
16+
XTM_COMPOSER_ID=8215614c-7139-422e-b825-b20fd2a13a23
1617
SMTP_HOSTNAME=localhost
1718
ELASTIC_MEMORY_SIZE=4G
19+
COMPOSE_PROJECT_NAME=opencti

docker-compose.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
services:
2+
# Generate RSA key for xtm-composer (PKCS#8 format)
3+
rsa-key-generator:
4+
image: alpine/openssl:3.5.2
5+
volumes:
6+
- rsakeys:/keys
7+
entrypoint: ["/bin/ash"]
8+
command: ["-c", "if [ ! -f /keys/private_key.pem ]; then openssl genpkey -algorithm RSA -out /keys/private_key.pem -pkeyopt rsa_keygen_bits:2048; fi && tail -f /dev/null"]
9+
healthcheck:
10+
test: ["CMD", "test", "-f", "/keys/private_key.pem"]
11+
interval: 10s
12+
timeout: 5s
13+
retries: 3
14+
restart: always
215
redis:
316
image: redis:8.2.1
417
restart: always
@@ -70,8 +83,9 @@ services:
7083
timeout: 30s
7184
retries: 3
7285
opencti:
73-
image: opencti/platform:6.7.15
86+
image: opencti/platform:prerelease
7487
environment:
88+
- APP__ENABLED_DEV_FEATURES="[\"*\"]"
7589
- NODE_OPTIONS=--max-old-space-size=8096
7690
- APP__PORT=8080
7791
- APP__BASE_URL=${OPENCTI_BASE_URL}
@@ -221,10 +235,33 @@ services:
221235
depends_on:
222236
opencti:
223237
condition: service_healthy
238+
xtm-composer:
239+
image: filigran/xtm-composer:latest
240+
platform: linux/amd64
241+
environment:
242+
- MANAGER__ID=${XTM_COMPOSER_ID}
243+
- MANAGER__NAME=OpenCTI Connector Manager
244+
- MANAGER__CREDENTIALS_KEY_FILEPATH=/keys/private_key.pem
245+
- OPENCTI__ENABLE=true
246+
- OPENCTI__URL=http://opencti:8080
247+
- OPENCTI__TOKEN=${OPENCTI_ADMIN_TOKEN}
248+
- OPENCTI__DAEMON__SELECTOR=docker
249+
- OPENCTI__DAEMON__DOCKER__NETWORK_MODE=${COMPOSE_PROJECT_NAME}_default
250+
volumes:
251+
- /var/run/docker.sock:/var/run/docker.sock
252+
- rsakeys:/keys:ro # RSA key mounted as read-only
253+
depends_on:
254+
rsa-key-generator:
255+
condition: service_healthy
256+
opencti:
257+
condition: service_healthy
258+
rabbitmq:
259+
condition: service_healthy
260+
restart: always
224261

225262
volumes:
226263
esdata:
227264
s3data:
228265
redisdata:
229266
amqpdata:
230-
267+
rsakeys:

0 commit comments

Comments
 (0)