Repository navigation
fix(compose): run the connectors with service accounts (#624) - #623
Conversation
Since the "User is not a service account" ingestion health check, the connectors running with the admin token show as degraded. - Import and analysis connectors create their own service account (CONNECTOR_AUTO_CREATE_SERVICE_ACCOUNT=true). - Export connectors impersonate the user requesting the export and need a service account with bypass: they take a dedicated token (CONNECTOR_EXPORT_FILE_*_TOKEN), and fall back to the admin token when it is not set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The runtime authorization change requires validation against deployed connector images, but the checkout lacks connector implementations and an integration harness to verify import and analysis permissions, confidence ceilings, and export impersonation.
No open issues 🎉
What changed in this PR
Updates both Compose deployments to support connector service accounts, addressing degraded ingestion health checks caused by using the admin account.
Changes:
- Enables automatic service-account creation for five import and analysis connectors.
- Adds dedicated token settings for STIX, CSV, and TXT export connectors, retaining the admin-token fallback.
- Documents export service-account setup and required bypass permissions.
| File | Description |
|---|---|
docker-compose.yml |
Configures service-account creation and export-token overrides. |
docker-compose.opensearch.yml |
Applies the same connector settings to the OpenSearch deployment. |
.env.sample |
Adds three export-token variables and account-setup instructions. |
Review effort: Balanced
Mathieu Cartaud (mcartaud)
left a comment
There was a problem hiding this comment.
Wasn't aware of this export connector specificity. Thanks :)
…nectors The import and analysis connectors create their own service account, with the pycti default max_confidence of 50 when the level is not set. They ran with the admin token before, so at 100: set 100 explicitly, as connector-opencti does. The level applies when no user asks for the work, such as enrichment (ImportExternalReference) and analysis (ImportDocumentAnalysis): a file import started by a user still runs with that user's confidence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fixed in 1625857: the five connectors now set CONNECTOR_AUTO_CREATE_SERVICE_ACCOUNT_CONFIDENCE_LEVEL=100, which keeps the confidence they had with the admin token, as connector-opencti does. |
pycti creates the service account of a connector only when a group named exactly "Connectors" exists. When it was renamed or deleted, the connector silently keeps OPENCTI_ADMIN_TOKEN and its ingestion health shows "User is not a service account" again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proposed changes
import-file-stix,import-document,import-file-yara,analysis,import-external-reference): addCONNECTOR_AUTO_CREATE_SERVICE_ACCOUNT=true, withCONNECTOR_AUTO_CREATE_SERVICE_ACCOUNT_CONFIDENCE_LEVEL=100(the confidence they had with the admin token). Each connector creates its own[C] <name>service account in theConnectorsgroup at start-up, then runs with it: fixed out of the box.export-file-stix,export-file-csv,export-file-txt): they impersonate the user requesting the export, which needs the "Bypass all capabilities" capability that theConnectorsgroup lacks, so their service account cannot be created automatically. They now readCONNECTOR_EXPORT_FILE_*_TOKEN, the token of a service account in a group with that capability (such asAdministrators), and fall back to the admin token when it is not set.docker-compose.ymlanddocker-compose.opensearch.yml..env.sampledocuments the three new variables, how to create the accounts, and the dependency on theConnectorsgroup.Related issue
closes #624