sipcapture / homer-app

HOMER 7.x Front-End and API Server
http://sipcapture.io
GNU Affero General Public License v3.0
204 stars 79 forks source link

JWT Errors On 1.4.29 #465

Closed anthonywittig closed 2 years ago

anthonywittig commented 2 years ago

Hello - this is probably missing a lot of critical information, please let me know what to add. 🙏

We have two servers running heplify-server and homer-app. When we updated homer-app to 1.4.29 (from 1.4.27) we started seeing a lot of JWT errors in the browser console, e.x.:

Uncaught (in promise): invalid or expired jwt

Uncaught (in promise): missing or malformed jwt

We'd get a 401 on these and be redirected to the login page. Sometimes folks could get past the login page, but within a couple of mouse clicks they'd be redirected to the login page.

Here are the settings I think might be related:

  "auth_settings": {
    "_comment": "The type param can be internal, ldap, http_auth",
    "jwt_secret": some string UUID,
    "token_expire": 1200,
    "type": "internal"
  },
  "http_auth": {
    "skipverify": true,
    "url": "http://localhost:1323"
  },

Any help would be greatly appreciated, thanks!

github-actions[bot] commented 2 years ago

Your report is appreciated. Please star this repository to motivate its developers! :star:

adubovikov commented 2 years ago

@anthonywittig let us check it asap

adubovikov commented 2 years ago

@anthonywittig unfortunately couldn't reproduce it in our lab. can you please enable debug log and see if u see any errors ?

anthonywittig commented 2 years ago

I'll try that out off hours (for now we've scaled down to one host and things are working).

adubovikov commented 2 years ago

please regenerate jwt_sescret using "uuid" and clean the cache in your browser (F12->disable cache)

anthonywittig commented 2 years ago

Is there somewhere I can find out more about the auth_settings? Each host should have a unique jwt_secret, right?

adubovikov commented 2 years ago

@anthonywittig thats correct, but if you have cluster - you should have same between all your hosts

anthonywittig commented 2 years ago

That solved my issue 🤦 , thanks for your quick response and help! ⭐

adubovikov commented 2 years ago

you are welcome :-) please star us also here https://github.com/sipcapture/homer/stargazers