MISP / misp-dashboard

A live dashboard for a real-time overview of threat intelligence from MISP instances
GNU Affero General Public License v3.0
192 stars 66 forks source link

MISP cannot be reached for authentication #136

Closed cudeso closed 4 years ago

cudeso commented 4 years ago

I set the authentication to the localhost MISP, public IP and hostname but always getting the message 'MISP cannot be reached for authentication'.

Setting the Flask server in debug does not return error messages. Logging in to MISP via the org-admin or test user works.

Any locations to look for debugging?

[Auth]
auth_enabled = True
misp_fqdn = https://127.0.0.1
ssl_verify = True
session_secret = mysecret
# Only send cookies with requests over HTTPS if the cookie is marked secure.
session_cookie_secure = True
# Prevent sending cookies in all external requests including regular links.
session_cookie_samesite = Strict
# Expire session cookie after n days.
permanent_session_lifetime = 1
mokaddem commented 4 years ago

Could you run the diagnostic.py and post the output here? Thanks!

cudeso commented 4 years ago

ssl_verify = False

✔ Virtual environment and packages
✔ Configuration
✔ File permission
✔ Redis
✔ Zmq
✔ Processes status: Both processes are running
✔ Subscriber status: subscriber is running and populating the buffer
ℹ Buffer queue: Currently 1 items in the buffer
✔ Buffer change rate: Buffer is consumed faster than being populated
✔ Dispatcher status: Took 0.92s to complete
--------------- %s http://192.168.171.121:8001/_get_log_head
✔ Server listening: http://192.168.171.121:8001/_get_log_head reached. Status code [200]
✖ Server dynamic enpoint: Redirected to `loging` caused by: MISP cannot be reached for authentication
VVX7 commented 4 years ago

Hi folks, apologies for not seeing this sooner. Authentication is failing due to lines 113 and 143 in server.py. Debug should be turned on on a production instance which means that data[_Token][debug] is always NoneType.

The error can be seen here:

File "/var/www/misp-dashboard/server.py", line 143, in misp_login
post_data["data[_Token][debug]"] = token_debug.group(1)
AttributeError: 'NoneType' object has no attribute 'group'

To fix this just comment out lines 113 and 143.

SteveClement commented 4 years ago

potentially fixed.