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

Add customFields to Alert #87

Merged
merged 1 commit into from Oct 10, 2018

Conversation

Projects
None yet
4 participants
@zpriddy
Contributor

zpriddy commented Oct 8, 2018

No description provided.

@nadouani nadouani changed the base branch from master to develop Oct 10, 2018

@nadouani nadouani merged commit a64b5ca into TheHive-Project:develop Oct 10, 2018

@nadouani nadouani added this to the 1.5.1 milestone Oct 10, 2018

nadouani added a commit that referenced this pull request Oct 10, 2018

@Rolinh

This comment has been minimized.

Contributor

Rolinh commented Oct 12, 2018

@nadouani This change breaks compatibility with TheHive 3.0.10 and earlier versions. It is unfortunate that such a change is part of a patch release (ie 1.5.1).

[info] o.e.ErrorHandler - POST /api/alert returned 400
org.elastic4play.AttributeCheckingError: [Unknown attribute alert.customFields: {"type":"JsonInputValue","value":{}}]
        at org.elastic4play.services.FieldsSrv.$anonfun$parse$7(FieldsSrv.scala:30)
        at org.scalactic.Bad.transform(Or.scala:1386)
        at org.elastic4play.services.FieldsSrv.parse(FieldsSrv.scala:30)
        at org.elastic4play.services.CreateSrv.create(CreateSrv.scala:108)
        at org.elastic4play.services.CreateSrv.apply(CreateSrv.scala:67)
        at services.AlertSrv.$anonfun$create$3(AlertSrv.scala:108)
        at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:304)
        at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
        at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
@nadouani

This comment has been minimized.

Contributor

nadouani commented Oct 12, 2018

Hi @Rolinh thanks for the remark. It's 100% valid. I personally didn't test that with TheHive 3.0.10 so forgot the breaking change.

Please stick with the 1.5.0 version, since we cannot remove supporting custom fields in alerts.

@saadkadhi

This comment has been minimized.

Contributor

saadkadhi commented Oct 12, 2018

@nadouani you mean 3.0.10 :)

@nadouani

This comment has been minimized.

Contributor

nadouani commented Oct 12, 2018

Well, looks like I'm still sleeping!

@Rolinh

This comment has been minimized.

Contributor

Rolinh commented Oct 12, 2018

@nadouani Yup, I'm sticking with 1.5.0 until I upgrade TheHive to v3.1.x. It's probably worth a HEADS UP in your blog post about TheHive4py 1.5 though ;)

@nadouani

This comment has been minimized.

Contributor

nadouani commented Oct 12, 2018

@Rolinh Yes, we will update the blog post accordingly.

@saadkadhi

This comment has been minimized.

@saadkadhi

This comment has been minimized.

Contributor

saadkadhi commented Oct 12, 2018

Blog post updated and @nadouani is going to offer tasteful croissants to the core team

@nadouani

This comment has been minimized.

Contributor

nadouani commented Oct 12, 2018

I'd offer that to all the community!

@saadkadhi

This comment has been minimized.

Contributor

saadkadhi commented Oct 12, 2018

By my last count, the community is about 100000 people spread across all the continents. Hope you have a very deep pocket :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment