diff --git a/misp/connector/src/main/scala/org/thp/thehive/connector/misp/services/MispImportSrv.scala b/misp/connector/src/main/scala/org/thp/thehive/connector/misp/services/MispImportSrv.scala index 32246c5e54..2411bb7b91 100644 --- a/misp/connector/src/main/scala/org/thp/thehive/connector/misp/services/MispImportSrv.scala +++ b/misp/connector/src/main/scala/org/thp/thehive/connector/misp/services/MispImportSrv.scala @@ -72,7 +72,7 @@ class MispImportSrv @Inject() ( read = false, follow = true, organisationId = organisationId, - tags = event.tags.map(_.name), + tags = s"src:${event.orgc}" +: event.tags.map(_.name), caseId = EntityId.empty ) } diff --git a/misp/connector/src/test/scala/org/thp/thehive/connector/misp/services/MispImportSrvTest.scala b/misp/connector/src/test/scala/org/thp/thehive/connector/misp/services/MispImportSrvTest.scala index b610f6c63e..250b116abf 100644 --- a/misp/connector/src/test/scala/org/thp/thehive/connector/misp/services/MispImportSrvTest.scala +++ b/misp/connector/src/test/scala/org/thp/thehive/connector/misp/services/MispImportSrvTest.scala @@ -92,7 +92,7 @@ class MispImportSrvTest(implicit ec: ExecutionContext) extends PlaySpecification pap = 2, read = false, follow = true, - tags = Seq("TH-test", "TH-test-2"), + tags = Seq("src:ORGNAME", "TH-test", "TH-test-2"), organisationId = alert.organisationId, caseId = EntityId.empty ) @@ -103,7 +103,7 @@ class MispImportSrvTest(implicit ec: ExecutionContext) extends PlaySpecification val observables = app[Database] .roTransaction { implicit graph => app[OrganisationSrv] - .get(EntityName("admin")) + .get(EntityName("cert")) .alerts .getBySourceId("misp", "ORGNAME", "1") .observables