Skip to content
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

Suggested Update for Imap2TheHive #12

Open
vi-or-die opened this issue Dec 19, 2018 · 0 comments
Open

Suggested Update for Imap2TheHive #12

vi-or-die opened this issue Dec 19, 2018 · 0 comments

Comments

@vi-or-die
Copy link

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.

  1. Modify .conf file's [thehive] section to add apikey: field, then remove the user: and password: fields.
  2. Remove lines 62-63 in imap2thehive.py and add apikey line
  3. Modify line 273 in imap2thehive.py, to remove config['thehiveUser'], config['thehivePassword'], {'http': '', 'https': ''} and add config['apikey']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant