feat: bundle XTM One in the default stack#577
Open
azubiolo-filigran wants to merge 3 commits into
Open
Conversation
Adds XTM One alongside OpenCTI in the default compose: - New pgsql-copilot service (pgvector/pgvector:pg17) for XTM One's vector store, with dedicated credentials. - New xtm-one + xtm-one-worker services on port 4000, sharing the existing redis and minio. - PLATFORM_REGISTRATION_TOKEN shared secret plumbed into the opencti service (XTM__XTM_ONE_URL / XTM__XTM_ONE_TOKEN) and into XTM One (OPENCTI_* federation env vars). - .env.sample documents the new XTM ONE block. Refs XTM-One-Platform/xtm-one#1011
- Set APP__BASE_URL=http://opencti:8080 so OpenCTI validates the JWT
audience claim correctly (was using the external URL which doesn't
match what XTM One puts in the token).
- Set BASE_URL=http://xtm-one:4000 so the JWT issuer claim points to
the internal Docker hostname (OpenCTI fetches JWKS from {iss}/xtm/auth/jwks).
- Align XTM_ONE_ADMIN_EMAIL with OPENCTI_ADMIN_EMAIL so the JWT email
claim resolves to an existing user in OpenCTI.
- Use lowercase 'changeme' for XTM_ONE_ADMIN_PASSWORD to match OpenCTI convention.
Point to ../xtm-one for local builds without registry access.
Member
Updated: Build from local XTM One cloneThe compose file now includes # Clone both repos side-by-side
git clone git@github.com:OpenCTI-Platform/docker.git opencti-docker
git clone git@github.com:XTM-One-Platform/xtm-one.git xtm-one
cd opencti-docker
git checkout feat/xtm-one-default
# Create .env and start
cp .env.sample .env
sed -i "s/OPENCTI_ADMIN_TOKEN=ChangeMe_UUIDv4/OPENCTI_ADMIN_TOKEN=$(uuidgen)/" .env
sed -i "s|OPENCTI_ENCRYPTION_KEY=ChangeMeWithGeneratedBase64Key|OPENCTI_ENCRYPTION_KEY=$(openssl rand -base64 32)|" .env
sed -i "s/XTM_ONE_SECRET_KEY=ChangeMeWithGeneratedRandomString/XTM_ONE_SECRET_KEY=$(openssl rand -hex 32)/" .env
# Build and start
docker compose up -d --build
from #574 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ Tested: OpenCTI + XTM One Docker Setup
Clean
docker compose up -dfrom scratch — verified end-to-end.Steps to reproduce
Credentials
admin@opencti.iochangemeadmin@opencti.iochangemeWhat was verified
status=connected,base_url=http://opencti:8080iss=http://xtm-one:4000,aud=http://opencti:8080)Key fixes in this commit
APP__BASE_URL=http://opencti:8080— JWT audience validation must match the internal hostnameBASE_URL=http://xtm-one:4000— JWT issuer + JWKS fetch must use internal hostnameXTM_ONE_ADMIN_EMAIL=admin@opencti.io— must match OpenCTI admin so JWT email resolvesbuild: context: ../xtm-onefor local builds without registry accessDependency
Requires XTM-One-Platform/xtm-one#1070 (
fix/platform-registration-api-url-override) — addsOPENCTI_API_URLenv var support so the registration stores the internal Docker URL in the integration config instead of the platform-reported external URL.