Skip to content

Commit 8300fcc

Browse files
committed
Merge branch 'release/2.12.1'
Conflicts: CHANGELOG.md thehive-backend/app/models/Alert.scala
2 parents ff56992 + bd9e138 commit 8300fcc

File tree

21 files changed

+255
-217
lines changed

21 files changed

+255
-217
lines changed

CHANGELOG.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
11
# Change Log
22

3-
## [2.12.0](https://github.com/CERT-BDF/TheHive/tree/2.12.0)
3+
## [2.12.1](https://github.com/CERT-BDF/TheHive/tree/2.12.1) (2017-08-01)
44

5+
[Full Changelog](https://github.com/CERT-BDF/TheHive/compare/2.12.0...2.12.1)
6+
7+
**Implemented enhancements:**
8+
9+
- Fix warnings in debian package [\#267](https://github.com/CERT-BDF/TheHive/issues/267)
10+
- Merging alert into existing case does not merge alert description into case description [\#255](https://github.com/CERT-BDF/TheHive/issues/255)
11+
12+
**Fixed bugs:**
13+
14+
- Case similarity reports merged cases [\#272](https://github.com/CERT-BDF/TheHive/issues/272)
15+
- Closing a case with an open task does not dismiss task in "My tasks" [\#269](https://github.com/CERT-BDF/TheHive/issues/269)
16+
- API: cannot create alert if one alert artifact contains the IOC field set [\#268](https://github.com/CERT-BDF/TheHive/issues/268)
17+
- Can't get logs of a task via API [\#259](https://github.com/CERT-BDF/TheHive/issues/259)
18+
- Add multiple attachments in a single task log doesn't work [\#257](https://github.com/CERT-BDF/TheHive/issues/257)
19+
- Cortex Connector Not Found [\#256](https://github.com/CERT-BDF/TheHive/issues/256)
20+
- TheHive doesn't send the file name to Cortex [\#254](https://github.com/CERT-BDF/TheHive/issues/254)
21+
- Renaming of users does not work [\#249](https://github.com/CERT-BDF/TheHive/issues/249)
22+
23+
## [2.12.0](https://github.com/CERT-BDF/TheHive/tree/2.12.0) (2017-07-04)
524
[Full Changelog](https://github.com/CERT-BDF/TheHive/compare/2.11.3...2.12.0)
625

726
**Implemented enhancements:**
827

28+
- Use local font files [\#250](https://github.com/CERT-BDF/TheHive/issues/250)
929
- Sort the analyzers list in observable details page [\#245](https://github.com/CERT-BDF/TheHive/issues/245)
1030
- More options to sort cases [\#243](https://github.com/CERT-BDF/TheHive/issues/243)
1131
- Alert Preview and management improvements [\#232](https://github.com/CERT-BDF/TheHive/issues/232)
12-
- Ability to Reopen Tasks [\#156](https://github.com/CERT-BDF/TheHive/issues/156)
13-
- Display short reports on the Observables tab [\#131](https://github.com/CERT-BDF/TheHive/issues/131)
14-
- Custom fields for case template [\#12](https://github.com/CERT-BDF/TheHive/issues/12)
1532
- Show case status and category \(FP, TP, IND\) in related cases [\#229](https://github.com/CERT-BDF/TheHive/issues/229)
1633
- Open External Links in New Tab [\#228](https://github.com/CERT-BDF/TheHive/issues/228)
1734
- Observable analyzers view reports. [\#191](https://github.com/CERT-BDF/TheHive/issues/191)
1835
- Specifying tags on statistics page or performing a search [\#186](https://github.com/CERT-BDF/TheHive/issues/186)
1936
- Choose case template while importing events from MISP [\#175](https://github.com/CERT-BDF/TheHive/issues/175)
20-
- Use local font files [\#250](https://github.com/CERT-BDF/TheHive/issues/250)
37+
- Ability to Reopen Tasks [\#156](https://github.com/CERT-BDF/TheHive/issues/156)
38+
- Display short reports on the Observables tab [\#131](https://github.com/CERT-BDF/TheHive/issues/131)
39+
- Custom fields for case template [\#12](https://github.com/CERT-BDF/TheHive/issues/12)
2140

2241
**Fixed bugs:**
2342

43+
- A locked user can use the API to create / delete / list cases \(and more\) [\#251](https://github.com/CERT-BDF/TheHive/issues/251)
2444
- Fix case metrics malformed definitions [\#248](https://github.com/CERT-BDF/TheHive/issues/248)
2545
- Sorting alerts by severity fails [\#242](https://github.com/CERT-BDF/TheHive/issues/242)
2646
- Alerting Panel: Typo Correction [\#240](https://github.com/CERT-BDF/TheHive/issues/240)

build.sbt

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ lazy val rpmPackageRelease = (project in file("package/rpm-release"))
4949
))
5050
)
5151

52+
5253
Release.releaseVersionUIFile := baseDirectory.value / "ui" / "package.json"
5354
Release.changelogFile := baseDirectory.value / "CHANGELOG.md"
5455

@@ -79,31 +80,39 @@ mappings in Universal ~= {
7980
maintainer := "TheHive Project <support@thehive-project.org>"
8081
packageSummary := "Scalable, Open Source and Free Security Incident Response Solutions"
8182
packageDescription :=
82-
"""TheHive is a scalable 3-in-1 open source and free security incident response platform designed to make life easier
83-
| for SOCs, CSIRTs, CERTs and any information security practitioner dealing with security incidents that need to be
84-
| investigated and acted upon swiftly.""".stripMargin
83+
"""TheHive is a scalable 3-in-1 open source and free security incident response
84+
| platform designed to make life easier for SOCs, CSIRTs, CERTs and any
85+
| information security practitioner dealing with security incidents that need to
86+
| be investigated and acted upon swiftly.""".stripMargin
8587
defaultLinuxInstallLocation := "/opt"
8688
linuxPackageMappings ~= {
8789
_.map { pm =>
8890
val mappings = pm.mappings.filterNot {
8991
case (_, path) => path.startsWith("/opt/thehive/package") || path.startsWith("/opt/thehive/conf")
9092
}
91-
com.typesafe.sbt.packager.linux.LinuxPackageMapping(mappings, pm.fileData).withConfig()
92-
} :+ packageMapping(
93-
file("package/thehive.service") -> "/etc/systemd/system/thehive.service",
93+
com.typesafe.sbt.packager.linux.LinuxPackageMapping(mappings, pm.fileData)
94+
}
95+
}
96+
linuxPackageMappings ++= Seq(
97+
packageMapping(
98+
file("package/thehive.service") -> "/usr/lib/systemd/system/thehive.service"
99+
).withPerms("644"),
100+
packageMapping(
94101
file("package/thehive.conf") -> "/etc/init/thehive.conf",
95-
file("package/thehive") -> "/etc/init.d/thehive",
96102
file("conf/application.sample") -> "/etc/thehive/application.conf",
97103
file("conf/logback.xml") -> "/etc/thehive/logback.xml"
98-
).withConfig()
99-
}
104+
).withPerms("644").withConfig(),
105+
packageMapping(
106+
file("package/thehive") -> "/etc/init.d/thehive"
107+
).withPerms("755").withConfig())
100108

101109
packageBin := {
102110
(packageBin in Universal).value
103111
(packageBin in Debian).value
104112
(packageBin in Rpm).value
105113
}
106114
// DEB //
115+
linuxPackageMappings in Debian += packageMapping(file("LICENSE") -> "/usr/share/doc/thehive/copyright").withPerms("644")
107116
version in Debian := version.value + "-1"
108117
debianPackageRecommends := Seq("elasticsearch")
109118
debianPackageDependencies += "openjdk-8-jre-headless"

package/thehive

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ case "$1" in
113113
start
114114
;;
115115

116+
force-reload)
117+
stop
118+
start
119+
;;
120+
116121
*)
117122
log_action_msg "Usage: /etc/init.d/thehive {start|stop|restart|status}" || true
118123
exit 1

package/thehive.conf-perso

Lines changed: 0 additions & 49 deletions
This file was deleted.

thehive-backend/app/controllers/AlertCtrl.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class AlertCtrl @Inject() (
4242
for {
4343
alert alertSrv.get(alertId)
4444
caze caseSrv.get(caseId)
45-
_ alertSrv.mergeWithCase(alert, caze)
46-
} yield renderer.toOutput(CREATED, caze)
45+
updatedCaze alertSrv.mergeWithCase(alert, caze)
46+
} yield renderer.toOutput(CREATED, updatedCaze)
4747
}
4848

4949
@Timed
@@ -151,7 +151,7 @@ class AlertCtrl @Inject() (
151151
}
152152

153153
@Timed
154-
def fixStatus() = authenticated(Role.admin).async { implicit request
154+
def fixStatus(): Action[AnyContent] = authenticated(Role.admin).async { implicit request
155155
alertSrv.fixStatus()
156156
.map(_ NoContent)
157157
}

thehive-backend/app/controllers/CaseCtrl.scala

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,21 @@ package controllers
22

33
import javax.inject.{ Inject, Singleton }
44

5-
import scala.concurrent.{ ExecutionContext, Future }
6-
import scala.reflect.runtime.universe
7-
import scala.util.{ Failure, Success }
85
import akka.stream.Materializer
96
import akka.stream.scaladsl.Sink
7+
import models.CaseStatus
8+
import org.elastic4play.controllers.{ Authenticated, Fields, FieldsBodyParser, Renderer }
9+
import org.elastic4play.models.JsonFormat.baseModelEntityWrites
10+
import org.elastic4play.services.JsonFormat.{ aggReads, queryReads }
11+
import org.elastic4play.services._
12+
import org.elastic4play.{ BadRequestError, Timed }
1013
import play.api.Logger
1114
import play.api.http.Status
1215
import play.api.libs.json.{ JsArray, JsObject, Json }
13-
import play.api.libs.json.Json.toJsFieldJsValueWrapper
1416
import play.api.mvc.{ Action, AnyContent, Controller }
15-
import org.elastic4play.{ BadRequestError, CreateError, Timed }
16-
import org.elastic4play.controllers.{ Authenticated, Fields, FieldsBodyParser, Renderer }
17-
import org.elastic4play.models.JsonFormat.{ baseModelEntityWrites, multiFormat }
18-
import org.elastic4play.services.{ Agg, AuxSrv }
19-
import org.elastic4play.services.{ QueryDSL, QueryDef, Role }
20-
import org.elastic4play.services.JsonFormat.{ aggReads, queryReads }
21-
import models.{ Case, CaseStatus }
2217
import services.{ CaseMergeSrv, CaseSrv, CaseTemplateSrv, TaskSrv }
2318

19+
import scala.concurrent.{ ExecutionContext, Future }
2420
import scala.util.Try
2521

2622
@Singleton

thehive-backend/app/controllers/LogCtrl.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ package controllers
22

33
import javax.inject.{ Inject, Singleton }
44

5-
import scala.concurrent.ExecutionContext
6-
import scala.reflect.runtime.universe
7-
import play.api.http.Status
8-
import play.api.mvc.{ Action, AnyContent, Controller }
95
import org.elastic4play.Timed
106
import org.elastic4play.controllers.{ Authenticated, Fields, FieldsBodyParser, Renderer }
11-
import org.elastic4play.models.JsonFormat.baseModelEntityWrites
12-
import org.elastic4play.services.{ QueryDSL, QueryDef, Role }
137
import org.elastic4play.services.JsonFormat.queryReads
8+
import org.elastic4play.services.{ QueryDSL, QueryDef, Role }
9+
import org.elastic4play.models.JsonFormat.baseModelEntityWrites
10+
import play.api.http.Status
11+
import play.api.mvc.{ Action, AnyContent, Controller }
1412
import services.LogSrv
1513

14+
import scala.concurrent.ExecutionContext
15+
1616
@Singleton
1717
class LogCtrl @Inject() (
1818
logSrv: LogSrv,
@@ -49,7 +49,7 @@ class LogCtrl @Inject() (
4949
def findInTask(taskId: String): Action[Fields] = authenticated(Role.read).async(fieldsBodyParser) { implicit request
5050
import org.elastic4play.services.QueryDSL._
5151
val childQuery = request.body.getValue("query").fold[QueryDef](QueryDSL.any)(_.as[QueryDef])
52-
val query = and(childQuery, "_parent" ~= taskId)
52+
val query = and(childQuery, parent("case_task", withId(taskId)))
5353
val range = request.body.getString("range")
5454
val sort = request.body.getStrings("sort").getOrElse(Nil)
5555

thehive-backend/app/models/Alert.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ trait AlertAttributes {
4141
Attribute("alert", "remoteAttachment", OptionalAttributeFormat(F.objectFmt(remoteAttachmentAttributes)), Nil, None, ""),
4242
Attribute("alert", "tlp", OptionalAttributeFormat(F.numberFmt), Nil, None, ""),
4343
Attribute("alert", "tags", MultiAttributeFormat(F.stringFmt), Nil, None, ""),
44-
Attribute("alert", "ioc", OptionalAttributeFormat(F.stringFmt), Nil, None, ""))
44+
Attribute("alert", "ioc", OptionalAttributeFormat(F.booleanFmt), Nil, None, ""))
4545
}
4646

4747
val alertId: A[String] = attribute("_id", F.stringFmt, "Alert id", O.readonly)

0 commit comments

Comments
 (0)