You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/database-management/authentication-and-authorization/role-based-access-control.mdx
+28-8Lines changed: 28 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,6 +184,13 @@ of the following commands:
184
184
For a comprehensive reference of which privileges are required for specific queries and operations, see the [Query privileges reference](/database-management/authentication-and-authorization/query-privileges) documentation.
185
185
</Callout>
186
186
187
+
### First user privileges
188
+
189
+
When you create the first user in Memgraph, that user automatically becomes a
190
+
superuser (administrator account with full system access) with all privileges.
191
+
See the [templates for granting privileges](#templates-for-granting-privileges)
192
+
section for details on what privileges are granted.
193
+
187
194
## Authentication and authorization requirements
188
195
189
196
<Callouttype="info">
@@ -258,14 +265,19 @@ In this setup:
258
265
- Application data is stored in tenant-specific databases, not in the default
259
266
"memgraph" database
260
267
261
-
After the first user is created, Memgraph will execute a query if and only if
262
-
either a user or its role is granted that privilege and neither the user nor its
263
-
role are denied that privilege. Otherwise, Memgraph will not execute that
264
-
specific query. Note that `DENY` is a stronger operation than `GRANT`. This is
265
-
also notable from the fact that if neither the user nor its role are explicitly
266
-
granted or denied a certain privilege, that user will not be able to perform
267
-
that specific query. This effect is also known as a silent deny. The information
268
-
above is neatly condensed in the following table:
268
+
After the first user is created, Memgraph switches from "allow everything" mode
269
+
(when no users exist) to "access controlled" mode. From that point forward, all
270
+
connections must authenticate with valid credentials, and unauthenticated
271
+
connections will be rejected.
272
+
273
+
Memgraph will execute a query if and only if either a user or its role is
274
+
granted that privilege and neither the user nor its role are denied that
275
+
privilege. Otherwise, Memgraph will not execute that specific query. Note that
276
+
`DENY` is a stronger operation than `GRANT`. This is also notable from the fact
277
+
that if neither the user nor its role are explicitly granted or denied a certain
278
+
privilege, that user will not be able to perform that specific query. This effect
279
+
is also known as a silent deny. The information above is neatly condensed in the
280
+
following table:
269
281
270
282
User Status | Role Status | Effective Status
271
283
------------|-------------|------------------
@@ -724,6 +736,14 @@ permissions) for the user or role in the specified database context.
724
736
725
737
### Templates for granting privileges
726
738
739
+
<Callouttype="info">
740
+
741
+
**Note**: The first user created automatically receives all privileges (as
742
+
described in the [First user privileges](#first-user-privileges) section). The
743
+
following templates are for granting privileges to additional users or roles.
0 commit comments