Skip to content

Commit 6f266a2

Browse files
phil198renetapopova
authored andcommitted
pr review comments
1 parent 340488f commit 6f266a2

File tree

1 file changed

+90
-36
lines changed

1 file changed

+90
-36
lines changed

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

Lines changed: 90 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ Available users can be seen using `SHOW USERS`, which will produce a table conta
506506

507507
This is not necessarily the set of roles that a user will receive in practice. The latter depends on DMBS configuration as well as the user's xref:authentication-authorization/auth-providers.adoc[Auth Providers].
508508

509-
Examples of where a user would receive a different set of roles from that which appears in this column would include cases where they use external (e.g. LDAP or OIDC) auth, or where they do not have the `native` xref:authentication-authorization/auth-providers.adoc[Auth Provider].
509+
Examples of where a user would receive a different set of roles from that which appears in this column would include where they use external (e.g. LDAP or OIDC) auth, or where `native` is not listed in the xref:configuration/configuration-settings.adoc#config_dbms.security.authorization_providers[`dbms.security.authorization_providers`] configuration setting.
510510

511511
Will return `null` in community edition.
512512
| LIST OF STRING
@@ -538,7 +538,14 @@ Will return `null` in community edition.
538538
| {check-mark}
539539
|===
540540

541+
[NOTE]
542+
====
543+
When first starting a Neo4j DBMS, there is always a single default user `neo4j` with administrative privileges.
544+
It is possible to set the initial password using xref:configuration/set-initial-password.adoc[`neo4j-admin dbms set-initial-password <password>`], otherwise it is necessary to change the password after the first login.
545+
====
541546

547+
.Show users
548+
======
542549
[source, cypher, role=noplay]
543550
----
544551
SHOW USERS
@@ -565,6 +572,61 @@ SHOW USERS
565572
|<null>
566573
5+a|Rows: 2
567574
|===
575+
======
576+
577+
.Show user with column reorder and filtering
578+
======
579+
This example shows how to:
580+
581+
* Reorder the columns using a `YIELD` clause.
582+
* Filter the results using a `WHERE` clause.
583+
584+
[source, cypher, role=noplay]
585+
----
586+
SHOW USER YIELD user, suspended, passwordChangeRequired, roles, home
587+
WHERE user = 'jake'
588+
----
589+
590+
.Result
591+
[role="queryresult" options="header,footer", width="100%", cols="2m,3m,3m,2m,2m"]
592+
|===
593+
|user
594+
|suspended
595+
|passwordChangeRequired
596+
|roles
597+
|home
598+
|"jake"
599+
|false
600+
|false
601+
|["PUBLIC"]
602+
|<null>
603+
5+a|Rows: 1
604+
|===
605+
606+
======
607+
608+
.Show user with return clause
609+
======
610+
It is possible to add a `RETURN` clause to further manipulate the results after filtering.
611+
In this example, the `RETURN` clause is used to filter out the `roles` column and rename the `user` column to `adminUser`.
612+
613+
[source,cypher,role=noplay]
614+
----
615+
SHOW USERS YIELD roles, user
616+
WHERE 'admin' IN roles
617+
RETURN user AS adminUser
618+
----
619+
.Result
620+
[role="queryresult" options="header,footer", width="100%", cols="2m"]
621+
|===
622+
|adminUser
623+
|"neo4j"
624+
1+a|Rows: 1
625+
|===
626+
======
627+
628+
[[access-control-list-user-auth-providers]]
629+
=== Listing User Auth Providers
568630

569631
To inspect users' xref:authentication-authorization/auth-providers.adoc[Auth Providers], use `SHOW USERS WITH AUTH`. This command will produce a row per user per Auth Provider and will yield the following two columns in addition to those output by `SHOW USERS`:
570632

@@ -590,7 +652,8 @@ To inspect users' xref:authentication-authorization/auth-providers.adoc[Auth Pro
590652
| {check-mark}
591653
|===
592654

593-
655+
.Show users with auth
656+
======
594657
[source, cypher, role=noplay]
595658
----
596659
SHOW USERS WITH AUTH
@@ -635,50 +698,41 @@ SHOW USERS WITH AUTH
635698
|{
636699
"id": "jacksIdForOidc1"
637700
}
638-
7+a|Rows: 1
701+
7+a|Rows: 3
639702
|===
640-
641-
[NOTE]
642-
====
643-
When first starting a Neo4j DBMS, there is always a single default user `neo4j` with administrative privileges.
644-
It is possible to set the initial password using xref:configuration/set-initial-password.adoc[`neo4j-admin dbms set-initial-password <password>`], otherwise it is necessary to change the password after the first login.
645-
====
646-
647-
.Show user
648-
======
649-
This example shows how to:
650-
651-
* Reorder the columns using a `YIELD` clause.
652-
* Filter the results using a `WHERE` clause.
653-
654-
[source, cypher, role=noplay]
655-
----
656-
SHOW USER YIELD user, suspended, passwordChangeRequired, roles, home
657-
WHERE user = 'jake'
658-
----
659703
======
660704

661-
.Show user
662-
======
663-
It is possible to add a `RETURN` clause to further manipulate the results after filtering.
664-
In this example, the `RETURN` clause is used to filter out the `roles` column and rename the `user` column to `adminUser`.
665-
666-
[source,cypher,role=noplay]
667-
----
668-
SHOW USERS YIELD roles, user
669-
WHERE 'admin' IN roles
670-
RETURN user AS adminUser
671-
----
672-
======
673-
674-
.Show user with auth
705+
.Show user with auth using filtering
675706
======
676707
Show all of the users with the `oidc` Auth Provider.
677708
[source,cypher,role=noplay]
678709
----
679710
SHOW USERS WITH AUTH
680711
WHERE provider = 'oidc1'
681712
----
713+
714+
.Result
715+
[role="queryresult" options="header,footer", width="100%", cols="2m,3m,3m,2m,2m,3m,4m"]
716+
|===
717+
|user
718+
|roles
719+
|passwordChangeRequired
720+
|suspended
721+
|home
722+
|provider
723+
|auth
724+
|"jack"
725+
|["PUBLIC"]
726+
|false
727+
|false
728+
|<null>
729+
|"oidc1"
730+
|{
731+
"id": "jacksIdForOidc1"
732+
}
733+
7+a|Rows: 1
734+
|===
735+
682736
======
683737

684738
[NOTE]

0 commit comments

Comments
 (0)