Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] A user associated to a role to manage users can upgrade user roles to administration role #5284

Open
michaaa opened this issue Jun 23, 2023 · 2 comments
Assignees

Comments

@michaaa
Copy link

michaaa commented Jun 23, 2023

Greenlight V3 (release-3.0.5) doesn't seem to check this:

  • a user of a role that can manage users can give other users an admin role
  • it is possible to edit the own user account to "upgrade" it to a higher privileges role (i.e. admin)
Bildschirmfoto_2023-06-23_um_13_58_05

User is associated to "Verwaltung" and can change its own role to "Administrator" (and this will be executed because of "manage user" ability):

Bildschirmfoto_2023-06-23_um_14_27_08

In Greenlight V2 it is not possible this way:

  • can't edit the own user account attributes for users with role "manage users"
  • give a role to users with higher access privileges than its own role
Bildschirmfoto_2023-06-23_um_14_35_13
@scouillard
Copy link
Contributor

scouillard commented Jul 7, 2023

Hi,
After discussion, the users will not be allowed to change their own role under any circumstance.
However, users with the ManageUsers permission will still be able to change the roles of other users to any available role, even those with higher privileges than their own.
This opens up a variety of potential risks, as some permissions can have destructive effects.
But, it is nearly impossible to safeguard against all possible misuse scenarios.
Please take this into account when assigning the ManageUsers permission to a user.
Thank you very much for the report.

@michaaa
Copy link
Author

michaaa commented Jul 10, 2023

Well, I think better solution would be: Only Admin Role owner should be able to give Admin Role to others.

A user account with ManageUsers role won't change its own role (after this is fixed), but it's possible to add a new admin account then and use this one to change its own role (by using the new admin). So remove the ability to give Admin roles for non admins. However, I think this was implemented this way in Greenlight V2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants