* Split queries into system and data queries
* System queries are sequentially executed and generate separate transaction deltas
* System transaction try locks for 100ms
* last_commited_system_ts saved to DBMS durability
* Replicating CREATE/DROP DATABASE
* Sending a system snapshot if REPLICA behind
* Passing a copy of the gatekeeper::access as std::any to all functions that could call an async execution
* Removed delete_on_drop flag (we now always delete on drop)
* Using UUID as the directory name for databases
* DBMS durability update (added versioning and salient information)
* Automatic migration from previous version
* Interpreter can run some queries without a target database
* SHOW REPLICA returns the status of the currently active DB
* Returning UUID instead of db name in the RPC responses
* Using UUIDs for database specification in RPC (not name)
* FrequentCheck forces update on reconnect
* TimestampRpc will detect if a replica is behind, and will update client's state
* Safer SLK reads
* Split SHOW DATABASES in two SHOW DATABASES (list of current databases) and SHOW DATABASE a single string naming the current database
---------
Co-authored-by: Gareth Lloyd <gareth.lloyd@memgraph.io>
* Decouple BoltSession and communication::bolt::Session
* Add CREATE/USE/DROP DATABASE
* Add SHOW DATABASES
* Cover WebSocket session
* Simple session safety implemented via RWLock
* Storage symlinks for backward. compatibility
* Extend the audit log with the DB info
* Add auth part
* Add tenant recovery
* [T1006-MG < T1017-MG] Add LBA checks to all read procedures in C API (#515)
* Initial Impl
* NextPermittedEdge introduced
* revert moving constructor to cpp
* edge from and edge to methods expanded with lba check
* minor fix
* added check to path expand procedure
* Added integration tests for read query procedures
* additional check
* changed iterator type to reference
* comments from pr
Co-authored-by: Josip Mrden <josip.mrden@memgraph.io>
* [T1006-MG < T1018-MG] Add LBA checks to all update procedures in C API (#516)
* Initial Impl
* NextPermittedEdge introduced
* revert moving constructor to cpp
* edge from and edge to methods expanded with lba check
* minor fix
* extended update methods
* added check to path expand procedure
* Added integration tests for read query procedures
* Added integration tests for update query modules
* additional check
* changed iterator type to reference
* fixed bug in Update property for node; fixed 2 e2e tests
* replaced enum
Co-authored-by: Josip Mrden <josip.mrden@memgraph.io>
* [T1006-MG < T1019-MG] Add LBA checks to all Create and Delete procedures in C API (#517)
* Initial Impl
* NextPermittedEdge introduced
* revert moving constructor to cpp
* edge from and edge to methods expanded with lba check
* minor fix
* extended update methods
* initial implementation
* added check to path expand procedure
* Added integration tests for read query procedures
* Added integration tests for update query modules
* Added unit tests for creation of vertex, adding and removing vertex label
* additional check
* changed iterator type to reference
* Added unit tests for create edge
* Corrected query module in create edge
* fixed bug in Update property for node; fixed 2 e2e tests
* fixed merge errors
* Expanded FineGrainedAuthChecker with HasGlobalPermissionOnVertices and HasGlobalPermissionOnEdges
* Removed two wrong checks; Added two global checks
* return null added
* introduced new mgp_error value
* fixed endless loop
* replaced enum
* intermediate
* tests updated
* PermissionDeniedError -> AuthorizationError rename
* rename in enum permission_denied error -> authorization error
* mgp_vertex_remove_label check improved
* quotes changed; order of imports fixed
* string constant introduced
* import fixed
* yaml format
Co-authored-by: Josip Mrden <josip.mrden@memgraph.io>
Co-authored-by: Josip Mrden <josip.mrden@memgraph.io>
* Added enum for more granular access control; Expanded functionality of fine grained access checker; Propagated changes to Edit, Deny and Revoke permissions methods in interpreter
* Introduced Merge method for merging two colle with permissions
* e2e tests implementation started
* Expanded cypher to support fine grained permissions
* ast.lcp::AuthQuery removed labels, added support for label permissions
* promoted label permissions to vector
* removed unnecesary enum value
* expanded glue/auth with LabelPrivilegeToLabelPermission
* added const
* extended Grant Deny and Revoke Privileges with new label privileges
* extended Edit Grant Deny and Revoke Privileges to properly use new model
* Fixed unit tests
* FineGrainedAccessChecker Grant and Deny methods reworked
* Revoke cypher slightly reworked; Revoke for labels works without label permissions
* EditPermission's label_permission lambda now takes two parameters
* constants naming enforced; replaced asterisks with string constant
* removed faulty test addition
* Naming fixes; FineGrainedAccessChecker unit tests introduced
* unnecessary includes removed; minor code improvements
* minor fix
* Access checker reworked; denies and grant merged into single permission object; Created global_permission that applies to all non-created permissions. Grant, Deny and Revoke reworked; Merge method reworked
* Fixed wrong check;
* Fix after merge; renamed constants; removed unused constant
* Fix after merge; workloads.yaml for lbaprocedures e2e tests updated with new grammar
* Fixes after merge
* Fixes after merge
* fixed Revoke that was not fixed after the merge
* updated cypher main visitor tests
* PR review changes; Naming and const fixed, replaced double tertiary with lambda
* unwrapping the iterator fix
* merge 1003 minor fix
* minor spelling fixes
* Introduced visitPrivilegesList because of the doubled code
* const added
* string const to enum
* redundant braces
* added const
* minor code improvement
* e2e tests expanded
* if -> switch
* enum class inherits uint8_t now
* LabelPrililege::EDIT -> LabelPrivilege::UPDATE
* LabelPermission -> EntityPermission; LabelPrivilege -> EntityPrivilege
* EntityPrivilege -> FineGrainedPrivilege; EntityPermission -> FineGrainedPermission
* implemented skipping vertices in Constructor and mgp_vertices_iterator_next
* Added utility function for moving iterator to next permitted vertex
* removed ifdef directive
* NextPermitted parameter type changed from mgp_vertices_iterator* to mgp_vertices_iterator&
* created support for lba-procedures e2e testing; Added test for vertex iterator skipping unauthorized vertices
* removed fixture from tests; converted generator to regular function;