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/security/authorization.adoc
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,9 @@ type Post @authorization(filter: [
66
66
}
67
67
----
68
68
69
+
[NOTE]
70
+
If there is no `operations` argument with a list of operations, the GraphQL Library treats the authorization configuration as if the full list of operations had been provided.
71
+
69
72
70
73
=== Validating
71
74
@@ -115,6 +118,9 @@ type Post @authorization(validate: [
115
118
}
116
119
----
117
120
121
+
[NOTE]
122
+
If there is no `operations` argument with a list of operations, the GraphQL Library treats the authorization configuration as if the full list of operations had been provided.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/security/impersonation-and-user-switching.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Impersonation still authenticates with the database as the original configured u
10
10
When impersonating a user, the query is run within the complete security context of the impersonated user and not the authenticated user (home database, permissions etc).
11
11
12
12
Consider the following an example of how to impersonate a different user per request.
13
-
Here the user to impersonate is taken from a HTTP header `User`:
13
+
Here the user to impersonate is taken from an HTTP header `User`:
:description: This page describes how to set up authorization operations in the Neo4j GraphQL Library.
4
4
5
-
This reference runs through a number of worked GraphQL queries and how each location in each query triggers the evaluation of different authentication/authorization rules.
5
+
This page showcases a number of GraphQL queries and how you can trigger the evaluation of different authentication and authorization rules.
6
6
7
-
Each relevant location has a comment such as `CREATE ON OBJECT Movie`, which means an authentication directive such as the following would be evaluated:
7
+
Each relevant line has a comment such as `CREATE ON OBJECT Movie`, which means an authentication directive like the following is be evaluated:
8
8
9
9
[source, graphql, indent=0]
10
10
----
@@ -14,15 +14,16 @@ type Movie @authentication(operations: [CREATE]) {
14
14
}
15
15
----
16
16
17
-
This also applies if the directive had no arguments, because `operations` defaults to _all_ operations.
17
+
[NOTE]
18
+
This also applies if the directive has no arguments because `operations` defaults to _all_ operations.
18
19
19
20
The following examples apply to the `@authentication` directive, and also any rules within an `@authorization` directive.
20
21
21
22
== Examples
22
23
23
24
=== Query
24
25
25
-
For a simple query, rules with `READ` in the operations will be evaluated for any type being read:
26
+
For a simple query, rules with `READ` in the operations are evaluated for any type being read:
26
27
27
28
[source, graphql, indent=0]
28
29
----
@@ -38,7 +39,7 @@ query {
38
39
39
40
=== Mutation
40
41
41
-
For create Mutations, `CREATE` rules on the object will be evaluated for each node created, as well as field definition rules:
42
+
For `create` mutations, `CREATE` rules on the object are evaluated for each node created, as well as field definition rules:
42
43
43
44
[source, graphql, indent=0]
44
45
----
@@ -55,7 +56,7 @@ mutation {
55
56
}
56
57
----
57
58
58
-
For single delete Mutations, rules with `DELETE` on the object will be evaluated:
59
+
For single `delete` mutations, rules with `DELETE` on the object are evaluated:
59
60
60
61
[source, graphql, indent=0]
61
62
----
@@ -66,7 +67,7 @@ mutation {
66
67
}
67
68
----
68
69
69
-
For delete Mutations with nested delete operations, rules with operation `DELETE` will be evaluated:
70
+
For `delete` mutations with nested delete operations, rules with operation `DELETE` are evaluated:
70
71
71
72
[source, graphql, indent=0]
72
73
----
@@ -80,7 +81,7 @@ mutation {
80
81
}
81
82
----
82
83
83
-
For a complex update Mutation with many effects, a variety of rules will be evaluated, as well as `READ` rules for the selection set:
84
+
For a complex `update` mutation with many effects, a variety of rules is evaluated, as well as `READ` rules for the selection set:
84
85
85
86
[source, graphql, indent=0]
86
87
----
@@ -104,7 +105,7 @@ mutation {
104
105
105
106
=== Subscription
106
107
107
-
For a simple Subscription to creation events, both `SUBSCRIBE` and `READ` operations trigger rules:
108
+
For a simple subscription to creation events, both `SUBSCRIBE` and `READ` operations trigger rules:
108
109
109
110
[source, graphql, indent=0]
110
111
----
@@ -117,7 +118,7 @@ subscription {
117
118
}
118
119
----
119
120
120
-
For a more complex Subscription to relationship events, both `SUBSCRIBE` is an operation, as well as `READ` to all relevant types:
121
+
For a more complex subscription to relationship events, `SUBSCRIBE` is an operation as well as `READ` to all relevant types:
0 commit comments