Skip to content

Commit b9b6cfb

Browse files
committed
Update Okta examples
1 parent aac4980 commit b9b6cfb

File tree

2 files changed

+55
-34
lines changed

2 files changed

+55
-34
lines changed

modules/ROOT/pages/tutorial/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ The following step-by-step tutorials cover common operational tasks or otherwise
1010
* xref:tutorial/neo4j-admin-import.adoc[Neo4j Admin import] -- This tutorial provides detailed examples to illustrate the capabilities of importing data from CSV files with the command `neo4j-admin database import`.
1111
* xref:tutorial/tutorial-composite-database.adoc[Set up and use a Composite database] -- This tutorial walks through the basics of setting up and using Composite databases.
1212
* xref:tutorial/access-control.adoc[Fine-grained access control] -- This tutorial presents an example that illustrates various aspects of security and fine-grained access control.
13-
* xref:tutorial/tutorial-sso-configuration.adoc[Configuring Neo4j Single Sign-On (SSO)] -- This tutorial presents examples and solutions to common problems when configuring SSO.
13+
* xref:tutorial/tutorial-sso-configuration.adoc[Configuring Neo4j Single Sign-On (SSO)] -- Examples and solutions to common problems when configuring SSO.
1414
* xref:tutorial/tutorial-clustering-docker.adoc[Deploy a Neo4j cluster in a Docker container] -- This tutorial walks through setting up a Neo4j cluster on your local computer for testing purposes.

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

Lines changed: 54 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -47,32 +47,48 @@ Thus, changing the username claim from `sub` is not recommended.
4747

4848
== Okta
4949

50+
The following examples show how to configure Okta for authentication and authorization using access tokens and ID tokens.
51+
For more information, see the https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/[Okta official documentation].
52+
5053
=== Access token
5154

5255
This example shows how to configure Okta for authentication and authorization using access tokens.
5356

54-
. Configure the client with the appropriate redirect URI.
55-
You can skip the group assignments in this step:
56-
+
57-
image::sso-configuration-tutorials/oidc-okta-client-creation.png[title="Okta OIDC client creation"]
58-
+
59-
image::sso-configuration-tutorials/oidc-okta-client-config-a.png[title="Okta OIDC client configuration"]
57+
==== Configure the client
6058

61-
. Take note of the Client ID and the Okta domain.
62-
You will need them later when configuring the Okta parameters and the Well-known OpenID Connect endpoint in the _neo4j.conf_ file:
63-
+
64-
image::sso-configuration-tutorials/oidc-okta-client-config-b.png[title="Okta OIDC client configuration"]
59+
. From the right-hand side of the Okta dashboard, navigate to *Applications* and click *Create App Integration*.
60+
. Select *OIDC - OpenID Connect* for Sign-in method and *Single-Page Application* for Application type.
61+
. Click *Next*.
62+
. Configure the client with the appropriate redirect URI.
63+
.. Add a name for the app integration.
64+
.. Add the *Sign-in redirect URIs*, for example, `http://localhost:7474/browser/?idp_id=okta&auth_flow_step=redirect_uri`.
65+
This URI will accept returned token responses after successful authentication.
66+
. Add the *Sign-out redirect URIs*, for example, `http://localhost:7474/browser/`.
67+
. In the *Assignments* section, select *Skip group assignment* for now.
68+
. Click *Save*.
69+
. Take note of the Client ID.
70+
You will need it later when configuring the Okta parameters and the Well-known OpenID Connect endpoint in the _neo4j.conf_ file:
71+
72+
==== Assign Okta groups to the application
73+
74+
. From the right-hand side of the Okta dashboard, navigate to *Dashboard -> Directory -> Groups*, and click *Add Group*.
75+
. Add a name for the group, for example, `engineers`, and click *Save*.
76+
. Click the group you just created and then click *Assign people*.
77+
. Add users to the group.
78+
Users can be added to a group either on user creation or by editing the group.
79+
. Assign the group to an application.
80+
.. Click *Applications* and then *Assign Applications*.
81+
.. Select the application you created earlier and click *Assign*.
82+
83+
==== Configure the default authorization server
84+
85+
. From the right-hand side of the Okta dashboard, navigate to *Security -> API*.
86+
. Click the default authorization server (the one that shows `api://default` as audience) to return the `groups` claim in access tokens:
87+
.. On the *Claims* tab, click *Add Claim*.
88+
.. Add a claim with the name `groups` and the value `Groups`, and click *Create*.
6589

66-
. Create groups in Okta, assign users to them (the user can be added to a group either on user creation or editing the group), and map them in the `neo4j.conf` to native groups:
67-
+
68-
image::sso-configuration-tutorials/oidc-okta-server-groups.png[title="Okta OIDC server groups"]
90+
==== Configure Neo4j
6991

70-
. Configure the default authorization server (the one that shows `api://default` as audience) to return the `groups` claim in access tokens:
71-
+
72-
image::sso-configuration-tutorials/oidc-okta-authz-server.png[title="Okta OIDC authorization server"]
73-
+
74-
image::sso-configuration-tutorials/oidc-okta-server-claims.png[title="Okta OIDC server claims"]
75-
+
7692
. Configure Neo4j to use Okta authentication by configuring the following settings in the _neo4j.conf_ file:
7793
+
7894
[source, properties]
@@ -103,8 +119,14 @@ image::sso-configuration-tutorials/oidc-okta-successful-login.png[title="Okta OI
103119

104120
This example shows how to configure Okta for authentication and authorization using ID tokens.
105121

106-
. Follow the first two steps from the instructions for xref:#_access_token[Access token].
107-
122+
. Follow the same steps as for the access token configuration to configure the client and assign Okta groups to the application.
123+
. Configure the default authorization server (the one that shows `api://default` as audience) to return the `groups` claim in ID tokens:
124+
.. On the *Claims* tab, click *Add Claim*.
125+
.. Add a claim with the name `groups`.
126+
.. From the *Include in token type* dropdown, select *ID Token*.
127+
.. From the *Value type* dropdown, select *Groups*.
128+
.. From the Filter dropdown, select *Matches regex* and the value `.*`.
129+
.. Click *Create*.
108130
. Create the claims as indicated:
109131
+
110132
image::sso-configuration-tutorials/okta-claims.svg[title="Okta claim creation panel"]
@@ -115,7 +137,7 @@ In the case of access tokens, a default sub is already provided automatically.
115137
However, for ID tokens, the name you give to your claim needs to be also indicated in the configuration `dbms.security.oidc.okta.claims.username=userid`.
116138
====
117139
+
118-
. Configure the default authorization server (the one that shows api://default as audience) as indicated:
140+
. Configure the default authorization server (the one that shows _api://default as audience_) as indicated:
119141
+
120142
[source, properties]
121143
----
@@ -156,6 +178,16 @@ See xref:authentication-authorization/sso-integration.adoc#auth-sso-auth-provide
156178

157179
== Microsoft Entra ID (formerly Azure Active Directory)
158180

181+
=== Register the application
182+
183+
. Log in to the https://portal.azure.com/#home[Azure portal].
184+
. Navigate to *Microsoft Entra ID > Overview*.
185+
. From the *Add* dropdown menu, select *App registration* and fill in the following information to create your SSO application:
186+
+
187+
image::sso-configuration-tutorials/oidc-azure-client-creation.png[title="Entra OIDC client creation"]
188+
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.
189+
. Click *Register*.
190+
159191
=== Access token
160192

161193
This example shows how to configure Entra ID for authentication and authorization using an access token.
@@ -211,17 +243,6 @@ The audience parameter for access tokens is typically set with `api://` at the f
211243

212244
This example shows how to configure Entra ID for authentication and authorization using ID tokens.
213245

214-
==== Register the application
215-
216-
. Log in to the https://portal.azure.com/#home[Azure portal].
217-
. Navigate to *Microsoft Entra ID > Overview*.
218-
. From the *Add* dropdown menu, select *App registration* and fill in the following information to create your SSO application:
219-
+
220-
image::sso-configuration-tutorials/oidc-azure-client-creation.png[title="Entra OIDC client creation"]
221-
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.
222-
. Click *Register*.
223-
224-
225246
==== Configure Neo4j
226247
. 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.
227248
+

0 commit comments

Comments
 (0)