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

[Bug] Case Template content mixed across organisations #2068

Closed
martinr103 opened this issue Jun 8, 2021 · 1 comment · Fixed by #2079
Closed

[Bug] Case Template content mixed across organisations #2068

martinr103 opened this issue Jun 8, 2021 · 1 comment · Fixed by #2079
Assignees
Labels
bug priority:high High Priority TheHive4 TheHive4 related issues
Milestone

Comments

@martinr103
Copy link

martinr103 commented Jun 8, 2021

Request Type

Bug

Work Environment

Question Answer
OS version (server) Debian 10.3
TheHive version / git hash 4.1.4
Package Type Binary / in Docker
Database Cassandra
Index type Lucene
Attachments storage Local

Problem Description

Multi-Tenancy issue observed.

We have several organizations in TH.
We also have a set of case templates under each organization (the same templates [same names] exist under each organization).
The case templates include a few custom fields. One of the fields is called "customer_contact" and contains a certain email address. Obviously, the value of that custom field is specific depending on the Organization.
(i.e. lets say, as an example, we have
Org-A : template "case_template_1" : custom field "customer contact" = "[email protected]"
Org-B : template "case_template_1" : custom field "customer contact" = "[email protected]")
Based on the customer_contact field, external communication to the customer may be done, if necessary.

Now, just today I noticed the issue, that a newly created Case under Organization-A had the custom field "customer_contact" populated with the Organization-B contact !!
This is of course absolutely fatal, as the analysts most probably won't notice a wrong value there, and that may lead to cross-customer data contamination.

Steps to Reproduce

  1. under two organizations, prepare a case template with the same template-name under each org
  2. add a custom field in both templates, populate the custom field with different values under org-A and under org-B
  3. create an alert via API, specifying "X-Organisation" Header of organization A (payload of the createAlert API contains the template-name created in step 1)
  4. promote the alert to Case via API, specifying "X-Organisation" Header of organization A (payload of the createCase API also contains the template-name as created in step 1)
  5. check if the custom field in the newly created case contains the template value from org-A or org-B
@martinr103
Copy link
Author

Thanks a lot guys !!

To-om added a commit that referenced this issue Jun 11, 2021
#2068 Fix issue where case templates are mixed between orgs
@To-om To-om closed this as completed Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug priority:high High Priority TheHive4 TheHive4 related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants