Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify directives presentation #211

Merged
merged 8 commits into from
Nov 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean-up
rsill-neo4j committed Nov 6, 2024
commit 30c93f588ad0d97938df5fba5660ae0eedaf0785
2 changes: 1 addition & 1 deletion modules/ROOT/pages/directives/index.adoc
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ The Neo4j GraphQL Library provides the following directives to be used whilst de
|===
| Directive | Description

| xref::/security/authentication.adoc#_authentication[`@authentication`]
| xref::/security/authentication.adoc[`@authentication`]
| Requires authentication checks when accessing the type.

| xref::/security/authorization.adoc[`@authorization`]
4 changes: 0 additions & 4 deletions modules/ROOT/pages/security/authentication.adoc
Original file line number Diff line number Diff line change
@@ -9,10 +9,6 @@ Explicit authentication, configured with the `@authentication` directive, is onl
Unauthenticated requests with queries requiring authentication never reach the database.
====

== Definition

// tba

== Operations

Authentication can be configured to only be validated on certain operations:
2 changes: 1 addition & 1 deletion modules/ROOT/pages/security/index.adoc
Original file line number Diff line number Diff line change
@@ -10,4 +10,4 @@ auth/authorization/where.adoc, authentication-and-authorization/index.adoc
* xref::/security/authorization.adoc[Authorization] - Rule-based authorization filtering and validation with the `@authorization` directive.
* xref::/security/subscriptions-authorization.adoc[Subscriptions authorization] - Rule-based authorization for subscriptions with the `@subscriptionsAuthorization` directive.
* xref::/security/impersonation-and-user-switching.adoc[Impersonation and user switching] - How to set up impersonation and user switching features.
* xref::/security/operations.adoc[Operations] - GraphQL query examples on how to trigger the evaluation of different authentication and authorization rules.
* xref::/security/operations.adoc[Operation examples] - GraphQL query examples on how to trigger the evaluation of different authentication and authorization rules.
10 changes: 4 additions & 6 deletions modules/ROOT/pages/security/operations.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Operations
= Operation examples
//:page-aliases: /authentication-and-authorization/reference/operations.adoc, /security/reference/operations.adoc
:description: This page describes how to set up authorization operations in the Neo4j GraphQL Library.

@@ -21,9 +21,7 @@ This also applies if the directive has no arguments because `operations` default

The following examples apply to the `@authentication` directive, and also any rules within an `@authorization` directive.

== Examples

=== Query
== Query

For a simple query, rules with `READ` in the operations are evaluated for any type being read:

@@ -39,7 +37,7 @@ query {
}
----

=== Mutation
== Mutation

For `create` mutations, `CREATE` rules on the object are evaluated for each node created, as well as field definition rules:

@@ -105,7 +103,7 @@ mutation {
}
----

=== Subscription
== Subscription

For a simple subscription to creation events, both `SUBSCRIBE` and `READ` operations trigger rules: