yeti icon indicating copy to clipboard operation
yeti copied to clipboard

mongoengine: remove references to deleted nodes

Open DigiAngel opened this issue 8 years ago • 7 comments
trafficstars

Description

Just need to delete a saved investigation as I was just testing.

Environment

Question Answer
Git commit commit 27ae09f83b0165c36c78297708b4a2e75c9a2dad
OS version Debian stretch
Browser Chrome 57.0.2987.133 (64-bit)

Steps to Reproduce

  1. Add new investigation via new malware
  2. Attempt to delete the test investigation

Expected behavior

To be able to remove the investication

Actual behavior

There's no button or link or anything that allows removing an investigation.

DigiAngel avatar Apr 01 '17 16:04 DigiAngel

This should already be possible. When you go to the investigation page (not the graph - by clicking on the name of the investigation), you should have a red button "Delete":

image

Could you confirm this is the case ?

gaelmuller avatar Apr 05 '17 11:04 gaelmuller

It is not...I do not have a delete button.  After deleting the Malware, now I get an error: On Wed, 2017-04-05 at 04:17 -0700, Gael Muller wrote:

This should already be possible. When you go to the investigation page (not the graph - by clicking on the name of the investigation), you should have a red button "Delete":

Could you confirm this is the case ? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

DigiAngel avatar Apr 05 '17 18:04 DigiAngel

More information. Is there a way I can just start over and delete everything? peek 2017-04-20 06-45

DigiAngel avatar Apr 20 '17 12:04 DigiAngel

We need to fix the fact that deleting a node breaks the investigation.

Since you cannot access the delete button, you can use the API to delete the investigation:

http -j DELETE http://YETI_URL/api/investigation/INVESTIGATION_ID

Or, directly in the mongo shell:

mongo
> use yeti
> db.investigation.remove({'_id': ObjectId('INVESTIGATION_ID')})
WriteResult({ "nRemoved" : 1 })

gaelmuller avatar Apr 20 '17 13:04 gaelmuller

Thanks..I ended up just dropping the entire investigation table and readding it. On Thu, 2017-04-20 at 06:45 -0700, Gael Muller wrote:

We need to fix the fact that deleting a node breaks the investigation. Since you cannot access the delete button, you can use the API to delete the investigation: http -j DELETE http://YETI_URL/api/investigation/INVESTIGATION_ID Or, directly in the mongo shell: mongo

use yeti db.investigation.remove({'_id': ObjectId('INVESTIGATION_ID')}) WriteResult({ "nRemoved" : 1 }) — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

DigiAngel avatar Apr 23 '17 12:04 DigiAngel

How can we go about this? Just delete the node and remove it from any investigations it's in?

tomchop avatar Oct 05 '17 21:10 tomchop

this can be closed i think, this is solved now

doomedraven avatar May 20 '19 14:05 doomedraven