dockers
dockers copied to clipboard
Suggested Update for Imap2TheHive
Summary:
After updating theHive server, Elastic-search, and then removing unused packages I broke Imap2thehive authentication into TheHive. During my troubleshooting I happened to stumble on using the API key for authentication instead of the Username Password combination and that seemed to resolve the bug.
Error:
[ERROR]: Cannot create alert: 401 ({"type":"AuthenticationError","message":"Authentication failure"})
Testing Method
To test this solution I put the API key in the password field and reformatted TheHiveAPI call's configuration line.
OLD
api = TheHiveApi(config['thehiveURL'], config['thehiveUser'], config['thehivePassword'], {'http': '', 'https': ''})
Temporary Replacement
api = TheHiveApi(config['thehiveURL'], config['thehivePassword'])
Full Replacement process
I think this might be the full process to update the script. I am still working to figure out how the whole pull request system works.
- Modify .conf file's
[thehive]
section to addapikey:
field, then remove theuser:
andpassword:
fields. - Remove lines 62-63 in imap2thehive.py and add apikey line
- Modify line 273 in imap2thehive.py, to remove
config['thehiveUser'], config['thehivePassword'], {'http': '', 'https': ''}
and addconfig['apikey']