morningman commented on PR #70371:
URL: https://github.com/apache/doris/pull/70371#issuecomment-7032311215

   Hi @raghav-reglobe 
   
   I think we should go with the role membership approach Calvin suggested.
   
   My proposed rules are:
   
   1. **GRANT ROLE**: A user can grant a role to others only if they already 
hold that role and have `GRANT_PRIV`. Users with `ADMIN_PRIV` can grant any 
role.
   2. **GRANT PRIVILEGE**: Keep the existing behavior. A user can grant 
privileges they already hold, provided they also have the required `GRANT_PRIV`.
   
   For example, if user A has `SELECT_PRIV` on `db1` and `GRANT_PRIV`, but is 
not a member of `RoleA`, A can grant `SELECT_PRIV` on `db1` to others, but 
cannot grant `RoleA` — even if A holds all the privileges currently included in 
`RoleA`.
   
   The key principle is that **granting privileges and granting roles are two 
separate concepts**. Having all the privileges of a role doesn't necessarily 
mean you should be allowed to grant that role, especially since the role's 
privileges may change in the future.
   
   I think this makes the authorization model clearer and more predictable. 
Let's proceed with this approach.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to