Skip to content

Commit 3a2d923

Browse files
committed
updates to security section
1 parent aefef7a commit 3a2d923

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

modules/ROOT/pages/security/authentication.adoc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
= Authentication
22
:description: This page describes how to set up authentication features in the Neo4j GraphQL Library.
33

4-
== `@authentication`
5-
64
The GraphQL Library offers the `@authentication` directive to configure authentication for certain operations and for different parts of your schema.
75

86
[IMPORTANT]
@@ -11,14 +9,10 @@ Explicit authentication, configured with the `@authentication` directive, is onl
119
Unauthenticated requests with queries requiring authentication never reach the database.
1210
====
1311

14-
=== Definition
12+
== Definition
1513

1614
// tba
1715

18-
=== Usage
19-
20-
// tba - what could be moved to this section from below?
21-
2216
== Operations
2317

2418
Authentication can be configured to only be validated on certain operations:

modules/ROOT/pages/security/authorization.adoc

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,13 @@ All authorization rules have an implied requirement for authentication, given th
1010
In the case of explicit authentication, configured using the xref::/security/authentication.adoc#_authentication[`@authentication`] directive, it is only evaluated during Cypher translation time.
1111
Unauthenticated requests with queries requiring authentication never reach the database.
1212

13-
== `@authorization`
14-
15-
=== Definition
16-
17-
// tba
18-
19-
=== Usage
20-
21-
// tba - what could be moved to this section from below?
22-
2313
[WARNING]
2414
====
2515
The `@authorization` directive does not apply to subscriptions, it only applies to queries and mutations.
2616
Instead, use xref::/security/subscriptions-authorization.adoc[`@subscriptionsAuthorization`] to configure the authorization for subscriptions if you intend to use subscriptions in your API and want the events protected.
2717
====
2818

29-
== Rules
30-
31-
=== Filtering
19+
== Filtering rules
3220

3321
Filtering rules filter out data which users do not have access to, without throwing any errors.
3422
These rules are translated into filtering predicates, which are evaluated against matched data in the database.
@@ -52,7 +40,7 @@ type Post @authorization(filter: [
5240
}
5341
----
5442

55-
==== Operations
43+
=== Operations
5644

5745
Filtering can be configured to only be performed on certain operations:
5846

@@ -82,7 +70,7 @@ In case there is no `operations` argument with a list of operations, the GraphQL
8270
====
8371

8472

85-
=== Validating
73+
== Validating rules
8674

8775
Validating rules throw an error if a query is executed against data which users do not have access to.
8876
These rules are evaluated in the database via filtering predicates containing calls to
@@ -104,7 +92,7 @@ type User @authorization(validate: [
10492
}
10593
----
10694

107-
==== Operations
95+
=== Operations
10896

10997
Validation can be configured to only be performed on certain operations:
11098

modules/ROOT/pages/security/subscriptions-authorization.adoc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,11 @@
44

55
Subscriptions require their own authorization rules, which are configured with the `@subscriptionsAuthorization` directive.
66

7-
== `@subscriptionsAuthorization`
8-
97
Rules for subscriptions authorization are different to normal authorization rules.
108
Only filtering rules are available for subscriptions events and there are more limitations in how they can be filtered.
119

1210
All subscriptions authorization rules have an implied requirement for authentication, given that the rules are normally evaluated against values in the JWT payload.
1311

14-
=== Definition
15-
16-
// tba
17-
18-
=== Usage
19-
20-
// tba - what could be moved to this section from below?
21-
2212
== Filtering rules
2313

2414
Filtering rules prevent events which contain information that users don't have access to from reaching them - they will receive no indication that this is the case.

0 commit comments

Comments
 (0)