TheHive icon indicating copy to clipboard operation
TheHive copied to clipboard

[Bug] deduplication of Webhook call

Open azgaviperr opened this issue 2 years ago • 2 comments

Request Type

Bug

Work Environment

Docker Swarm stack on

Problem Description

I have set up two webhook, one filtered, one for all event, both got their own endpoint.

{
    "path": "notification",
    "defaultValue": [],
    "value": [
        {
            "delegate": false,
            "trigger": {
                "name": "FilteredEvent",
                "filter": {
                    "_and": [
                        {
                            "_is": {
                                "objectType": "Case"
                            }
                        }
                    ]
                }
            },
            "notifier": {
                "name": "webhook",
                "endpoint": "case_webhook"
            }
        },
        {
            "delegate": false,
            "trigger": {
                "name": "AnyEvent"
            },
            "notifier": {
                "name": "webhook",
                "endpoint": "shuffle"
            }
        }
    ]
}

When webhook is triggered it's requesting twice.

On thehive logs: [info] o.t.t.s.n.NotificationActor [|7ac24e51] Execution of notifier webhook for user None

On ShuffleFrontEnd image

There is 2 organisations that are linked together.

Everyt time the payload is exactly the same, not like one update and the other one create for case.

Steps to Reproduce

  1. Create at least 2 webhooks endpoint
  2. Trigger the webhook
  3. Enjoy

azgaviperr avatar Oct 18 '21 10:10 azgaviperr

Hi, have you ever solved this issue? I have the same problem on the webhook.

EDIT: Solved by excluding all the other organizations when the webhook is called.

ch-ckmate avatar Jan 12 '22 16:01 ch-ckmate

Can you give more details on how did you resolve this issue? I've tried everything !!!

When you mention "when the webhook is called", are you referring to the HTTP PUT request to activate what is configured in the application.conf file??

Thnks in advance

ialonsobase4 avatar Feb 16 '22 15:02 ialonsobase4