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

sql: Verify role applicability for RLS policies #138844

Open
Tracked by #73596
spilchen opened this issue Jan 10, 2025 · 0 comments
Open
Tracked by #73596

sql: Verify role applicability for RLS policies #138844

spilchen opened this issue Jan 10, 2025 · 0 comments
Labels
A-sql-privileges SQL privilege handling and permission checks. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@spilchen
Copy link
Contributor

spilchen commented Jan 10, 2025

This issue builds on the work done in #136704 and #136717. While policies are now applied during queries, we have yet to implement a check to determine if the policy applies to the current role.

Currently, the planner identifies the current role by name, whereas policies are stored using role IDs. To resolve this mismatch, we need to cache the role ID in the planner to enable ID-based verification. This approach aligns with related work in #98170.

Jira issue: CRDB-46373

@spilchen spilchen added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-privileges SQL privilege handling and permission checks. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-privileges SQL privilege handling and permission checks. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

No branches or pull requests

1 participant