TheHive-Project / TheHive

TheHive: a Scalable, Open Source and Free Security Incident Response Platform
https://thehive-project.org
GNU Affero General Public License v3.0
3.39k stars 617 forks source link

[Bug] Login issue after profile modification #2419

Closed error0x01 closed 2 years ago

error0x01 commented 2 years ago

Request Type

Bug

Work Environment

Question Answer
OS version (server) rhel based (amazon linux 2)
OS version (client) 4.14.281-212.502.amzn2.x86_64
Virtualized Env. True
Dedicated RAM 16 GB
vCPU 4
TheHive version 4.1.21-1
Package Type RPM
Database Cassandra
Index type Lucene
Attachments storage Local

Problem Description

I had a "Full-admin" profile with all permissions in “Administration Profiles” and just "Manage user" permission in the “Organisation Profiles” assigned to all active admin users. I changed the profile selecting all the permission in the “Administration Profiles” and “Organisation Profiles” and after the change, we can not access the admin organization with any admin user.

The user authentication for the admin users is running properly, I know it because if I use the wrong MFA code I have an error message in the browser, but if I give the right user/password/MFA code the system shows no error message in the browser, but do not shows the admin web page, just still shows the login webpage.

Steps to Reproduce

  1. Log in as admin user in the admin organization
  2. Select "Admin" -> "Profiles"
  3. Create a profile "Full-admin" with all permissions in “Administration Profiles” and just "Manage user" permission in the “Organisation Profiles”
  4. Create a new user new.admin.user
  5. Assign the profile "Full-admin" to a new.admin.user
  6. Logout
  7. Login with the new.admin.user
  8. Assign MFA to new.admin.user
  9. Logout
  10. Login with the new.admin.user using MFA
  11. Select "Admin" -> "Profiles"
  12. Select the profile "Full-admin" and assign all permission in the “Organisation Profiles” (let all permissions in “Administration Profiles” selected) and save the profile
  13. Logout
  14. Login with the new.admin.user using MFA

At this point, the system shows no error message in the browser but does not shows the admin web page, just still shows the login webpage.

Complementary information

/var/log/thehive/application.log do not expose anything about this issue.

I can not access with the default local admin (that has a different profile) because it is blocked

error0x01 commented 2 years ago

Sorry, not a bug.