morningman opened a new pull request, #16957:
URL: https://github.com/apache/doris/pull/16957
# Proposed changes
Issue Number: close #xxx
## Problem summary
This PR mainly changes:
1. When upgrading from old version to master, the ADMIN_PRIV for normal user
may be lost.
This may only happen if:
1. Create a user with ADMIN_PRIV privilege.
2. Upgrade Doris to v1.2.x or master before the meta image which
contains the edit log in step 1 is generate.
And the ADMIN_PRIV will be lost in Global Privileges
This PR will rectify this bug and set ADMIN_PRIV to the right place
2. Refactor the user's implicit role name
In #16091, we refactor the Doris auth model by introducing RBAC. And
each user will have an implicit role,
named with prefix `default_role_rbac_`. But it has wrong format like:
`default_role_rbac_'default_cluster:user1'@'%'`
This PR change the role name's format, like:
```
default_role_rbac_user1@%
default_role_rbac_user2@[domain]
```
NOTICE: this change may cause incompatible metadata, but since #16091 is
not released, we should fix it soon.
3. Add a new session variable `show_user_default_role`
When set to true, it will show implicit role of user in the result of
`show roles` stmt. Default is false
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [ ] Is this PR support rollback (If NO, please explain WHY)
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
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]