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

Missing entites in shared report #8333

Closed
marieflorescontact opened this issue Sep 13, 2024 · 0 comments
Closed

Missing entites in shared report #8333

marieflorescontact opened this issue Sep 13, 2024 · 0 comments
Assignees
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR) ui for scope limited to UI change
Milestone

Comments

@marieflorescontact
Copy link
Member

marieflorescontact commented Sep 13, 2024

Description

Some entites (System, Individual) are not shared when a Report is shared with organization

Environment

  1. OS (where OpenCTI server runs): { e.g. Mac OS 10, Windows 10, Ubuntu 16.4, etc. }
  2. OpenCTI version: { e.g. OpenCTI 1.0.2 }
  3. OpenCTI client: { e.g. frontend or python }
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Set a platform orga org A
  2. create a Report and add entities : System, Individual, Organization, Countries etc
  3. share the report with org B
  4. log with a user from org B
  5. Go to the Report > entities tab
  6. System and Individual are missing

Expected Output

all entites

Actual Output

all entities except System and Individual

we also have erros in backend:

{"category":"APP","errors":[{"attributes":{"from":"Individual","genre":"BUSINESS","http_status":400,"to":"Organization","type":"granted"},"message":"The relationship is not allowed","name":"FUNCTIONAL_ERROR","stack":"GraphQLErro
r: The relationship is not allowed\n    at error (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\config\\errors.js:7:10)\n    at FunctionalError (C:\\Users\\MarieFlores\\IdeaProjects\\open
cti\\opencti-platform\\opencti-graphql\\src\\config\\errors.js:94:50)\n    at checkRelationshipRef (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\database\\stix.ts:1183:11)\n    at C:\\Us
ers\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\utils\\modelConsistency.ts:32:9\n    at Array.forEach (<anonymous>)\n    at fn (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\op
encti-graphql\\src\\utils\\modelConsistency.ts:23:13)\n    at telemetry (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\config\\tracing.ts:121:10)\n    at checkRelationConsistency (C:\\Use
rs\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\utils\\modelConsistency.ts:36:10)\n    at createRelationRaw (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\
database\\middleware.js:2705:9)\n    at runNextTicks (node:internal/process/task_queues:60:5)\n    at processImmediate (node:internal/timers:442:9)\n    at process.callbackTrampoline (node:internal/async_hooks:130:17)\n    at cr
eateRelation (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\database\\middleware.js:2831:16)\n    at executeShare (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti
-graphql\\src\\manager\\taskManager.js:410:7)\n    at executeProcessing (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\manager\\taskManager.js:529:13)\n    at taskHandler (C:\\Users\\Mari
eFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\manager\\taskManager.js:592:22)\n    at C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\src\\manager\\taskManager.js:622:9
\n    at _SetIntervalAsyncTimer.#runHandlerAndScheduleTimeout (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\node_modules\\set-interval-async\\dist\\set-interval-async-timer.cjs:36:13)\n    at
 Timeout._onTimeout (C:\\Users\\MarieFlores\\IdeaProjects\\opencti\\opencti-platform\\opencti-graphql\\node_modules\\set-interval-async\\dist\\set-interval-async-timer.cjs:29:13)"}],"level":"error","message":"The relationship is not allowed","source":"backend","timestamp":"2024-09-19T09:07:31.447Z","version":"6.3.1"}

Additional information

Adding ENTITY_TYPE_IDENTITY_SYSTEM in STIX_ORGANIZATIONS_UNRESTRICTED in
opencti-platform/opencti-graphql/src/schema/stixDomainObject.ts fixes the issue but we need to be sure it does not break anything as STIX_ORGANIZATIONS_UNRESTRICTED has multiple uses.

Screenshots (optional)

@marieflorescontact marieflorescontact added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Sep 13, 2024
@marieflorescontact marieflorescontact self-assigned this Sep 13, 2024
@nino-filigran nino-filigran removed the needs triage use to identify issue needing triage from Filigran Product team label Sep 13, 2024
@nino-filigran nino-filigran added this to the Bugs backlog milestone Sep 18, 2024
@nino-filigran nino-filigran added the ui for scope limited to UI change label Sep 18, 2024
aHenryJard pushed a commit that referenced this issue Sep 20, 2024
marieflorescontact added a commit that referenced this issue Sep 27, 2024
marieflorescontact added a commit that referenced this issue Sep 27, 2024
marieflorescontact added a commit that referenced this issue Sep 27, 2024
marieflorescontact added a commit that referenced this issue Sep 30, 2024
marieflorescontact added a commit that referenced this issue Sep 30, 2024
marieflorescontact added a commit that referenced this issue Sep 30, 2024
marieflorescontact added a commit that referenced this issue Oct 2, 2024
marieflorescontact added a commit that referenced this issue Oct 2, 2024
marieflorescontact added a commit that referenced this issue Oct 2, 2024
marieflorescontact added a commit that referenced this issue Oct 2, 2024
marieflorescontact added a commit that referenced this issue Oct 2, 2024
@SamuelHassine SamuelHassine added the solved use to identify issue that has been solved (must be linked to the solving PR) label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected solved use to identify issue that has been solved (must be linked to the solving PR) ui for scope limited to UI change
Projects
None yet
Development

No branches or pull requests

3 participants