diff --git a/app/org/thp/cortex/models/BaseConfig.scala b/app/org/thp/cortex/models/BaseConfig.scala index 0c8fd98cf..9b752dafd 100644 --- a/app/org/thp/cortex/models/BaseConfig.scala +++ b/app/org/thp/cortex/models/BaseConfig.scala @@ -7,6 +7,7 @@ import org.elastic4play.utils.Collection.distinctBy case class BaseConfig(name: String, workerNames: Seq[String], items: Seq[ConfigurationDefinitionItem], config: Option[WorkerConfig]) { def +(other: BaseConfig) = BaseConfig(name, workerNames ++ other.workerNames, distinctBy(items ++ other.items)(_.name), config.orElse(other.config)) } + object BaseConfig { implicit val writes: Writes[BaseConfig] = Writes[BaseConfig] { baseConfig ⇒ Json.obj( @@ -15,7 +16,7 @@ object BaseConfig { "configurationItems" → baseConfig.items, "config" → baseConfig.config.fold(JsObject.empty)(_.jsonConfig)) } - def global(tpe: WorkerType.Type) = { + def global(tpe: WorkerType.Type): BaseConfig = { val typedItems = tpe match { case WorkerType.responder ⇒ Nil case WorkerType.analyzer ⇒ Seq( @@ -23,7 +24,8 @@ object BaseConfig { } BaseConfig("global", Nil, typedItems ++ Seq( ConfigurationDefinitionItem("proxy_http", "url of http proxy", WorkerConfigItemType.string, multi = false, required = false, None), - ConfigurationDefinitionItem("proxy_https", "url of https proxy", WorkerConfigItemType.string, multi = false, required = false, None)), + ConfigurationDefinitionItem("proxy_https", "url of https proxy", WorkerConfigItemType.string, multi = false, required = false, None), + ConfigurationDefinitionItem("cacerts", "Certificate authotities", WorkerConfigItemType.text, multi = false, required = false, None)), None) } val tlp = BaseConfig("tlp", Nil, Seq( diff --git a/www/src/app/pages/admin/organizations/components/analyzers/analyzer-config-form.html b/www/src/app/pages/admin/organizations/components/analyzers/analyzer-config-form.html index 8a36bb2a1..b6e26444b 100644 --- a/www/src/app/pages/admin/organizations/components/analyzers/analyzer-config-form.html +++ b/www/src/app/pages/admin/organizations/components/analyzers/analyzer-config-form.html @@ -70,7 +70,13 @@

-
+ + +
+ +
+ +
diff --git a/www/src/app/pages/admin/organizations/components/analyzers/analyzer.edit.controller.js b/www/src/app/pages/admin/organizations/components/analyzers/analyzer.edit.controller.js index 4160fac6c..7f5ed4ea8 100644 --- a/www/src/app/pages/admin/organizations/components/analyzers/analyzer.edit.controller.js +++ b/www/src/app/pages/admin/organizations/components/analyzers/analyzer.edit.controller.js @@ -49,7 +49,8 @@ export default class AnalyzerEditController { const globalConfig = [ 'proxy_http', 'proxy_https', - 'auto_extract_artifacts' + 'auto_extract_artifacts', + 'cacerts' ]; _.forEach(globalConfig, cnf => { if (analyzer.configuration[cnf] === undefined) { diff --git a/www/src/app/pages/admin/organizations/components/config-form.html b/www/src/app/pages/admin/organizations/components/config-form.html index c90ea0ba8..1af0d81a2 100644 --- a/www/src/app/pages/admin/organizations/components/config-form.html +++ b/www/src/app/pages/admin/organizations/components/config-form.html @@ -9,6 +9,7 @@
+
diff --git a/www/src/app/pages/admin/organizations/components/responders/responder-config-form.html b/www/src/app/pages/admin/organizations/components/responders/responder-config-form.html index 0b04facc4..16d81aee6 100644 --- a/www/src/app/pages/admin/organizations/components/responders/responder-config-form.html +++ b/www/src/app/pages/admin/organizations/components/responders/responder-config-form.html @@ -57,7 +57,7 @@

-

+
@@ -72,6 +72,12 @@

+
+ +
+ +
+
diff --git a/www/src/app/pages/admin/organizations/components/responders/responder.edit.controller.js b/www/src/app/pages/admin/organizations/components/responders/responder.edit.controller.js index 5d2f17bca..548a77dce 100644 --- a/www/src/app/pages/admin/organizations/components/responders/responder.edit.controller.js +++ b/www/src/app/pages/admin/organizations/components/responders/responder.edit.controller.js @@ -47,7 +47,8 @@ export default class ResponderEditController { // Handle TLP default config const globalConfig = [ 'proxy_http', - 'proxy_https' + 'proxy_https', + 'cacerts' ]; _.forEach(globalConfig, cnf => { if (responder.configuration[cnf] === undefined) { diff --git a/www/src/assets/styles/sass/index.scss b/www/src/assets/styles/sass/index.scss index 0203c74aa..0e49c64a5 100755 --- a/www/src/assets/styles/sass/index.scss +++ b/www/src/assets/styles/sass/index.scss @@ -196,3 +196,7 @@ a.text-white:hover { .x-ng-cloak { display: none !important; } + +textarea.vertical { + resize: vertical; +} \ No newline at end of file