graylog-plugin-alert-wizard icon indicating copy to clipboard operation
graylog-plugin-alert-wizard copied to clipboard

Error when importing a rule with a null description

Open frantz45 opened this issue 1 year ago • 5 comments

POST /api/plugins/com.airbus_cyber_security.graylog.wizard/alerts with the null value for the description field

It will return a 400 Bad request: Cannot construct instance of [...], problem: Null getDescription [...]

(This error happens when I tried to import a rule with a null description) (I don't know how it is possible to get a null description because it always seems to be an empty string instead of a null value when there is no description)

frantz45 avatar Feb 02 '24 14:02 frantz45

Is this still necessary? Do you still have rules with null descriptions? Could you attach an example of such rule to the issue? Thank you.

c8y3 avatar Jun 14 '24 07:06 c8y3

When there is no description, the export is supposed to write a JSON file with the description field set to empty string (and not null). It would be great to be able to identify the scenario which led to the generation of a JSON file with a null description and fix this issue at its root rather than make the import code more complex than necessary.

c8y3 avatar Jun 14 '24 07:06 c8y3

This should not happen. It must come from a script modifying the JSON. This issue won't be fixed at the moment. Issue is "in observation" for 1 year. If it happens again it will be fixed, otherwise it will be refused.

frantz45 avatar Jun 14 '24 08:06 frantz45

Issue has just happened, I didn't use any script, I've only exported rules from a Wizard v4.4.1. I've more than 100 rules in the JSON and only 1 rule has a null description.

frantz45 avatar Jul 11 '24 11:07 frantz45

It would be interesting to export the rule alone. And try to reproduce the problem starting from an empty graylog.

c8y3 avatar Jul 12 '24 13:07 c8y3

I confirm it's fixed in v6.1.0

frantz45 avatar Dec 24 '24 09:12 frantz45