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

Better handling of concurrent integration #217

Closed
richard-julien opened this issue Sep 13, 2019 · 0 comments
Closed

Better handling of concurrent integration #217

richard-julien opened this issue Sep 13, 2019 · 0 comments
Assignees
Labels
feature use for describing a new feature to develop solved use to identify issue that has been solved (must be linked to the solving PR) technical improvement Technical refactor or improvement is needed
Milestone

Comments

@richard-julien
Copy link
Member

richard-julien commented Sep 13, 2019

Problem to Solve

With the current splitting of stix2 in the client-python and the way the worker connector absorb the data, we can create some element duplications.

Current Workaround

Limit the number of worker to 1. That is not really cool for absorption speed.

Proposed Solution

STIX_ID is a key

Move STIX_ID to key in grakn schema.

MISP Connector

Adapt the UUID generator to generate the same UUID for the same element name (lowercase).

CVE Connector

Adapt the UUID generator to generate the same UUID for the same CVE Key.

All connectors (extra)

Implements the local state storage to make connector smarter.
Connector docker must have a volume accessible to store his state. Base on this state, the connector should not retrieve everything.

Worker

  • If the creation fail because of duplicate STIX_ID, just retry.
  • If the creation fail because of a technical issue, just retry until it works.
  • Any other errors should discard the payload

Limitations

With multiple different connectors working on the same data at the same time but with a different STIX_ID it will be possible to have a duplication.

Additional Information

Should also fix OpenCTI-Platform/client-python#18

Hints

STIX_ID migration https://discuss.grakn.ai/t/key-attribute-and-migration/1293

@richard-julien richard-julien transferred this issue from OpenCTI-Platform/client-python Sep 13, 2019
@richard-julien richard-julien added this to the Release 1.2.0 milestone Sep 13, 2019
@SamuelHassine SamuelHassine added feature use for describing a new feature to develop technical improvement Technical refactor or improvement is needed labels Sep 13, 2019
@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Oct 17, 2019
SamuelHassine pushed a commit that referenced this issue Oct 22, 2019
…chitecture (#130)

* Starting work around minio
* Introduce File manager component and use it in report
* Adapt file manager UI
* Prepare the export api
* Refactor to move import and export files at stix entity level
* Adapt view and backend to log file actions
* Add file management in thread actors
* Refactor functions to move everything we need at StixDomainEntity level
* Remove unused info and add capacity to delete in progress export after 5 min
* Adapt deletion + fix dependencies errors from yarn control
* Start transformation of the worker. Provide API round queue management
* Introducing Jobs and failure reporting
* Re activate auto refresh
* Add jobs management, massive update
* Fix relayjs query typo
* Introduce global import menu. Adapt the entity import and export
* Fixing tests by replacing the matchAll function
* Handle deletion of global imports
* Remove unused import
* Adapt usage of interface, update of dependencies
* [frontend/api] Introduce key for internal_id and stix_id for avoid race conditions (#217)
* [api] Fix migations if starting fresh (#217)
* [api] Fix migations if starting fresh (#217)
* [api] Fix migations if starting fresh (#217)
* [api] Fix migations if starting fresh (#217)
* Adapt work and jobs to use elastic. Worker changed to report jobs
* Cleanup the grakn schema
* Fix comments
* Add delete button in observable enrichment
* Refactoring of createdByRef, markingDef and KillChain functions
* Fix duplicate and adapt readtx
* Fix deepScan warning
* Fix deepScan warning
* Adapt schema for internal_id_key
* Adapt for internal_key
* [api/frontend] Enhance display and fix some bugs
SamuelHassine pushed a commit that referenced this issue Oct 22, 2019
…chitecture (#130)

* Starting work around minio

* Introduce File manager component and use it in report

* Adapt file manager UI

* Prepare the export api

* Refactor to move import and export files at stix entity level

* Adapt view and backend to log file actions

* Add file management in thread actors

* Refactor functions to move everything we need at StixDomainEntity level

* Remove unused info and add capacity to delete in progress export after 5 min

* Adapt deletion + fix dependencies errors from yarn control

* Start transformation of the worker. Provide API round queue management

* Introducing Jobs and failure reporting

* Re activate auto refresh

* Add jobs management, massive update

* Fix relayjs query typo

* Introduce global import menu. Adapt the entity import and export

* Fixing tests by replacing the matchAll function

* Handle deletion of global imports

* Remove unused import

* Adapt usage of interface, update of dependencies

* [frontend/api] Introduce key for internal_id and stix_id for avoid race conditions (#217)

* [api] Fix migations if starting fresh (#217)

* [api] Fix migations if starting fresh (#217)

* [api] Fix migations if starting fresh (#217)

* [api] Fix migations if starting fresh (#217)

* Adapt work and jobs to use elastic. Worker changed to report jobs

* Cleanup the grakn schema

* [frontend] Working on diagram!

* Fix comments

* Add delete button in observable enrichment

* [frontend] Working on graph

* Upgrade dependencies

* Refactoring of createdByRef, markingDef and KillChain functions

* Fix duplicate and adapt readtx

* Fix deepScan warning

* Fix deepScan warning

* [frontend] Handle relation to relation in the knowledge graph

* Adapt schema for internal_id_key

* Adapt for internal_key

* [frontend] Handle relation to relation

* [frontend] Graph is now working (#34)

* [frontend] Graph is now working (#34)

* [frontend] Add marking definitions to StixDOmainEntity edition

* [frontend] Add marking definitions to StixDOmainEntity edition

* [frontend] Fix relation actions icons and entities update

* [api/frontend] Enhance display and fix some bugs

* [frontend] Refactor the views of files management
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 solved use to identify issue that has been solved (must be linked to the solving PR) technical improvement Technical refactor or improvement is needed
Projects
None yet
Development

No branches or pull requests

2 participants