NullArray/Mimir

Invalid API credentials

azfayel opened this issue · 9 comments

Hello,

I provide the correct API keys for accessing HOneyDB and confirm w/ their support that all works fine but when running the fecth commande i have this errror
{u'status': u'Invalid API Credentials. See API Authentication section here https://riskdiscovery.com/honeydb/#threats'}
How to debug

When using curl w/ API credentials it works fine.

Regards,

Hello, sorry for the late reply. I have been a little busy the past few days. That said...

Are you sure you did not switch up your API ID and API Keys? When Mimir asks for your API data it is important that you first input your ID and then your Key.

ID and Key are separately stored to a var and pickled. In the source code i am setting the ID and Key to the headers in PycURL in a precise order.

opts = ['X-HoneyDb-ApiId: ' + DB_API_ID, 'X-HoneyDb-ApiKey: ' + DB_API_KEY]

If you accidentally input your Key where the ID is supposed to go and vice versa you may encounter this issue.

No i do not switch the PidID and API key.
From HoneyDB support, i use this command line : curl -X POST -d "api_id=MY_API_ID&api_key=MY_PI_KEY" https://riskdiscovery.com/honeydb/api/test/auth_sensor

And it works well. It seems the method you invoked through Pycurl needs to be changed a little bit.

I swicthed they keys but the error remains.
{u'status': u'Invalid API Credentials. See API Authentication section here https://riskdiscovery.com/honeydb/#threats'}

If you would like me to have a look at a specific method please provide a line number if the method is in Mimir source code, or provide a line number for the method as to where it resides within the module you are referencing.

The issue is not reproducible on my end.

Furthermore, your link -> https://riskdiscovery.com/honeydb/#threats%27%7D brings me to a data visualization part of HoneyDB and not to the actual page you are trying to point me at. Not that it matters, i am aware of how to authenticate to HoneyDB because the program works as it is supposed to on my end.

Which distro are you running? And, do you have a version of PycURL that supports OpenSSL?

The command i sent you is in bash script for debugging with HONEY support cause there was an issue with my API Key, so HoneyDB found out the issue and patch.

I'm using Kali based on debian and i have a version of Pycurl that supports OpenSSL.
'PycURL/7.43.0 libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3'

HoneyDB found out the issue and patch

Does that mean the issue is resolved for you now?

Unfortunately no. The keys weren't generated properly in HoneyDB now it works but not through mimir tool.

If your keys have been properly generated now, please try deleting the following files from the directory from which you are running Mimir.

HDB-api-ID.p
HDB-api-key.p

Starting the script then will prompt you to input you API ID and Key again. Please ensure you enter your updated API credentials and try to see if it works then.

Ok. it work now.
Thank you for your support.

No problem at all. I am happy you got everything to work. If you encounter any more issues or need additional support please feel free to open another ticket.

Regards,

NullArray