[MDEV-29851] Cached role privileges are not invalidated when needed Created: 2022-10-21 Updated: 2022-10-22 Resolved: 2022-10-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.3.37, 10.4.27, 10.5.18, 10.6.11, 10.7.7, 10.8.6, 10.9.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Angelique Sklavounos (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
There appears to be an inconsistency of when privileges of a role are applied indirectly via another role and when the user connects to the server. For instance - role1->user, role2->role1; user connects and has role2 privileges:
However - role1->user; user connects; role2->role1; user connects but does not have role2 privileges. FLUSH PRIVILEGES is needed before user has role2 capabilities:
Why this is the case is not clear to me. |
| Comments |
| Comment by Sergei Golubchik [ 2022-10-22 ] | |||
|
The reason is intermediate
this computes privileges that user intern has on the schema crm, the result is cached. And, apparently, the cache is not invalidated when you grant admin to student. |