jasonish / evebox

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

authentication doesn't work in EveBox 0.13 #160

Closed Joelp closed 3 years ago

Joelp commented 3 years ago

I was using authentication in version 0.11.1. After upgrade I have HTTP 401 in browser console.

My config is:

data-directory: /var/lib/evebox
authentication:
  required: true
  type: usernamepassword

I have user in SQLite:

# evebox config -D /var/lib/evebox users list
{"uuid":"<SOME UUID>","username":"support"}

Browser error:

XHRGET https://evebox-dev.domain.tld/api/1/config

HTTP/1.1 401 Unauthorized
Server: nginx/1.14.1
Date: Mon, 22 Mar 2021 12:28:00 GMT
Content-Type: application/json
Content-Length: 48
Connection: keep-alive
x-evebox-git-revision: f33d6b5
updateConfig failed: main.a6b36837615a188953f5.js:1:2435276
{…}
error: {…}
error: "authentication required"
status: 401
<prototype>: Object { … }
headers: Object { normalizedNames: Map(0), lazyUpdate: null, lazyInit: lazyInit()
 }
​
message: "Http failure response for https://evebox-dev.domain.tld/api/1/config: 401 Unauthorized"
​
name: "HttpErrorResponse"
​
ok: false
​
status: 401
​
statusText: "Unauthorized"
​
url: "https://evebox-dev.domain.tld/api/1/config"
​
<prototype>: {…}
​​
constructor: class d_ { constructor(e) }​​
<prototype>: {…}
​​​
constructor: class l_ { constructor(e, t, n) }​​​
<prototype>: {…
jasonish commented 3 years ago

I think I have fixed this issue. Are you willing to try out a development build?

Joelp commented 3 years ago

On 0.13.1-0.dev1616450377 works well

jasonish commented 3 years ago

Fixed in master.