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:
@@ -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_{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user