MuhammadTahaNaveed opened a new pull request, #2309:
URL: https://github.com/apache/age/pull/2309

   Previously, age only set ACL_SELECT and ACL_INSERT in RTEPermissionInfo, 
bypassing pg's privilege checking for DELETE and UPDATE operations. 
Additionally, RLS policies were not enforced because AGE uses CMD_SELECT for 
all Cypher queries, causing the rewriter to skip RLS policy application.
   
   Permission fixes:
   - Add ACL_DELETE permission flag for DELETE clause operations
   - Add ACL_UPDATE permission flag for SET/REMOVE clause operations
   - Recursively search RTEs including subqueries for permission info
   
   RLS support:
   - Implemented at executor level because age transforms all cypher queries to 
CMD_SELECT, so pg's rewriter never adds RLS policies for INSERT/UPDATE/DELETE 
operations. There isnt an appropriate rewriter hook to modify this behavior, so 
we do it in executor instead.
   - Add setup_wcos() to apply WITH CHECK policies at execution time for 
CREATE, SET, and MERGE operations
   - Add setup_security_quals() and check_security_quals() to apply USING 
policies for UPDATE and DELETE operations
   - USING policies silently filter rows (matching pg behavior)
   - WITH CHECK policies raise errors on violation
   - DETACH DELETE raises error if edge RLS blocks deletion to prevent dangling 
edges
   - Add permission checks and rls in startnode/endnode functions
   - Add regression tests
   
   Assisted-by AI


-- 
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]

Reply via email to