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/tutorial/tutorial-sso-configuration.adoc
+67-66Lines changed: 67 additions & 66 deletions
Original file line number
Diff line number
Diff line change
@@ -192,90 +192,90 @@ See xref:authentication-authorization/sso-integration.adoc#auth-sso-auth-provide
192
192
193
193
== Microsoft Entra ID (formerly Azure Active Directory)
194
194
195
+
The following examples show how to configure Microsoft Entra ID for authentication and authorization using access tokens and ID tokens.
196
+
197
+
=== Register the application
198
+
199
+
. Log in to the https://portal.azure.com/#home[Azure portal].
200
+
. Click *Microsoft Entra ID* and navigate to *Manage -> App registrations*.
201
+
. Click *New registration*.
202
+
. Type a name for your application, for example, `Neo4j SSO`.
203
+
. Under *Select the supported account types*, select `Accounts in this organizational directory only (Default Directory only - Single tenant)`.
204
+
. Under *Redirect URI*, select `Single-page application (SPA)` and enter the redirect URI: `http://localhost:7474/browser/?idp_id=azure&auth_flow_step=redirect_uri`
205
+
The redirect URI will accept the returned token responses after successful authentication.
206
+
. Click *Register*.
207
+
195
208
=== Access token
196
209
197
-
This example shows how to configure Entra ID for authentication and authorization using an access token.
210
+
This example shows how to configure Neo4j to use an Entra ID access token for authentication and authorization.
211
+
212
+
==== Configure Entra ID
198
213
199
-
. After the successful creation of your SSO application in Azure, open the *Token configuration* tab to configure a token.
214
+
. From the *App registrations* page, select the app you just created.
215
+
. From the left-hand side menu, navigate to *Manage -> Token configuration*.
200
216
.. Click *Add groups claim*.
201
-
.. Select *Security groups* to include in your access token.
217
+
.. Select *Groups assigned to the application (recommended for large enterprise companies to avoid exceeding the limit on the number of groups a token can emit)* to include in your access token.
202
218
.. Save your changes.
203
219
204
-
. Open the **Expose an API** tab and select **Add a Scope**.
205
-
.. If you click the **Add a Scope** button for the first time, you see a new pane stating that you need to add an _Application ID URI_ before proceeding.
220
+
. Navigate to *Expose an API* and click **Add a Scope**.
206
221
+
222
+
[NOTE]
223
+
====
224
+
The first time you click the *Add a Scope* button, you see a new pane stating that you need to add an _Application ID URI_ before proceeding.
207
225
You can find it on your app *Overview* page.
208
-
+
209
-
.The GUID is used to identify specific resources or instances within Azure. You can find it on the app registration page.
210
-
image::sso-configuration-tutorials/azure-id.svg[]
211
-
+
212
-
.. Click *Save and continue* after setting the _Application ID URI_.
226
+
It is a GUID that looks like this: `api://<GUID>`.
227
+
The GUID is a unique identifier for your application.
228
+
====
213
229
230
+
. Click *Save and continue* after setting the _Application ID URI_.
214
231
. Fill in all mandatory fields in the pane **Add a scope**.
215
-
.. Enter a new *Scope name*, *Admin consent display name*, and *Admin consent description*.
232
+
.. Enter a new *Scope name* (e.g., `access-token`), *Admin consent display name*, and *Admin consent description*.
216
233
.. Make sure the *Enabled* scope state is selected.
217
234
.. Select the *Add scope* button again to create a new scope.
218
235
You can add all scopes supported by your API.
219
-
+
220
-
Once the scopes are created, make a note of them for use later.
236
+
Make a note of them for later.
237
+
238
+
==== Configure Neo4j
239
+
240
+
You can configure Neo4j to use Entra ID for authentication by configuring the following settings in the _neo4j.conf_ file:
221
241
222
-
. Configure Neo4j to use Entra ID for authentication by configuring the following settings in the _neo4j.conf_ file:
The redirect URI `http://localhost:7474/browser/?idp_id=azure&auth_flow_step=redirect_uri` is the URI that will accept returned token responses after successful authentication.
258
-
. Click *Register*.
257
+
This example shows how to configure Neo4j to use an Entra ID ID token for authentication and authorization.
259
258
260
259
==== Configure Neo4j
261
-
. After the successful app creation, on the app's *Overview* page, find the Application (client) ID value. Use it to configure the following properties in the _neo4j.conf_ file.
260
+
261
+
. From the *App registrations* page, select the app you created in <<#_register_the_application,Register the application>>.
262
+
. On the application *Overview* page, copy the Application (client) ID value and use it to configure the following properties in the _neo4j.conf_ file:
Decide whether you want to use Entra groups directly or Entra App Roles.
305
305
306
-
Using Entra groups directly might be convenient if you already have users assigned to those groups and want to perform Group-to-Role mapping in Neo4j settings.
306
+
Using Entra groups directly might be convenient if you already have users assigned to those groups and want to perform Group-to-Role mapping in the _neo4j.conf_ file.
307
307
308
308
Entra App Roles allow a layer of separation between Neo4j roles and groups.
309
309
When App Roles are used, only the roles relevant to Neo4j are sent in the JWT token.
@@ -314,27 +314,25 @@ Details about Entra ID App Roles can be found in the https://learn.microsoft.com
314
314
315
315
==== Using Entra groups directly
316
316
317
-
. Configure the server to return the Group Object IDs in the JWT identity tokens.
318
-
To do this, set `groupMembershipClaims` to `SecurityGroup` in the Manifest of the registered application:
319
-
+
320
-
image::sso-configuration-tutorials/oidc-azure-server-claims.png[title="Entra OIDC server claims"]
321
-
322
-
. Create groups in the Entra AD console and assign users to them.
323
-
Take note of the Object Id column.
324
-
In the next step, you must map these to user roles in the Neo4j settings.
317
+
. From the *App registrations* page, select your application.
318
+
. From the left-hand side menu, navigate to *Manage -> Manifest*.
319
+
. Verify that the server is configured to return the Group Object IDs in the JWT identity tokens:
325
320
+
326
-
image::sso-configuration-tutorials/oidc-azure-server-groups.png[title="Entra OIDC server groups"]
327
-
328
-
. Configure a mapping from Entra Group Object IDs to Neo4j roles.
. Configure Neo4j to use the `roles` field from the JWT token.
361
364
+
362
365
[source, properties]
363
-
364
366
----
365
367
dbms.security.oidc.azure.claims.groups=roles
366
368
----
367
-
368
369
. (Optional) If you want control the authentication and authorization on a user level, configure xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] to `true` in the _neo4j.conf_ file.
369
370
This setting mandates that users with the relevant auth provider attached to them must exist in the database before they can authenticate and authorize with that auth provider.
370
371
For information on how to create users in this mode, see xref:authentication-authorization/manage-users.adoc#access-control-create-users[Creating users].
0 commit comments