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

Prevent deletion of the organization that is used as plateforme organization or attibuted to a user #8838

Closed
aHenryJard opened this issue Oct 30, 2024 · 2 comments · Fixed by #8903
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)

Comments

@aHenryJard
Copy link
Member

Description

Prevent deletion of the organization that is used as plateforme organization or attibuted to a user.

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 } 6.3.7
  3. OpenCTI client: { e.g. frontend or python }
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

scenario 1

  1. Set a platform organization (let's say "Org1")
  2. Go to Entities > Organization
  3. Search and delete "Org1"

scenario 2

  1. In a user detail, add an organization (let's say "Org2")
  2. Go to Entities > Organization
  3. Search and delete "Org2"

Expected Output

scenario 1 => in security > policy : plateform orga disapear, but in database there is still an org id in settings
scenario 2 => in user detail > orga disappear and there is a dash instead

Actual Output

scenario 1 => in security > policy : plateform orga should stay*
scenario 2 => in user detail > orga should stay

Additional information

Verify that the rentention policy still works when there is an plateform orga in the list of "old" data.

Screenshots (optional)

@aHenryJard aHenryJard added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Oct 30, 2024
@nino-filigran nino-filigran removed the needs triage use to identify issue needing triage from Filigran Product team label Oct 31, 2024
@nino-filigran nino-filigran added this to the Bugs backlog milestone Oct 31, 2024
@SouadHadjiat SouadHadjiat self-assigned this Nov 5, 2024
@SouadHadjiat
Copy link
Member

About retention policy, I think it can be risky to include organizations as entities that can be deleted by retention manager, since organizations are possible authors of knowledge (+ can be plaform orga or attributed to users). We might loose the information that organizations created knowledge because retention manager lists entities by modification date. What should we do ? @nino-filigran

@nino-filigran
Copy link

Hello @SouadHadjiat & @aHenryJard! I've talked with @romain-filigran about this topic & the expected output is not the correct one:

  • we should not allow the deletion of any entity that is either platform orga AND/OR associated to any users.

This should apply also on retention policies.
Regarding the fact of deleting an orga that is potentially an author, we do not yet have any strong opinion on the topic, given that you can still have in theory, the presence of the org directly in the audit log.

@SouadHadjiat SouadHadjiat linked a pull request Nov 5, 2024 that will close this issue
5 tasks
@SouadHadjiat SouadHadjiat added the solved use to identify issue that has been solved (must be linked to the solving PR) label Nov 8, 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)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants