Grantor propagation support
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
Current Citus version does not support grantor propagation
For example when we execute
``grant role1 to role2 granted by role3;``
this command is propagated both in command propagation and metadata_sync
``grant role1 to role2; ``
Below are related lines
https://github.com/citusdata/citus/blob/689c6897a437f0327976889cf42777c2b3869fd8/src/backend/distributed/commands/role.c#L904
https://github.com/citusdata/citus/blob/689c6897a437f0327976889cf42777c2b3869fd8/src/backend/distributed/commands/role.c#L1249
Upon comments written in code, dependency resolution might be the problem.
A thorough investigation is required to understand all the cases
Edit: I implemented this issue partially in https://github.com/citusdata/citus/pull/7451
Right now, if the grantor has admin option, it does not being fetched from dependency resolution
Contributor guide
Research direction
Start in src/backend/distributed/commands/role.c at the linked lines around 904 and 1249, then review merged PR 7451 and its handling of dependency resolution. Trace grant statements with an explicit grantor through command propagation and metadata_sync, including cases where the grantor has admin option. Done means all relevant grantor forms propagate consistently without dependency-resolution gaps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql
- Domain
- backend, databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100