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: modules/ROOT/pages/access-control/index.adoc
+27-23Lines changed: 27 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,64 +8,68 @@
8
8
This section explains how to manage Neo4j role-based access control and fine-grained security.
9
9
--
10
10
11
-
Neo4j has a complex security model stored in the system graph, maintained in a special database called the `system` database.
12
-
All administrative commands need to be executing against the `system` database.
13
-
When connected to the DBMS over bolt, administrative commands are automatically routed to the `system` database.
11
+
Neo4j has a complex security model stored in the system graph, which is maintained on a special database called the `system` database.
12
+
All administrative commands need to be executed against the `system` database.
13
+
When connected to the DBMS over `bolt`, administrative commands are automatically routed to the `system` database.
14
14
For more information on how to manage multiple databases, refer to the section on xref::databases.adoc[administering databases].
15
15
16
-
Neo4j 3.1 introduced the concept of _role-based access control_.
17
-
It was possible to create users and assign them to roles to control whether the users could read, write and administer the database.
16
+
The concept of _role-based access control_ was introduced in Neo4j 3.1.
17
+
Since then, it has been possible to create users and assign them to roles to control whether users can read, write and administer the database.
18
18
In Neo4j 4.0 this model was enhanced significantly with the addition of _privileges_, which are the underlying access-control rules by which the users rights are defined.
19
19
20
20
The original built-in roles still exist with almost the exact same access rights, but they are no-longer statically defined (see xref::access-control/built-in-roles.adoc[Built-in roles]).
21
21
Instead, they are defined in terms of their underlying _privileges_, and they can be modified by adding or removing these access rights.
22
22
23
-
In addition, any new roles created can be assigned any combination of _privileges_ to create the specific access control desired.
24
-
A major additional capability is _sub-graph_ access control whereby read-access to the graph can be limited to specific combinations of label, relationship-type and property.
23
+
In addition, any newly created roles can be assigned to any combination of _privileges_, so that you may set specific access controls for them.
24
+
Another new major capability is the _sub-graph_ access control, through which readaccess to the graph can be limited to specific combinations of labels, relationship types, and properties.
25
25
26
26
27
27
[[access-control-syntax]]
28
28
== Syntax summaries
29
29
30
-
Almost all administration commands have variations in the commands.
31
-
Parts of the command that are optional or can have multiple values are most common.
32
-
To show all versions of a command, a summary of the syntax will be presented.
33
-
These summaries will use some special characters to indicate such variations.
30
+
Almost all administration commands have variations.
31
+
The most common are parts of the command that are optional or that can have multiple values.
34
32
35
-
The special characters and their meaning are as follows:
33
+
See below a summary of the syntax to check all versions of a command.
34
+
These summaries use some special characters to indicate such variations.
36
35
37
36
.Special characters in syntax summaries
38
37
[options="header", width="100%", cols="1a,3a,3a"]
39
38
|===
40
39
| Character | Meaning | Example
41
40
42
41
| `\|`
43
-
| Or, used to indicate alternative parts of a command.
42
+
|
43
+
Used to indicate alternative parts of a command (i.e. `or`).
44
44
Needs to be part of a grouping.
45
45
| If the syntax needs to specify either a name or `+*+`, this can be indicated with `+* \| name+`.
46
46
47
47
| `+{+` and `+}+`
48
-
| Used to group parts of the command, common together with `\|`.
49
-
| To use the `or` in the syntax summary it needs to be in a group, `+{* \| name}+`.
48
+
| Used to group parts of the command. Commonly found together with `\|`.
49
+
| In order to use the `or` in the syntax summary, it needs to be in a group: `+{* \| name}+`.
50
50
51
51
| `[` and `]`
52
52
| Used to indicate an optional part of the command.
53
53
It also groups alternatives together, when there can be either of the alternatives or nothing.
54
54
| If a keyword in the syntax can either be in singular or plural, we can indicate that the `S` is optional with `GRAPH[S]`.
55
55
56
-
| `...`
57
-
| Repeated pattern, the command part immediately before this is repeated.
56
+
| `+...+`
57
+
|
58
+
Repeated pattern.
59
+
Related to the command part immediately before this is repeated.
58
60
| A comma separated list of names would be `+name[, ...]+`.
59
61
60
62
| `"`
61
63
| When a special character is part of the syntax itself, we surround it with `"` to indicate this.
62
-
| To include `+{+` in the syntax use `+"{" { * \| name } "}"+`, here we get either `+{*}+` or `+{name}+`.
64
+
|
65
+
To include `+{+` in the syntax use `+"{" { * \| name } "}"+`.
66
+
In this case, you will get either `+{ * }+` or `+{ name }+`.
63
67
64
68
|===
65
69
66
70
The special characters in the table above are the only ones that need to be escaped using `"` in the syntax summaries.
67
71
68
-
An example that uses all special characters is granting the `READ` privilege:
72
+
Here is an example that uses all special characters is granting the `READ` privilege:
69
73
70
74
[source, syntax, role="noheader"]
71
75
----
@@ -78,13 +82,13 @@ GRANT READ
78
82
TO role[, ...]
79
83
----
80
84
81
-
Some things to notice about this command is that it includes `+{+` and `+}+` in the syntax, and between them has a grouping of either a list of properties or the character `+*+`.
85
+
Note that this command includes `+{+` and `+}+` in the syntax, and between them there can be a grouping of properties or the character `+*+`.
82
86
It also has multiple optional parts, including the entity part of the command which is the grouping following the graph name.
83
87
84
-
In difference, there is no need to escape any characters in the node property existence constraint creation command.
85
-
This is because `(` and `)` are not special characters, and the `[` and `]` indicate that the constraint name is optional, and are not part of the command.
88
+
However, there is no need to escape any characters when creating a constraint for a node property.
89
+
This is because `(` and `)` are not special characters, and `[` and `]` indicate that the constraint name is optional, and therefore not part of the command.
86
90
87
-
[source, syntax, role="noheader", indent=0]
91
+
[source, syntax, role="noheader"]
88
92
----
89
93
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
0 commit comments