Skip to content

Commit 44d473e

Browse files
phil198renetapopova
authored andcommitted
pr review comments
1 parent c7bf5e3 commit 44d473e

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

modules/ROOT/pages/authentication-authorization/manage-users.adoc

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ SET AUTH [PROVIDER] 'provider' "{"
309309
a|
310310
Modifies the settings for an existing user.
311311
At least one `SET` or `REMOVE` clause is required.
312-
`SET` and `REMOVE` clauses cannot be combined in the same command.
313312

314313
For more information, see xref:authentication-authorization/manage-users.adoc#access-control-alter-users[Modifying users].
315314

@@ -641,16 +640,16 @@ With `ENCRYPTED`, the password string is expected to be in the format of `<encry
641640
*** `0` is the first version and refers to the `SHA-256` cryptographic hash function with iterations `1`.
642641
*** `1` is the second version and refers to the `SHA-256` cryptographic hash function with iterations `1024`.
643642
* If the optional `SET PASSWORD CHANGE [NOT] REQUIRED` is omitted, the default is `CHANGE REQUIRED`.
644-
The `SET PASSWORD` part is only optional if it directly follows the `SET PASSWORD` clause.
643+
* The `SET PASSWORD` prefix of the `CHANGE [NOT] REQUIRED` clause is only optional if it directly follows the `SET PASSWORD 'password'` clause and is not part of a `SET AUTH` clause.
645644
* The default for `SET STATUS` is `ACTIVE`.
646645
* `SET HOME DATABASE` can be used to configure a home database for a user.
647646
A home database will be resolved if it is either pointing to a database or a database alias.
648647
If no home database is set, the DBMS default database is used as the home database for the user.
649-
* The `SET PASSWORD CHANGE [NOT] REQUIRED`, `SET STATUS`, and `SET HOME DATABASE` clauses can be applied in any order.
650648
[role=label--new-5.24]
651649
* One or more `SET AUTH` clauses can be used to set xref:authentication-authorization/auth-providers.adoc[Auth Providers], which define authentication / authorization providers for the user. This might be used to configure external auth providers like LDAP or OIDC, but can also be used as an alternative way to set the native (password-based) auth settings like `SET PASSWORD` and `SET PASSWORD CHANGE REQUIRED`.
652650
Examples can be found below for `native`, xref:authentication-authorization/sso-integration.adoc#auth-sso-auth-providers[here] for OIDC and xref:authentication-authorization/ldap-integration.adoc#auth-ldap-auth-providers[here] for LDAP.
653651
* It is mandatory to specify at least either a `SET PASSWORD` or a `SET AUTH` clause because users must have at least one Auth Provider.
652+
* The `SET PASSWORD CHANGE [NOT] REQUIRED`, `SET STATUS`, `SET AUTH`, and `SET HOME DATABASE` clauses can be applied in any order.
654653

655654
[NOTE]
656655
====
@@ -713,7 +712,7 @@ SET AUTH 'native' {
713712

714713
[NOTE, role=label--enterprise-edition]
715714
====
716-
The `SET STATUS {ACTIVE | SUSPENDED}`, `SET HOME DATABASE` and `SET AUTH` parts of the commands are only available in Neo4j Enterprise Edition.
715+
The `SET STATUS {ACTIVE | SUSPENDED}`, `SET HOME DATABASE` parts of the commands are only available in Neo4j Enterprise Edition. The `{SET | REMOVE} AUTH` clause for external providers is only available in Neo4j Enterprise Edition. `{SET | REMOVE} AUTH 'native'` can be used in Neo4j Community Edition.
717716
====
718717

719718
The `CREATE USER` command is optionally idempotent, with the default behavior to throw an exception if the user already exists.
@@ -838,9 +837,6 @@ SET AUTH [PROVIDER] 'provider' "{"
838837
----
839838

840839
* At least one `SET` or `REMOVE` clause is required for the command.
841-
* `SET` and `REMOVE` clauses cannot be combined in the same command.
842-
* The `SET PASSWORD CHANGE [NOT] REQUIRED`, `SET STATUS`, and `SET HOME DATABASE` clauses can be applied in any order.
843-
The `SET PASSWORD` clause must come first, if used.
844840
* For `SET PASSWORD`:
845841
** The `password` can either be a string value or a string parameter.
846842
** All passwords are encrypted (hashed) when stored in the Neo4j `system` database.
@@ -854,8 +850,7 @@ With `ENCRYPTED`, the password string is expected to be in the format of `<encry
854850
*** `0` is the first version and refers to the `SHA-256` cryptographic hash function with iterations `1`.
855851
*** `1` is the second version and refers to the `SHA-256` cryptographic hash function with iterations `1024`.
856852
* If the optional `SET PASSWORD CHANGE [NOT] REQUIRED` is omitted, the default is `CHANGE REQUIRED`.
857-
The `SET PASSWORD` part is only optional if it directly follows the `SET PASSWORD` clause.
858-
* For `SET PASSWORD CHANGE [NOT] REQUIRED`, the `SET PASSWORD` is only optional if it directly follows the `SET PASSWORD` clause.
853+
* The `SET PASSWORD` prefix of the `CHANGE [NOT] REQUIRED` clause is only optional if it directly follows the `SET PASSWORD 'password'` clause and is not part of a `SET AUTH` clause.
859854
* `SET HOME DATABASE` can be used to configure a home database for a user.
860855
A home database will be resolved if it is either pointing to a database or a database alias.
861856
If no home database is set, the DBMS default database is used as the home database for the user.
@@ -870,6 +865,7 @@ This results in the DBMS default database being used as the home database for th
870865
[role=label--new-5.24]
871866
* `REMOVE AUTH` is used to remove one or many xref:authentication-authorization/auth-providers.adoc[Auth Provider(s)] from a user. It cannot be used in a way that would mean a user has no Auth Providers.
872867
* `REMOVE ALL AUTH` is used to remove all existing xref:authentication-authorization/auth-providers.adoc[Auth Providers] from a user. It must be used in conjunction with at least one `SET AUTH` clause in order to meet the requirement that a user always has at least one auth provider.
868+
* The `SET PASSWORD CHANGE [NOT] REQUIRED`, `SET STATUS`, `SET AUTH`, and `SET HOME DATABASE` clauses can be applied in any order.
873869

874870

875871
.Modify the user `bob` with a new password and active status, and remove the requirement to change his password:
@@ -934,7 +930,7 @@ For example, leaving out the `CHANGE [NOT] REQUIRED` part of the query will leav
934930

935931
[NOTE, role=label--enterprise-edition]
936932
====
937-
The `SET STATUS {ACTIVE | SUSPENDED}`, `SET HOME DATABASE`, `REMOVE HOME DATABASE`, `SET AUTH` and `REMOVE AUTH` parts of the command are only available in Neo4j Enterprise Edition.
933+
The `SET STATUS {ACTIVE | SUSPENDED}`, `SET HOME DATABASE`, `REMOVE HOME DATABASE` parts of the command are only available in Neo4j Enterprise Edition. The `{SET | REMOVE} AUTH` clause for external providers is only available in Neo4j Enterprise Edition. `{SET | REMOVE} AUTH 'native'` can be used in Neo4j Community Edition.
938934
====
939935

940936
The changes to the user will appear on the list provided by `SHOW USERS`:

modules/ROOT/pages/tutorial/tutorial-sso-configuration.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ dbms.security.oidc.azure.claims.groups=roles
329329
[role=label--new-5.24]
330330
. (Optional). If you want to mandate that users exist in the database in order to authenticate and authorize, you can use xref:authentication-authorization/auth-providers.adoc[Auth Providers] to achieve this.
331331
Set the `dbms.security.require_local_user` configuration setting to `true` in the _neo4j.conf_ file to enable this mode.
332-
For example to create a user `jake` who can authenticate and authorize using Entra, you can use the following Cypher query:
332+
For example to create a user `jake` who can authenticate and authorize using Azure, you can use the following Cypher query:
333333
[source, cypher, role=noplay]
334334
----
335335
CREATE USER jake
@@ -418,7 +418,7 @@ GRANT ROLE reader TO jake
418418

419419
The user will implicitly receive `native` authorization because `native` is in the list of authorization providers and you have explicitly granted the user a role.
420420

421-
Once you have set up your users in this way, you can now disable native authentication for the database completely:
421+
Once you have set up your users in this way, you can disable native authentication for the database completely (this will prevent all users, including the admin, from logging in with a username and password):
422422

423423
[source, properties]
424424
----

0 commit comments

Comments
 (0)