-
Notifications
You must be signed in to change notification settings - Fork 56
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
Better error messages for missing authentication #238
Comments
10:45 AM 24× Error loading bot queues information: {"errors": {"Invalid Authentication": "Provided Token verification credentials were invalid"}} Unauthorized 10:44 AM Get an error error, Unauthorized when trying to obtain config file properly 10:44 AM Get an error error, Unauthorized when trying to obtain config file properly 10:44 AM Get an error error, Unauthorized when trying to obtain config file properly 10:44 AM Get an error error, Unauthorized when trying to obtain config file properly 10:44 AM Get an error error, Unauthorized when trying to obtain config file properly |
Hello, Sorry to up this topic but I've the same issue. Thank in advance :) |
For any help more information is required: What error messages do you get at what action and which preconditions (e.g. logged in), how did you install and set up IntelMQ, which operating system are you using etc. |
@aragorne007 It could be that it is redis that is giving you a problem solution: chown -R redis:redis /var/log/redis |
@oencarnacion @sebix When I'm log in and when I go to any menu, I've 2 kinds of error : First One (Configuration & Monitor) : 22:27:55 369× Error loading bot queues information: {"errors": {"Invalid Authentication": "Provided Token verification credentials were invalid"}} Unauthorized 22:21:53 Get an error error, Unauthorized when trying to obtain config file properly 22:21:53 Get an error error, Unauthorized when trying to obtain config file properly 22:21:53 Get an error error, Unauthorized when trying to obtain config file properly The second one (Check) : error getting check command output I'm sure that it's a permission issue but I'm not sure to understand which folder need to have the right access. Thank for your help :) |
If it can help, the result of "intelmqctl debug" Paths: |
I assume you installed the deb/rpm packages? Which operating system?
Is the login successful (Is the username shown instead of the login-button after the login?) What you are seeing must be some glitch in the authentication between the manager and the API. See also https://intelmq.readthedocs.io/en/latest/user/intelmq-api.html#access-denied-authentication-required-please-provide-valid-token-verification-credentials (but that does not really apply as you are using the API indirectly with the Manager). The Manager needs to pass the token to the API in its calls. If you are up for some debugging, check what you see in the HTTP request headers of the API calls (using the debug tools of the browser). |
The documentation isn't enough complete I think :( I'm not enough documented to try some debug with HTTP request In "check" panel, I've this error : In "about" panel, I've 2 others error messages : error getting version I don't know if it can help you or give you some clue ? |
In order to reconstruct your error, it is still important to know if you installed the deb/rpm packages or via Pip or from git, and which operating system you are using?
Yes, I know. That section is not meant for the error you are experiencing, I linked it because it is related.
Which browser are you using? I can guide you.
All that indicates an error with the authentication, but no trace on the reasons.
I have no clue what the error is, either, but I am offering some of my spare time so we can debug it together. |
Hi @aragorne007 confirm me that in this /var/lib/ path you have a folder called dbconfig-common |
Hello @sebix ; I installed the package from pip3 install. I'm using Google Chrome :) Yes, It's what I expect, an authentication issue but I didn't find any log to prove that. Hello @oencarnacion, Yes, and "intelmq" user is the owner BUT I think that I've manually created this folder because it wasn't create during the installation. Thank a lot for you help guys :) |
@aragorne007 The solution to your problem is to go to the /var/lib/ path, unzip the zip that I supply, give it read and write permission and then proceed to create the user and if you want, restart the server just in case and that's it, it should work for you. intelmq bug both for installation of binaries or through python. You know @sebix :) |
@oencarnacion I've move your folder to my IntelMQ server and, to be sure, add chmod 766 :P Loading config from /etc/intelmq/api-config.json I guess, it's a new permission issue :P |
What is the service used by intelmq ? |
Ohh no, I find the issue : cat /etc/intelmq/api-config.json The session_store folder doesn't exists /var/lib/dbconfig-common/ Can I create the folder myself ? |
yes |
OK, then it's clear that some manual work needs to be done. Installing via pip is more difficult than the automated deb/rpm package installation. Permissions 766 don't sound right at all. Make the file and the directory containing the file writable for the webserver, only the webserver.
The API is run by apache -> |
I'm dumb ^^ So twice dbconfig-common in depth ^^ I created the new user with intelmq-api-adduser succesfully but now, in the intelmq-manager panel, I can't login. Login failed with unknown reason. Please report this bug. Redis and Apache2 has ben restarted |
What does the apache error log say? |
The log for 1 attemp It look like another permission missing |
is the session database and the directory containing the file writable for the webserver? Please show |
"root" for the first one. I'll change that. |
I assume the user your webserver is using, is not intelmq, but rather apache, www-data or similar. Use that one. |
Ohhh, It's maybe that the main issue. |
Do you have an exhaustive list of all folder that I need to change the owner from "intelmq" to "www-data" ? www-data is the user mention and existing in the /etc/passwd file. "Apache" is not existing |
Did you actually run |
No, because this command isn't existing. I performed "intelmqctl check" before and "No Issues Found" diplayed. |
Did you use https://intelmq.readthedocs.io/en/maintenance/user/installation.html#pypi or a different installation method? |
Yes, I used this one. I tried a new time :
|
I tried also that, but not really relevant :
|
OK, that looks like you have mixed different installation methods. You installed intelmq with deb packages and pip. The outcome is naturally a mishmash. Please stick to one method. |
Mhmm maybe because I tried some things when it doesn't work properly the first time. Thank a lot for your help !! |
Please just create a discussion or ask for help on the mailing list to keep the existing issues on-topic. Thanks. |
Ok ok :) Thank you very much for the time spent to help me :) |
If login is required, but the user is not logged in, the error messages are not good.
On Monitor:
On configuration and management page, plus the same of monitor:
On check page: pop-up with
error getting check command output
Ob about: pop-up with
Error getting debugging information. Do you have IntelMQ >= 2.2.0?
The text was updated successfully, but these errors were encountered: