Skip to content

Commit a2e27f3

Browse files
phil198renetapopova
authored andcommitted
document and link to the require_local_user setting
1 parent 4b33ada commit a2e27f3

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

modules/ROOT/pages/authentication-authorization/auth-providers.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Authentication and authorization can be controlled on a user-level using Cypher by setting Auth Providers on users.
88

9-
In order to make use of Auth Providers, you need to set the `dbms.security.require_local_user` configuration setting to `true`.
9+
In order to make use of Auth Providers, you need to set the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting to `true`.
1010
This setting mandates that only users with a corresponding Auth Provider in the database can authenticate and authorize.
1111

1212
Auth Providers give you a way to link externally-defined users (e.g. in a 3rd party ID provider like OIDC or LDAP) to the Neo4j internal User model.
@@ -32,7 +32,7 @@ The way that the matching lookup is done depends on the type of provider. For ex
3232
- For the `native` (username/password) provider, the supplied username itself is used to look up the Auth Provider.
3333

3434
== Enabling User Auth Providers mode
35-
When the configuration setting `dbms.security.require_local_user` is set to `true`, the lookups described above will be performed when the user authenticates, and a matching user Auth Provider *must* exist in order for a user to be able to successfully authenticate and authorize.
35+
When the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting is set to `true`, the lookups described above will be performed when the user authenticates, and a matching user Auth Provider *must* exist in order for a user to be able to successfully authenticate and authorize.
3636

3737
== Examples
3838
For examples of how to use Auth Providers with different authentication providers, see the following sections:

modules/ROOT/pages/authentication-authorization/ldap-integration.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,11 @@ SET AUTH PROVIDER 'ldap' { SET ID 'cn=alice,ou=engineering,dc=example,dc=com' }
379379
----
380380
This will create a user who can authenticate and authorize using LDAP provided their LDAP `dn` is `cn=alice,ou=engineering,dc=example,dc=com`.
381381
382-
When the `dbms.security.require_local_user` configuration setting is set to `true`, users can *only* authenticate when there is a user in the database with an Auth Provider which links to the provider that the user is trying to authenticate with.
382+
When the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting is set to `true`, users can *only* authenticate when there is a user in the database with an Auth Provider which links to the provider that the user is trying to authenticate with.
383383
384384
If there is no matching Auth Provider, the user will not be able to authenticate or authorize. This applies to all providers.
385385
386-
Conversely, when `dbms.security.require_local_user` is set to `false`, users' Auth Providers will have no bearing on the way that they are authenticated and authorized, instead authentication and authorization will be controlled centrally (for all users) by the database configuration.
386+
Conversely, when xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] is set to `false`, users' Auth Providers will have no bearing on the way that they are authenticated and authorized, instead authentication and authorization will be controlled centrally (for all users) by the database configuration.
387387
======
388388

389389

modules/ROOT/pages/authentication-authorization/sso-integration.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ xref:authentication-authorization/auth-providers.adoc[Auth Providers] can be use
261261

262262
[NOTE]
263263
====
264-
You need to set the `dbms.security.require_local_user` configuration setting to `true` to use Auth Providers. This means that a user with a matching Auth Provider *must* exist in order to be able to authenticate and authorize.
264+
You need to set the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting to `true` to use Auth Providers. This means that a user with a matching Auth Provider *must* exist in order to be able to authenticate and authorize.
265265
====
266266

267267
The following examples show how you can use Cypher to do this.
@@ -276,11 +276,11 @@ SET AUTH 'oidc-mysso' {SET ID 'jakesUniqueMySsoId'} // the id must match the cla
276276
This will create a user who can authenticate and authorize using `mysso` if they present a valid token with a `sub` claim of `jakesUniqueMySsoId`.
277277
The claim used for authentication is determined by the xref:configuration/configuration-settings.adoc#config_dbms.security.oidc.-provider-.claims.username[`dbms.security.oidc.mysso.claims.username`] config setting (default the default is the `sub` claim).
278278
279-
When the `dbms.security.require_local_user` configuration setting is set to `true`, users can *only* authenticate when there is a user in the database with an Auth Provider which links to the provider that the user is trying to authenticate with.
279+
When the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting is set to `true`, users can *only* authenticate when there is a user in the database with an Auth Provider which links to the provider that the user is trying to authenticate with.
280280
281281
If there is no matching Auth Provider, the user will not be able to authenticate or authorize. This applies to all providers.
282282
283-
Conversely, when `dbms.security.require_local_user` is set to `false`, users' Auth Providers will have no bearing on the way that they are authenticated and authorized, instead authentication and authorization will be controlled centrally (for all users) by the database configuration.
283+
Conversely, when xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] is set to `false`, users' Auth Providers will have no bearing on the way that they are authenticated and authorized, instead authentication and authorization will be controlled centrally (for all users) by the database configuration.
284284
======
285285

286286

modules/ROOT/pages/configuration/configuration-settings.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4615,6 +4615,21 @@ m|++++++
46154615
|===
46164616

46174617

4618+
[[config_dbms.security.require_local_user]]
4619+
=== `dbms.security.require_local_user`
4620+
4621+
.dbms.security.require_local_user
4622+
[frame="topbot", stripes=odd, grid="cols", cols="<1s,<4"]
4623+
|===
4624+
|Description
4625+
a|When set to `true`, users can *only* authenticate when there is a user in the database with an xref:authentication-authorization/auth-providers.adoc[Auth Provider] which links to the provider that the user is trying to authenticate with. If there is no matching xref:authentication-authorization/auth-providers.adoc[Auth Provider], the user will not be able to authenticate or authorize. This applies to all providers. Conversely, when set to `false`, users' xref:authentication-authorization/auth-providers.adoc[Auth Providers] will have no bearing on the way that they are authenticated and authorized, instead authentication and authorization will be controlled centrally (for all users) by the database configuration.
4626+
|Valid values
4627+
a|A boolean.
4628+
|Default value
4629+
m|+++true+++
4630+
|===
4631+
4632+
46184633
[[config_dbms.netty.ssl.provider]]
46194634
=== `dbms.netty.ssl.provider`
46204635

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SSO works in the following way:
2424
. The identity provider responds with a JSON Web Token (JWT), a JSON file containing fields (claims) relative to the user (email, audience, groups, etc.).
2525
. The client provides the server with the JWT, and the server verifies its signature with the JWKs.
2626
[role=label--new-5.24]
27-
. By setting the `dbms.security.require_local_user` configuration setting to `true`, you can control which users can authenticate and authorize by creating xref:authentication-authorization/auth-providers.adoc[Auth Providers] in the database using Cypher.
27+
. By setting the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting to `true`, you can control which users can authenticate and authorize by creating xref:authentication-authorization/auth-providers.adoc[Auth Providers] in the database using Cypher.
2828
In this mode, a user with a matching Auth Provider must exist in the database for the user to be able to authenticate and authorize using an SSO (or any external) provider.
2929
This allows you to do the following in the database, using Cypher:
3030
.. `SUSPEND` SSO users.
@@ -136,7 +136,7 @@ image::sso-configuration-tutorials/okta-sign-on-tab.svg[title="Okta's sign-on ta
136136
+
137137
[role=label--new-5.24]
138138
. (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.
139-
Set the `dbms.security.require_local_user` configuration setting to `true` in the _neo4j.conf_ file to enable this mode.
139+
Set the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting to `true` in the _neo4j.conf_ file to enable this mode.
140140
For example to create a user `jake` who can authenticate using native or Okta, and authorize using Okta (as configured in step 3), you can use the following Cypher query:
141141
[source, cypher, role=noplay]
142142
----
@@ -328,7 +328,7 @@ dbms.security.oidc.azure.claims.groups=roles
328328

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.
331-
Set the `dbms.security.require_local_user` configuration setting to `true` in the _neo4j.conf_ file to enable this mode.
331+
Set the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting to `true` in the _neo4j.conf_ file to enable this mode.
332332
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
----
@@ -391,7 +391,7 @@ An admin user with the name `neo4j` is created by default when the database is x
391391
dbms.security.authentication_providers=oidc-google, native
392392
----
393393

394-
.. Set the `dbms.security.require_local_user` configuration setting to `true` in the _neo4j.conf_ file.
394+
.. Set the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting to `true` in the _neo4j.conf_ file.
395395
This will switch to __User Auth Providers__ mode whereby users can only authenticate and authorize if they have a corresponding Auth Provider in the database.
396396

397397
[source, properties]

0 commit comments

Comments
 (0)