jasonish / evebox

Web Based Event Viewer (GUI) for Suricata EVE Events in Elastic Search
https://evebox.org/
MIT License
431 stars 67 forks source link

How to enable login function with SQLite? #287

Closed samiux closed 1 year ago

samiux commented 1 year ago

I am using the latest version of EveBox with SQLite. How to enable login function with that?

jasonish commented 1 year ago

This needs to be cleaned up in the documentation.. But here are some pointers:

Note that in git master that the authentication type of just "username" no longer exists, and that authentication is enabled by default.

I'll try to cleanup the docs this week, but please ask any questions here.

samiux commented 1 year ago

I have added the user and password with the command :

sudo -u evebox evebox config -D /var/lib/evebox users add

and confirmed that the user has been added properly.

evebox.yaml

authentication: required: true type: usernamepassword

However, when I start the browser and clear all the cookies, the login screen still does not appear.

jasonish commented 1 year ago

Hmm.. Server started with -D /var/lib/evebox and -c /path/to/evebox.yaml?

samiux commented 1 year ago

Sorry, I forgot to add -c /etc/evebox/evebox.yaml in the startup command. It works fine now. Thank you for your help.

jasonish commented 1 year ago

No worries, this is all poorly documented at this time.

samiux commented 1 year ago

Is it possible to create user and his/her password via bash script without interaction?

jasonish commented 1 year ago

Is it possible to create user and his/her password via bash script without interaction?

Yes, the users command can take --password and --username command line arguments.

samiux commented 1 year ago

sudo -u evebox evebox config -D /var/lib/evebox users --password mypassword --username myname error: unexpected argument '--password' found

Usage: evebox config users [OPTIONS] [COMMAND]

For more information, try '--help'.

samiux commented 1 year ago

However, the following is working fine.

sudo -u evebox evebox config -D /var/lib/evebox users add -u myname -p mypassword

jasonish commented 1 year ago

Ah, sorry. I added the longer versions in the dev version. Glad its working now.