Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit stix_ids explosion by rewriting the standard_id in client python #659

Open
richard-julien opened this issue May 28, 2024 · 0 comments
Assignees
Labels
feature use for describing a new feature to develop

Comments

@richard-julien
Copy link
Member

richard-julien commented May 28, 2024

Use case

Limit stix_ids explosion by rewriting the standard_id in client python.

Context

As described in OpenCTI-Platform/opencti#6774 by @ckane , because of remote system or bad designed connectors, a lot of stix ids can be cumulated in an element.

This seems to be able to result in a long sequence of entries in redis, during re-ingestion of the same entity (such as a malware STIX type) with new randomly-assigned STIX ids. My observation is that these get added to the stream once for each new STIX id encountered for the same item, and the list of stix_ids in the added/updated entity can grow infinitely. This is the source of one of the reasons why redis memory consumption can grow so high, under some circumstances, despite implementing a low TRIMMING size (such as 100000).

Solution

We need to generate the standard id on the client python and replace dynamically all the ids with the predicted ones.
By default, drop the base id of the source but add an option to configure in the connector if you want to consolidate them.

  • a cleanup script for existing platform to remove all the bad stix_ids already written

Why not only a task in client python?

Its also a good moment to check and enforce the ids generation on opencti side

See OpenCTI-Platform/opencti#7158

@richard-julien richard-julien added the feature use for describing a new feature to develop label May 28, 2024
@richard-julien richard-julien self-assigned this May 28, 2024
richard-julien added a commit that referenced this issue Oct 7, 2024
richard-julien added a commit that referenced this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature use for describing a new feature to develop
Projects
None yet
Development

No branches or pull requests

1 participant