diff --git a/CHANGELOG.md b/CHANGELOG.md index 9beb03fd5..6fbb5dbc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## [3.1.1](https://github.com/TheHive-Project/Cortex/milestone/28) (2021-03-01) + +**Implemented enhancements:** + +- [Improvement] Create logfile after installation [\#341](https://github.com/TheHive-Project/Cortex/issues/341) + +**Fixed bugs:** + +- [BUG] Certificate not taken into account when running neurons with process [\#317](https://github.com/TheHive-Project/Cortex/issues/317) +- [Bug] Update doesn't work on Elasticsearch 7.11 [\#346](https://github.com/TheHive-Project/Cortex/issues/346) + ## [3.1.0](https://github.com/TheHive-Project/Cortex/milestone/27) (2020-10-30) **Implemented enhancements:** diff --git a/app/org/thp/cortex/models/Migration.scala b/app/org/thp/cortex/models/Migration.scala index 7bbfa9b85..88a407254 100644 --- a/app/org/thp/cortex/models/Migration.scala +++ b/app/org/thp/cortex/models/Migration.scala @@ -85,5 +85,6 @@ class Migration @Inject() (userSrv: UserSrv, organizationSrv: OrganizationSrv, w } ) case DatabaseState(4) => Nil + case DatabaseState(5) => Nil } } diff --git a/app/org/thp/cortex/models/package.scala b/app/org/thp/cortex/models/package.scala index 213cb2804..c3a30f93a 100644 --- a/app/org/thp/cortex/models/package.scala +++ b/app/org/thp/cortex/models/package.scala @@ -1,5 +1,5 @@ package org.thp.cortex package object models { - val modelVersion = 5 + val modelVersion = 6 } diff --git a/app/org/thp/cortex/services/ProcessJobRunnerSrv.scala b/app/org/thp/cortex/services/ProcessJobRunnerSrv.scala index 8870d1743..ec981a358 100644 --- a/app/org/thp/cortex/services/ProcessJobRunnerSrv.scala +++ b/app/org/thp/cortex/services/ProcessJobRunnerSrv.scala @@ -35,7 +35,9 @@ class ProcessJobRunnerSrv @Inject() (implicit val system: ActorSystem) { val baseDirectory = Paths.get(command).getParent.getParent val output = StringBuilder.newBuilder logger.info(s"Execute $command in $baseDirectory, timeout is ${timeout.fold("none")(_.toString)}") - val process = Process(Seq(command, jobDirectory.toString), baseDirectory.toFile) + val cacertsFile = jobDirectory.resolve("input").resolve("cacerts") + val env = if (Files.exists(cacertsFile)) Seq("REQUESTS_CA_BUNDLE" -> cacertsFile.toString) else Nil + val process = Process(Seq(command, jobDirectory.toString), baseDirectory.toFile, env: _*) .run(ProcessLogger { s => logger.info(s" Job ${job.id}: $s") output ++= s diff --git a/package/debian/postinst b/package/debian/postinst index c5c0b8cd1..5e5de3654 100755 --- a/package/debian/postinst +++ b/package/debian/postinst @@ -83,7 +83,8 @@ case "$1" in # Chown definitions created by SBT Native Packager - chown cortex:cortex /var/log/cortex + touch /var/log/cortex/application.log + chown -R cortex:cortex /var/log/cortex chown root:cortex /etc/cortex/application.conf /etc/cortex/logback.xml chmod 0640 /etc/cortex/application.conf /etc/cortex/logback.xml diff --git a/package/docker/entrypoint b/package/docker/entrypoint index 9d3b00cee..68241d11b 100755 --- a/package/docker/entrypoint +++ b/package/docker/entrypoint @@ -137,6 +137,7 @@ fi echo config file is: cat "$CONFIG_FILE" +touch /var/log/cortex/application.log chown -R "$DAEMON_USER" /var/log/cortex chown -R "$DAEMON_USER" /etc/cortex chown -R "$DAEMON_USER" "$CONFIG_FILE" diff --git a/package/rpm/post b/package/rpm/post new file mode 100644 index 000000000..5831d54d7 --- /dev/null +++ b/package/rpm/post @@ -0,0 +1,3 @@ +mkdir -p /var/log/cortex +touch /var/log/cortex/application.log +chown -R cortex:cortex /var/log/cortex diff --git a/project/Dependencies.scala b/project/Dependencies.scala index f4854b8cb..c221cd023 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -18,7 +18,7 @@ object Dependencies { val reflections = "org.reflections" % "reflections" % "0.9.11" val zip4j = "net.lingala.zip4j" % "zip4j" % "1.3.2" - val elastic4play = "org.thehive-project" %% "elastic4play" % "1.12.3" + val elastic4play = "org.thehive-project" %% "elastic4play" % "1.13.1" val dockerClient = "com.spotify" % "docker-client" % "8.14.4" val akkaCluster = "com.typesafe.akka" %% "akka-cluster" % play.core.PlayVersion.akkaVersion val akkaClusterTyped = "com.typesafe.akka" %% "akka-cluster-typed" % play.core.PlayVersion.akkaVersion diff --git a/rpm.sbt b/rpm.sbt index 754782ab8..3a14edc78 100644 --- a/rpm.sbt +++ b/rpm.sbt @@ -26,7 +26,7 @@ rpmRequirements += "java-1.8.0-openjdk-headless" maintainerScripts in Rpm := maintainerScriptsFromDirectory( baseDirectory.value / "package" / "rpm", - Seq(RpmConstants.Pre, RpmConstants.Preun, RpmConstants.Postun) + Seq(RpmConstants.Pre, RpmConstants.Preun, RpmConstants.Post, RpmConstants.Postun) ) linuxPackageSymlinks in Rpm := Nil diff --git a/version.sbt b/version.sbt index d9455fbd5..d7c2333b1 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "3.1.0-1" +version in ThisBuild := "3.1.1-1" diff --git a/www/package.json b/www/package.json index 19eb7fdf4..aa1af9fa8 100755 --- a/www/package.json +++ b/www/package.json @@ -1,6 +1,6 @@ { "name": "cortex", - "version": "3.1.0", + "version": "3.1.1", "description": "A powerfull observable analysis engine", "license": "AGPL-3.0-or-later", "homepage": "https://github.com/TheHive-Project/Cortex", diff --git a/www/src/app/components/about/about.html b/www/src/app/components/about/about.html index 48be657e1..eb085102e 100644 --- a/www/src/app/components/about/about.html +++ b/www/src/app/components/about/about.html @@ -1,7 +1,7 @@ - - \ No newline at end of file + diff --git a/www/src/app/components/footer/footer.html b/www/src/app/components/footer/footer.html index a7789169e..be7005138 100755 --- a/www/src/app/components/footer/footer.html +++ b/www/src/app/components/footer/footer.html @@ -4,8 +4,8 @@
- TheHive Project 2016-2020, + TheHive Project 2016-2021, AGPL-V3
- \ No newline at end of file + diff --git a/www/src/app/core/services/common/StreamService.js b/www/src/app/core/services/common/StreamService.js index 7c98593c8..e238e9ff9 100644 --- a/www/src/app/core/services/common/StreamService.js +++ b/www/src/app/core/services/common/StreamService.js @@ -130,12 +130,11 @@ export default function (app) { // Initialize the stream; this.isPolling = false; + if (err.status === 401) { + return; + } if (err.status !== 404) { NotificationService.error('StreamSrv', err.data, err.status); - - if (err.status === 401) { - return; - } } this.init(); @@ -181,4 +180,4 @@ export default function (app) { } app.service('StreamSrv', StreamSrv); -} \ No newline at end of file +}