Skip to content

Commit

Permalink
Merge branch 'release/3.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Dec 20, 2018
2 parents a0c6692 + e95b63e commit 943ad46
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 45 deletions.
51 changes: 49 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ steps:
image: thehiveproject/drone-scala-node
commands:
- . ~/.nvm/nvm.sh
- sbt -Duser.home=$PWD test
- sbt -Duser.home=$PWD test stage

# Build packages
- name: build-packages
Expand Down Expand Up @@ -133,13 +133,60 @@ steps:
settings:
context: target/docker/stage
dockerfile: target/docker/stage/Dockerfile
repo: tooom/thehive
repo: thehiveproject/thehive
auto_tag: true
username: {from_secret: docker_username}
password: {from_secret: docker_password}
when:
event: [tag]

# Deploy binaries in integration environment
- name: copy binaries in integration environment
image: appleboy/drone-scp
settings:
host: {from_secret: deploy_beta_host}
username: {from_secret: deploy_username}
key: {from_secret: deploy_key}
target: ./thehive-builds/${DRONE_BUILD_NUMBER}
source: target/universal/stage
strip_components: 3
when:
branch: [develop]

- name: deploy binaries in integration environment
image: appleboy/drone-ssh
settings:
host: {from_secret: deploy_beta_host}
username: {from_secret: deploy_username}
key: {from_secret: deploy_key}
script:
- ./start thehive ${DRONE_BUILD_NUMBER}
when:
branch: [develop]

# Deploy binaries in staging environment
- name: copy binaries in staging environment
image: appleboy/drone-scp
settings:
host: {from_secret: deploy_stable_host}
username: {from_secret: deploy_username}
key: {from_secret: deploy_key}
target: ./thehive-builds/${DRONE_BUILD_NUMBER}
source: target/universal/stage
strip_components: 3
when:
branch: [master]

- name: deploy binaries in staging environment
image: appleboy/drone-ssh
settings:
host: {from_secret: deploy_stable_host}
username: {from_secret: deploy_username}
key: {from_secret: deploy_key}
script:
- ./start thehive ${DRONE_BUILD_NUMBER}
when:
branch: [master]

volumes:
- name: cache
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# Change Log

## [3.2.0](https://github.com/TheHive-Project/TheHive/tree/3.2.0) (2018-11-29)
## [Unreleased](https://github.com/TheHive-Project/TheHive/tree/3.2.1) (2018-12-20)

[Full Changelog](https://github.com/TheHive-Project/TheHive/compare/3.2.0...3.2.1)

**Fixed bugs:**

- Bug UI "Tooltip" / Hint is cropped by window borders [\#832](https://github.com/TheHive-Project/TheHive/issues/832)
- Can't unset case template when alert is imported [\#825](https://github.com/TheHive-Project/TheHive/issues/825)
- Potential Regression: Case templates cannot be exported in 3.2.0 [\#823](https://github.com/TheHive-Project/TheHive/issues/823)
- Tag order is reversed if a case is created from an alert [\#810](https://github.com/TheHive-Project/TheHive/issues/810)

**Merged pull requests:**

- Make improvements to configuration file [\#828](https://github.com/TheHive-Project/TheHive/pull/828) ([adl1995](https://github.com/adl1995))

## [3.2.0](https://github.com/TheHive-Project/TheHive/tree/3.2.0) (2018-11-29)
[Full Changelog](https://github.com/TheHive-Project/TheHive/compare/3.2.0-RC1...3.2.0)

**Implemented enhancements:**
Expand All @@ -12,6 +26,7 @@

- Error when uploading password protected zips as observables [\#805](https://github.com/TheHive-Project/TheHive/issues/805)
- Lowercase user ID coming from HTTP header [\#808](https://github.com/TheHive-Project/TheHive/issues/808)
- Error when uploading password protected zips as observables [\#805](https://github.com/TheHive-Project/TheHive/issues/805)

## [3.2.0-RC1](https://github.com/TheHive-Project/TheHive/tree/3.2.0-RC1) (2018-11-16)
[Full Changelog](https://github.com/TheHive-Project/TheHive/compare/3.1.2...3.2.0-RC1)
Expand Down
50 changes: 25 additions & 25 deletions conf/application.sample
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,31 @@ search {

### XPack SSL configuration
# Username for XPack authentication
#search.username
#search.username = ""
# Password for XPack authentication
#search.password
#search.password = ""
# Enable SSL to connect to ElasticSearch
search.ssl.enabled = false
# Path to certificate authority file
#search.ssl.ca
#search.ssl.ca = ""
# Path to certificate file
#search.ssl.certificate
#search.ssl.certificate = ""
# Path to key file
#search.ssl.key
#search.ssl.key = ""

### SearchGuard configuration
# Path to JKS file containing client certificate
#search.guard.keyStore.path
#search.guard.keyStore.path = ""
# Password of the keystore
#search.guard.keyStore.password
#search.guard.keyStore.password = ""
# Path to JKS file containing certificate authorities
#search.guard.trustStore.path
#search.guard.trustStore.path = ""
## Password of the truststore
#search.guard.trustStore.password
#search.guard.trustStore.password = ""
# Enforce hostname verification
#search.guard.hostVerification
#search.guard.hostVerification = false
# If hostname verification is enabled specify if hostname should be resolved
#search.guard.hostVerificationResolveHostname
#search.guard.hostVerificationResolveHostname = false
}

# Authentication
Expand Down Expand Up @@ -119,15 +119,15 @@ session {
}

# Max textual content length
play.http.parser.maxMemoryBuffer=1M
play.http.parser.maxMemoryBuffer= 1M
# Max file size
play.http.parser.maxDiskBuffer=1G
play.http.parser.maxDiskBuffer = 1G

# Cortex
# TheHive can connect to one or multiple Cortex instances. Give each
# TheHive can connect to one or multiple Cortex instances. Give each
# Cortex instance a name and specify the associated URL.
#
# In order to use Cortex, first you need to enable the Cortex module by uncomment the next line
# In order to use Cortex, first you need to enable the Cortex module by uncommenting the next line

#play.modules.enabled += connectors.cortex.CortexConnector

Expand All @@ -141,20 +141,20 @@ cortex {
}

# MISP
# TheHive can connect to one or multiple MISP instances. Give each MISP
# instance a name and specify the associated Authkey that must be used
# to poll events, the case template that should be used by default when
# importing events as well as the tags that must be added to cases upon
# TheHive can connect to one or multiple MISP instances. Give each MISP
# instance a name and specify the associated Authkey that must be used
# to poll events, the case template that should be used by default when
# importing events as well as the tags that must be added to cases upon
# import.

# Prior to configuring the integration with a MISP instance, you must
# enable the MISP connector. This will allow you to import events to
# Prior to configuring the integration with a MISP instance, you must
# enable the MISP connector. This will allow you to import events to
# and/or export cases to the MISP instance(s).

#play.modules.enabled += connectors.misp.MispConnector

misp {
# Interval between consecutive MISP event imports in hours (h) or
# Interval between consecutive MISP event imports in hours (h) or
# minutes (m).
interval = 1h

Expand Down Expand Up @@ -183,18 +183,18 @@ misp {
# max-age = 7 days
# # Organization and tags
# exclusion {
# organisation = ["bad organisation", "other orga"]
# organisation = ["bad organisation", "other organisations"]
# tags = ["tag1", "tag2"]
# }
#
# ## HTTP client configuration (SSL and proxy)
# # Truststore to use to validate the X.509 certificate of the MISP
# # Truststore to use to validate the X.509 certificate of the MISP
# # instance if the default truststore is not sufficient.
# # Proxy can also be used
# ws {
# ssl.trustManager.stores = [ {
# path = /path/to/truststore.jks
# }
# } ]
# proxy {
# host = proxy.mydomain.org
# port = 3128
Expand Down
3 changes: 2 additions & 1 deletion debian.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Common.{stableVersion, betaVersion}
import Common.{stableVersion, snapshotVersion, betaVersion}

linuxPackageMappings in Debian += packageMapping(file("LICENSE") -> "/usr/share/doc/thehive/copyright").withPerms("644")
version in Debian := {
version.value match {
case stableVersion(_, _) => version.value
case betaVersion(v1, v2) => v1 + "-0.1RC" + v2
case snapshotVersion(_, _) => version.value + "-SNAPSHOT"
case _ => sys.error("Invalid version: " + version.value)
}
}
Expand Down
7 changes: 4 additions & 3 deletions docker.sbt
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import Common.{stableVersion, betaVersion}
import com.typesafe.sbt.packager.docker.{ Cmd, ExecCmd }
import Common.{betaVersion, snapshotVersion, stableVersion}
import com.typesafe.sbt.packager.docker.{Cmd, ExecCmd}

version in Docker := {
version.value match {
case stableVersion(_, _) => version.value
case betaVersion(v1, v2) => v1 + "-0.1RC" + v2
case snapshotVersion(_, _) => version.value + "-SNAPSHOT"
case _ => sys.error("Invalid version: " + version.value)
}
}
defaultLinuxInstallLocation in Docker := "/opt/thehive"
dockerRepository := Some("thehiveproject")
dockerUpdateLatest := !version.value.toUpperCase.contains("RC")
dockerUpdateLatest := !version.value.toUpperCase.contains("RC") && !version.value.contains("SNAPSHOT")
dockerEntrypoint := Seq("/opt/thehive/entrypoint")
dockerExposedPorts := Seq(9000)
mappings in Docker ++= Seq(
Expand Down
9 changes: 9 additions & 0 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,13 @@ object Common {

val stableVersion: Regex = "(\\d+\\.\\d+\\.\\d+)-(\\d+)".r
val betaVersion: Regex = "(\\d+\\.\\d+\\.\\d+)-[Rr][Cc](\\d+)".r
object snapshotVersion {
def unapplySeq(version: String): Option[List[String]] = {
if (version.endsWith("-SNAPSHOT")) {
val v = version.dropRight(9)
stableVersion.unapplySeq(v) orElse betaVersion.unapplySeq(v)
}
else None
}
}
}
4 changes: 3 additions & 1 deletion rpm.sbt
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import Common.{stableVersion, betaVersion}
import Common.{stableVersion, snapshotVersion, betaVersion}

version in Rpm := {
version.value match {
case stableVersion(v1, v2) => v1
case betaVersion(v1, v2) => v1
case snapshotVersion(v1, v2) => v1
case _ => sys.error("Invalid version: " + version.value)
}
}
rpmRelease := {
version.value match {
case stableVersion(_, v2) => v2
case betaVersion(v1, v2) => "0.1RC" + v2
case snapshotVersion(v1, v2) => v2 + "-SNAPSHOT"
case _ => sys.error("Invalid version: " + version.value)
}
}
Expand Down
12 changes: 5 additions & 7 deletions thehive-backend/app/services/AlertSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,11 @@ class AlertSrv(
}

def getCaseTemplate(alert: Alert, customCaseTemplate: Option[String]): Future[Option[CaseTemplate]] = {
val templateName = customCaseTemplate
.orElse(alert.caseTemplate())
.orElse(templates.get(alert.tpe()))
.getOrElse(alert.tpe())
caseTemplateSrv.getByName(templateName)
.map { ct Some(ct) }
.recover { case _ None }
customCaseTemplate.fold[Future[Option[CaseTemplate]]](Future.successful(None)) { templateName
caseTemplateSrv.getByName(templateName)
.map { ct Some(ct) }
.recover { case _ None }
}
}

def createCase(alert: Alert, customCaseTemplate: Option[String])(implicit authContext: AuthContext): Future[Case] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h4 class="pv-xxs pr-xxs text-primary">
<a ng-if="jobs.length > 1" class="noline mr-xxs" href ng-click="analyzers[analyzerName].showRows = !analyzers[analyzerName].showRows">
<i class="fa" ng-class="{ true:'fa-minus-square-o', false:'fa-plus-square-o' }[analyzers[analyzerName].showRows]"></i>
</a>
<span uib-tooltip="{{analyzer.description}}">{{analyzer.name || jobs[0].analyzerName}}</span>
<span uib-tooltip="{{analyzer.description}}" tooltip-placement="right">{{analyzer.name || jobs[0].analyzerName}}</span>
<!--pre>
analyzer = {{analyzer}}
analyzers = {{analyzers}}
Expand Down
4 changes: 2 additions & 2 deletions ui/bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thehive",
"version": "3.2.0",
"version": "3.2.1",
"license": "AGPL-3.0",
"dependencies": {
"angular": "1.5.8",
Expand Down Expand Up @@ -51,7 +51,7 @@
"underscore.string": "^3.3.4",
"angular-drag-and-drop-lists": "^2.1.0",
"angular-bootstrap-colorpicker": "^3.0.31",
"file-saver": "^1.3.3",
"file-saver": "1.3.4",
"js-url": "^2.5.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thehive",
"version": "3.2.0",
"version": "3.2.1",
"license": "AGPL-3.0",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "3.2.0-1"
version in ThisBuild := "3.2.1-1"

0 comments on commit 943ad46

Please sign in to comment.