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/authentication-authorization/manage-users.adoc
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -309,7 +309,6 @@ SET AUTH [PROVIDER] 'provider' "{"
309
309
a|
310
310
Modifies the settings for an existing user.
311
311
At least one `SET` or `REMOVE` clause is required.
312
-
`SET` and `REMOVE` clauses cannot be combined in the same command.
313
312
314
313
For more information, see xref:authentication-authorization/manage-users.adoc#access-control-alter-users[Modifying users].
315
314
@@ -641,16 +640,16 @@ With `ENCRYPTED`, the password string is expected to be in the format of `<encry
641
640
*** `0` is the first version and refers to the `SHA-256` cryptographic hash function with iterations `1`.
642
641
*** `1` is the second version and refers to the `SHA-256` cryptographic hash function with iterations `1024`.
643
642
* 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.
645
644
* The default for `SET STATUS` is `ACTIVE`.
646
645
* `SET HOME DATABASE` can be used to configure a home database for a user.
647
646
A home database will be resolved if it is either pointing to a database or a database alias.
648
647
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.
650
648
[role=label--new-5.24]
651
649
* 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`.
652
650
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.
653
651
* 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.
654
653
655
654
[NOTE]
656
655
====
@@ -713,7 +712,7 @@ SET AUTH 'native' {
713
712
714
713
[NOTE, role=label--enterprise-edition]
715
714
====
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.
717
716
====
718
717
719
718
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' "{"
838
837
----
839
838
840
839
* 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.
844
840
* For `SET PASSWORD`:
845
841
** The `password` can either be a string value or a string parameter.
846
842
** 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
854
850
*** `0` is the first version and refers to the `SHA-256` cryptographic hash function with iterations `1`.
855
851
*** `1` is the second version and refers to the `SHA-256` cryptographic hash function with iterations `1024`.
856
852
* 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.
859
854
* `SET HOME DATABASE` can be used to configure a home database for a user.
860
855
A home database will be resolved if it is either pointing to a database or a database alias.
861
856
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
870
865
[role=label--new-5.24]
871
866
* `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.
872
867
* `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.
873
869
874
870
875
871
.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
934
930
935
931
[NOTE, role=label--enterprise-edition]
936
932
====
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.
938
934
====
939
935
940
936
The changes to the user will appear on the list provided by `SHOW USERS`:
. (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.
331
331
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:
333
333
[source, cypher, role=noplay]
334
334
----
335
335
CREATE USER jake
@@ -418,7 +418,7 @@ GRANT ROLE reader TO jake
418
418
419
419
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.
420
420
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):
0 commit comments