TheHive-Project / TheHive

TheHive: a Scalable, Open Source and Free Security Incident Response Platform
https://thehive-project.org
GNU Affero General Public License v3.0
3.43k stars 623 forks source link

[Bug] All attachments in task logs disappeared following upgrade to 4.1.1 #1894

Closed H2Cyber closed 3 years ago

H2Cyber commented 3 years ago

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu Server 20.04
TheHive version / git hash 4.1.1, upgraded from 4.0.5
Package Type DEB

Problem Description

Following an upgrade from 4.0.5 to 4.1.1, all the attachments (images, .msg emails, etc.) that were included in task logs of old cases have disappeared.

H2Cyber commented 3 years ago

The attachments seem present on disk (under casefiles/attachment), but are completly absent in the GUI, which is a bummer (as we use attachments to add valuable investigation data to cases).

Let me know if I can provide anything to help troobleshoot.

nadouani commented 3 years ago

Is this a duplicate of #1875 ?

nadouani commented 3 years ago

What type of storage provider do you use?

H2Cyber commented 3 years ago

What type of storage provider do you use?

## Database configuration
db.janusgraph {
  storage {
    backend: cql
    hostname: [
      "127.0.0.1"
    ]
    cql {
      cluster-name: thp
      keyspace: thehive
      read-consistency-level: ONE
      write-consistency-level: ONE
    }
  }
    # Index configuration
    index {
      search {
        backend: lucene
        directory: /data/thehive/index
      }
    }
}

## Attachment storage configuration
storage {
  provider: localfs
  localfs.location: /data/thehive/casefiles
}
H2Cyber commented 3 years ago

Is this a duplicate of #1875 ?

Very likely yes, then I guess it should be fixed in 4.1.2

nadouani commented 3 years ago

@To-om if this is duplicate of #1875 please just label it as duplicate

To-om commented 3 years ago

It is not the same issue. In #1875 logs disappear, not the attachments.

nadouani commented 3 years ago

@aim4r what about file observable attachment? and user avatars? Are you still seeing them? And what's the exact error logs you have?

To-om commented 3 years ago

@aim4r can you confirm that file permission are correct (user thehive must have read/write access). The attachments have disappeared or they is an error while retrieving ?

H2Cyber commented 3 years ago

In my case the attachments are all included as part of task logs. So if the old task logs do not appear in 4.1.1, then my attachments won't appear either.

H2Cyber commented 3 years ago

@aim4r what about file observable attachment? and user avatars? Are you still seeing them? And what's the exact error logs you have?

I don't have any of these, and there are no errors in the logs. Since my attachments are all part of task logs, I believe this is a duplicate of #1875.

H2Cyber commented 3 years ago

@aim4r can you confirm that file permission are correct (user thehive must have read/write access). The attachments have disappeared or they is an error while retrieving ?

Yes the permissions are correct. There are no apparant errors in the UI or the logs. My attachments are all included in task logs. So if old task logs reappear in 4.1.2, all of my attachments would probably and hopefully reappear.

nadouani commented 3 years ago

@aim4r the issue is not clear here:

Are you talking about Task Logs that are no longer displayed OR your are still seeing your Task Logs, but their attachment are unavailable?

H2Cyber commented 3 years ago

@aim4r the issue is not clear here:

Are you talking about Task Logs that are no longer displayed OR your are still seeing your Task Logs, but their attachment are unavailable?

Task Logs are no longer displayed.

I'll close this issue, and push 4.1.2 as soon as its available. Once that is done, l'll confirm resolution in a comment.

Thanks for the support 😊