Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add an observable which datatype has been added by an admin #106

Closed
saadkadhi opened this issue Feb 4, 2017 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@saadkadhi
Copy link
Contributor

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu
OS version (client) Mint
TheHive version / git hash 2.10.0
Package Type Binary
Browser type & version Chrome 56

Problem Description

Upon adding a new observable type through the admin-only Observables area, it can be selected from the drop-down menu in the Observables tab of a case but the Create observable(s) button is not clickable hence the observable cannot be added.

Steps to Reproduce

  1. Connect as an administrator
  2. Click on the Admin > Observables menu
  3. Add a new datatype
  4. Click on + New Case and create a case
  5. On the Observables tab, click on the Add observable(s) button
  6. Select the freshly added datatype from the Data Type menu
  7. Supply a value
  8. Add a tag, a description or both
  9. Click on Create observable(s)
  10. Nothing happens and the window won't go away unless you click outside of it

Complementary information

screen shot 2017-02-04 at 17 24 07

@saadkadhi saadkadhi added the bug label Feb 4, 2017
@saadkadhi saadkadhi added this to the 2.10.1 milestone Feb 4, 2017
@nadouani
Copy link
Contributor

nadouani commented Feb 6, 2017

This is a backend issue where the newly created observable datatypes are rejected by the attribute validation process.

@To-om The datatypes enumeration seems to be cached.

2017-02-06 10:44:34,277 [INFO] from application in application-akka.actor.default-dispatcher-2646 - POST /api/case/XXXXXXXXXXXXXXX/artifact returned 400
org.elastic4play.AttributeCheckingError: [Invalid format for case_artifact.: JsonInputValue("custom-type"), expected enumeration]
	at org.elastic4play.services.FieldsSrv$$anonfun$parse$4.apply(FieldsSrv.scala:32)
	at org.elastic4play.services.FieldsSrv$$anonfun$parse$4.apply(FieldsSrv.scala:32)
	at org.scalactic.Bad.transform(Or.scala:1178)
	at org.elastic4play.services.FieldsSrv.parse(FieldsSrv.scala:30)
	at org.elastic4play.services.CreateSrv.create(CreateSrv.scala:112)
	at org.elastic4play.services.CreateSrv.apply(CreateSrv.scala:91)
	at services.ArtifactSrv.create(ArtifactSrv.scala:36)
	at services.ArtifactSrv$$anonfun$create$1.apply(ArtifactSrv.scala:33)
	at services.ArtifactSrv$$anonfun$create$1.apply(ArtifactSrv.scala:33)
	at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:253)
	at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
	at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
	at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91)
	at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)
	at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91)
	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
	at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90)
	at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39)
	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:409)
	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

@megan201296 as a workaround, you can just restart your TheHive server, and the new datatypes will be supported. We will fix that in the next release.

@nadouani nadouani assigned To-om and unassigned nadouani Feb 6, 2017
@megan201296
Copy link

@nadouani thanks once again for your quick response and great help! I promise I'm not trying to constantly find bugs ;) .

@To-om
Copy link
Contributor

To-om commented Feb 13, 2017

This bug is located in Elastic4play. I've created the issue #8 for that.
The front-end should not ignore the error message but show it instead.

@To-om To-om assigned nadouani and unassigned To-om Feb 13, 2017
To-om pushed a commit that referenced this issue Feb 13, 2017
nadouani added a commit that referenced this issue Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants