You are reading the documentation of OpenCTI 7.260811 LTS · 7.260811.0-lts.1, supported until 2027-09.Latest is 7.261119.0 →
How-to guide

Choose what activity is recorded

Choose the users, groups and organizations whose reads, files and exports OpenCTI records, and send the audit log to files, the console or your log pipeline.

OpenCTIEnterprise EditionFor administrators and platform engineers

OpenCTI records the administration and security actions of every user without any setting. This page shows how to add extended activity for chosen users, groups or organizations, and how to route the audit log to your log pipeline. Read Audit who did what first for what each kind of record covers.

Before you start

  • Your platform has an Enterprise Edition license.
  • Your role has the Access security activity capability.
  • To change where the audit log goes, you can edit the platform configuration and restart the platform.

Listen to users, groups or organizations

Extended activity records what people read, upload, download, import, export and search. It costs storage and indexing time, so listen to the people who need it rather than to everyone.

  1. Open Settings, then Activity, then Configuration.

  2. In Extended activity logging, choose a user in Add a user, a group in Add a group, or an organization in Add an organization. It is added to the list below at once.

  3. Repeat for everyone to listen to. A group or an organization covers all its members.

    OpenCTI 7.260811.0-lts.1

Recording starts right away; actions taken before are not recovered. To stop listening, click the delete icon on the line of the user, group or organization.

Check that it works

Log in as a listened user, open a report and download one of its files. In Settings, then Activity, then Events, filter on that user: a read event and a file event with the scope download appear. See Activity events.

Send activity to your log pipeline

Besides the events screen, OpenCTI writes audit events as JSON lines to a daily audit.log file and to the console, where a container log collector picks them up. Set these keys in the platform configuration, or as environment variables, then restart the platform:

Key (environment variable)DefaultUse it to
app:audit_logs:logs_files (APP__AUDIT_LOGS__LOGS_FILES)trueWrite the audit.log file, one per day
app:audit_logs:logs_directory (APP__AUDIT_LOGS__LOGS_DIRECTORY)./logsChoose the folder of the file. In a container, mount a volume there, or the files are lost when the container is replaced
app:audit_logs:logs_max_files (APP__AUDIT_LOGS__LOGS_MAX_FILES)7Choose how many daily files are kept. Older files are deleted
app:audit_logs:logs_console (APP__AUDIT_LOGS__LOGS_CONSOLE)trueWrite the events to the console
app:audit_logs:logs_in_transports (APP__AUDIT_LOGS__LOGS_IN_TRANSPORTS)["administration"]Add extended to also write extended events to the file and the console
app:audit_logs:trace_request_headers (APP__AUDIT_LOGS__TRACE_REQUEST_HEADERS)["user-agent", "x-forwarded-for"]Choose the HTTP headers recorded with each event

Turning off both logs_files and logs_console stops the audit log, not the activity: the events screen and the triggers keep working.

ExampleLog the work of external contractors in detail

Example CERT lets the contractors of its partner Harbor Security work on its platform, and its security team must keep a trace of everything they read and download, in its log pipeline as well as in OpenCTI.

  1. In Settings, then Activity, then Configuration, choose the Harbor contractors group in Add a group. Every current and future member of the group is listened to, such as Sam Reyes.
  2. Add the analysts of the team who handle sensitive cases one by one in Add a user, rather than their whole group.
  3. Write the extended events to the console and to the audit.log file too, keep 30 daily files on a mounted volume, and record the client address the reverse proxy sets, then restart the platform. With Docker Compose:
services:
  opencti:
    environment:
      APP__AUDIT_LOGS__LOGS_IN_TRANSPORTS: '["administration","extended"]'
      APP__AUDIT_LOGS__LOGS_DIRECTORY: /opt/opencti/audit
      APP__AUDIT_LOGS__LOGS_MAX_FILES: 30
      APP__AUDIT_LOGS__TRACE_REQUEST_HEADERS: '["user-agent","x-forwarded-for","x-real-ip"]'
    volumes:
      - opencti-audit:/opt/opencti/audit
volumes:
  opencti-audit:

When Sam Reyes downloads the PDF of the report "Night-time exports from a hotel booking platform", the events screen shows a file event with the scope download, and the same event reaches the log collector as a JSON line. Analysts outside the listened group and users leave only their administration and security events, which keeps the volume low.

The configuration reference lists these keys with the rest. The format of a log line is in Activity events.

What's next

NextActivity events
OpenCTI
Cyber threat intelligence as a knowledge graph: ingest, analyze, automate, share.

Published

Overview