website/src/app/kb/directory-sync/okta/readme.mdx
import Alert from "@/components/DocsAlert"; import PlanBadge from "@/components/PlanBadge"; import SupportOptions from "@/components/SupportOptions"; import Image from "next/image"; import Link from "next/link";
<PlanBadge plans={["enterprise"]}>
On Enterprise plans, Firezone can automatically synchronize users and groups from your Okta tenant. This eliminates the need to manually create and manage users in Firezone. You can add multiple Okta directories to sync from different Okta organizations.
Users and groups assigned to your Okta authentication app will be automatically synced to Firezone.
To enable directory sync, you'll create an API service app in Okta that allows Firezone to connect to the Okta APIs with read-only access to users, groups, and applications.
<Alert color="info"> **Prerequisite:** Before proceeding, you must have completed [Okta authentication setup](/kb/authenticate/okta). Directory sync requires an existing Okta authentication provider to function. </Alert>To ensure Firezone has only the minimum required permissions, you'll create a custom role in Okta with read-only access to users, groups, and a specific set of applications.
First, create a Resource Set that defines which Okta resources the Firezone API service app can access.
In your Okta admin portal, go to Security → Administrators, select the Resources tab and click Create new resource set.
<Link href="/images/kb/directory-sync/okta/resources-tab.png" target="_blank"> <Image src="/images/kb/directory-sync/okta/resources-tab.png" alt="Okta Resource Set" width={1200} height={1200} /> </Link>Configure the Resource Set as follows:
Firezone ResourcesResources for Firezone Directory SyncFirezone OIDC appAll UsersAll GroupsClick Create.
<Link href="/images/kb/directory-sync/okta/resource-set-configuration.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/resource-set-configuration.png" alt="Okta Resource Set Configuration" width={1200} height={1200} /> </Link>Now create a custom role that will be assigned to the Firezone API service app.
In the Administrators page, select the Roles tab and click Create new role.
Configure the role as follows:
Firezone Sync Read OnlyRead-only access for Firezone directory syncUnder Permissions, add the following:
Click Save role.
<Link href="/images/kb/directory-sync/okta/create-new-role.png" target="_blank"> <Image src="/images/kb/directory-sync/okta/create-new-role.png" alt="Okta create new role" width={1200} height={1200} /> </Link>In a new browser tab, open your Firezone admin portal, and go to Settings → Directory Sync.
Click the Add Directory button and choose Okta.
You should now see a setup form. Click the Generate Keypair button to create a public/private key pair that will be used for authentication during directory sync.
Keep this page open as you'll need the public key and other values in the next step.
In your Okta admin portal, go to Applications → Applications and click Create App Integration.
<Link href="/images/kb/directory-sync/okta/create-app-integration.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/create-app-integration.png" alt="Okta create app integration" width={1200} height={1200} /> </Link>In the modal that appears, select API Services and click Next.
<Link href="/images/kb/directory-sync/okta/create-app-integration-modal.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/create-app-integration-modal.png" alt="Okta create new role" width={1200} height={1200} /> </Link>Give the app a descriptive name such as Firezone Directory Sync.
Click Save to create the application.
<Link href="/images/kb/directory-sync/okta/new-app-integration-name.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/new-app-integration-name.png" alt="Okta name new app integration" width={1200} height={1200} /> </Link>Once the app is created, you'll need to configure its authentication method.
On the General tab, click Edit in the Client Credentials section.
<Link href="/images/kb/directory-sync/okta/new-app-integration-general-tab.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/new-app-integration-general-tab.png" alt="Okta app integration general tab" width={1200} height={1200} /> </Link>Select Public key / Private key for the Client authentication method.
Under the PUBLIC KEYS section, click Add key.
<Link href="/images/kb/directory-sync/okta/new-app-integration-general-edit.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/new-app-integration-general-edit.png" alt="Okta app integration general tab edit" width={1200} height={1200} /> </Link>In the modal that appears, paste the public key from your Firezone setup form and click Done.
<Link href="/images/kb/directory-sync/okta/add-public-key-modal.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/add-public-key-modal.png" alt="Okta add public key" width={1200} height={1200} /> </Link>Click Save to save your changes.
<Link href="/images/kb/directory-sync/okta/new-app-integration-with-pub-key.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/new-app-integration-with-pub-key.png" alt="Okta new app integration save" width={1200} height={1200} /> </Link>In the General Settings section, ensure Require Demonstrating Proof of Possession (DPoP) header in token requests is checked.
<Link href="/images/kb/directory-sync/okta/new-app-integration-dpop.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/new-app-integration-dpop.png" alt="Okta new app general settings DPoP" width={1200} height={1200} /> </Link>Navigate to the Okta API Scopes tab and grant the following scopes:
These scopes provide read-only access to applications, groups, and users.
<Link href="/images/kb/directory-sync/okta/new-app-integration-api-scopes.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/new-app-integration-api-scopes.png" alt="Okta new app integration API scopes" width={1200} height={1200} /> </Link>Navigate to the Admin roles tab and click Edit Assignments.
<Link href="/images/kb/directory-sync/okta/new-app-integration-admin-roles.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/new-app-integration-admin-roles.png" alt="Okta new app integration assign role" width={1200} height={1200} /> </Link>Configure the role assignment as follows:
Click Save Changes.
<Link href="/images/kb/directory-sync/okta/new-app-integration-role-assignment.png" target="_blank" > <Image src="/images/kb/directory-sync/okta/new-app-integration-role-assignment.png" alt="Okta new app integration assign role" width={1200} height={1200} /> </Link>The Okta configuration is now complete.
Return to the Firezone Directory Sync setup form and fill in the following values from your Okta environment:
your-company.okta.com)Once all fields are filled out, click Verify Now.
Firezone will attempt to connect to Okta and verify the configuration. If successful, you'll see a confirmation message and can click Create to complete the setup.
<Alert color="info"> Users originally created from this directory may be removed if they no longer belong to any synced groups. </Alert>Directory sync runs automatically every 2 hours. To trigger a sync immediately,
click the Sync Now button on the directory card in
Settings -> Directory Sync.
This typically means the API service app is not configured correctly. Verify:
okta.apps.read, okta.groups.read,
okta.users.read).Ensure the public key from Firezone was pasted correctly into the Okta API service app. The key must be added before clicking Verify Now in Firezone.
Only users and groups assigned to your Okta authentication app will sync. To add more users or groups: