-
Notifications
You must be signed in to change notification settings - Fork 385
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
[OSCD Initiative] add Gmail responder #891
Conversation
Hello @strassi! Sorry for the delay, it was a quite busy time. I've tested your responder and got a few comments:
|
Hi @yugoslavskiy!
Expected behavior (that worked in my tests, in November):
Can you provide a some sort of screenshots or output along the way of the described test run? |
Hi @strassi! Here is how it was:
Here is the screenshots: |
I took the TheHive 3.4.0 Training VM for debugging the problem. Additionally I disabled the Gmail API calls in To get this work in the training VM I had to upgrade @yugoslavskiy can you check if the installed version of your I'm going to set the requirements.txt to include the minimum version for the library to exclude future problems of this kind. |
Hello @strassi! Hope you are doing well (: I had
So I decided to update all the packages to the versions you fixed in your last commit, and here is what I got:
It seems that it's time to move to the docker, but I have not idea how to make it work there, even tho I see the Dockerfile you've created. |
Here is how it was:
Here is how it looked at that step:
Here is the info about successful execution: Here is the list of observables (no tags created): So it seems that the result is the same, Could you please give me a hint on the debugging? It seems that you somehow spot the error with the old version of |
Hi @yugoslavskiy ! I'm doing fine besides wondering about this bug 🤔 So far we see that
I'm wondering if the responder gets any gmail obervables from the case. You could change line 145
to
this should print the list of gmail observables to the responders output. Furthermore you could check if the filters are set in the Gmail settings of the respective gmail address (e.g. |
Yeah, the filters are set, that's for sure. I had to delete the previous one manually. The only issue with the So it breaks on first and didn't try to proceed with the second one. Maybe the main issue here is that it doesn't remove the filter tag from the observable after deleting the real filter in the Gmail (after successful execution), which (IMHO) it should do. I've updated the line you've suggested, and here is what I got:
It seems that it wants to add a new tag or consider that it has been added, but it haven't: Also, if we consider this one as a UI bug, and try to execute So the problem is that Cortex for some reason cannot add the tag, and does it silently. At the same time it somehow added the "gmail:handled" tag. So I was about to ask what permissions did you provide cortex user account with, but decided to add So it did. Now it creates tags, removes tags, does its job, works fine. Thank you for your work and for your patience, man! |
I see the problem. For my tests I used the API key of the thehive admin user in the training VM. This user does have write permissions. I just realized, that the API provides a Nice analysis @yugoslavskiy; would not have thought of the api key permissions |
Hello @strassi! I've tested the other functions and everything works smoothly. @nadouani @jeromeleonard guys, is there anything else required from our side to proceed with the merging? |
Hello @nadouani @jeromeleonard! Is there anything required from our side to proceed with merging? (: |
Hello @strassi! Could you please change the base (target branch) to the |
Implementation of the Gmail Responder for the OSCD Initiative. Can only be used with a valid Gsuite Account.
This fixes Issue #859