Better auth user/role handling (#1699)

* Stop auth module from creating users
* Explicit about auth policy (check if no users defined OR auth module used)
* Role supports database access definition
* Authenticate() returns user or role
* AuthChecker generates QueryUserOrRole (can be empty)
* QueryUserOrRole actually authorizes
* Add auth cache invalidation
* Better database access queries (GRANT, DENY, REVOKE DATABASE)
This commit is contained in:
andrejtonev
2024-02-22 15:00:39 +01:00
committed by GitHub
parent 98727e0fa0
commit 6a4ef55e90
60 changed files with 1870 additions and 880 deletions

View File

@@ -210,7 +210,7 @@ class Interpreter final {
std::optional<std::string> db;
};
std::optional<std::string> username_;
std::shared_ptr<QueryUserOrRole> user_or_role_{};
bool in_explicit_transaction_{false};
CurrentDB current_db_;
@@ -300,7 +300,7 @@ class Interpreter final {
void ResetUser();
void SetUser(std::string_view username);
void SetUser(std::shared_ptr<QueryUserOrRole> user);
std::optional<memgraph::system::Transaction> system_transaction_{};