snikket-server icon indicating copy to clipboard operation
snikket-server copied to clipboard

Web tokens are not invalidated on role change

Open horazont opened this issue 3 years ago • 2 comments

When changing the role of a user in the web portal, their current XMPP connections are killed to let the changes take effect, but web portal sessions continue to live on.

This means that I can nicely test everything with my own user because I can change my role to Limited and have it take effect in the app without de-admin-ing myself in the portal :). However, obviously this is a problem in real deployments, because in a bad situation, you might want to be able to take admin permissions away immediately, without the subject being able to do things with those permissions afterward (such as restoring their admin permissions and taking yours away).

horazont avatar Nov 13 '21 18:11 horazont

This should have been fixed by one of the Prosody updates, whichever included at least this commit. Should probably be tested to be sure.

Zash avatar Dec 04 '23 22:12 Zash

Testing done:

  1. Login to web portal with admin user in first window
  2. Open second, private browsing window and login with normal user
  3. In the first window, change role of the regular user to limited
  4. Refresh page or click something in the second window
  5. Observe that the regular user gets logged out
  6. Attempt to login again but this fails (bug?)

Zash avatar Jan 06 '24 20:01 Zash