Log in with Okta
This source lets users authenticate with their Okta credentials by configuring Okta as a federated identity provider with OAuth 2.0 or SAML.
Preparation
The following placeholders are used in this guide:
authentik.companyis the FQDN of the authentik installation.company.okta.comis the FQDN of your Okta tenant.
You can integrate Okta with authentik using either OAuth 2.0 or SAML. Choose a protocol and follow its tab throughout the guide.
- OAuth 2.0
- SAML
Okta configuration
To integrate Okta with authentik, create an app integration in the Okta Admin Console.
- Log in to the Okta Admin Console as an administrator.
- Navigate to Applications > Applications and click Create App Integration.
- Select OIDC - OpenID Connect, set Application Type to Web Application, and then click Next.
- Configure the following required settings:
- App Integration Name:
authentik - Sign-in redirect URIs:
https://authentik.company/source/oauth/callback/<okta-slug>/ - Under Assignments, select how you'd like to control access to authentik. Allow everyone in your organization to access or select a group to limit access.
- App Integration Name:
- Click Save.
- Under Client Credentials, take note of the Client ID. This value will be required in the next section.
- Under CLIENT SECRETS, click the Copy to clipboard next to the secret and take note of the value; it will also be required in the next section.
authentik configuration
To support the integration of Okta with authentik, you need to create an Okta OAuth source in authentik.
-
Log in to authentik as an administrator and open the authentik Admin interface.
-
Navigate to Directory > Federation and Social login, click New Source, and then configure the following settings:
- Select type: select Okta OAuth Source as the source type.
- Create Okta OAuth Source: provide a name, a slug that must match the slug used in the Okta Sign-in redirect URI field (e.g.
okta), and the following required settings:- Under Protocol settings:
- Consumer key: paste the Client ID from Okta
- Consumer secret: paste the Secret from Okta
- Under URL settings:
- Authorization URL:
https://company.okta.com/oauth2/v1/authorize - Access token URL:
https://company.okta.com/oauth2/v1/token - Profile URL:
https://company.okta.com/oauth2/v1/userinfo - OIDC Well-known URL:
https://company.okta.com/.well-known/openid-configuration - OIDC JWKS URL:
https://company.okta.com/oauth2/v1/keys
- Authorization URL:
- Under Protocol settings:
-
Click Finish to save your settings.
Export the authentik signing certificate
Okta needs the public certificate of an authentik keypair to encrypt assertions and to verify signed requests from authentik.
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to System > Certificates.
- Expand the certificate that you plan to use for signing and encryption (for example, the default
authentik Self-signed Certificate). - Click Download Certificate.
Okta configuration
To integrate Okta with authentik, create a SAML app integration in the Okta Admin Console.
- Log in to the Okta Admin Console as an administrator.
- Navigate to Applications > Applications and click Create App Integration.
- Select SAML 2.0 and click Next.
- Set App name to
authentikand click Next. - Configure the following settings:
- Single sign-on URL:
https://authentik.company/source/saml/<okta-slug>/acs/ - Audience URI (SP Entity ID):
https://authentik.company/source/saml/<okta-slug>/metadata/ - Name ID format:
Persistent
- Single sign-on URL:
- Click Show Advanced Settings and configure the following settings:
- Single Logout URL:
https://authentik.company/source/saml/<okta-slug>/slo/ - Assertion Encryption:
Encrypted - Encryption Certificate: upload the authentik certificate that you exported earlier.
- Enable Signed Requests.
- Signature Certificate: upload the authentik certificate that you exported earlier. Okta uses it to verify signed requests from authentik.
- Single Logout URL:
- Under Attribute Statements, add a statement with Name set to
emailand Value set touser.profile.email. - Click Next, and then click Finish.
- On the Assignments tab, assign the application to the users or groups that should be able to log in to authentik (for example, the Everyone group).
- On the Sign On tab, under SAML 2.0, click More details. Take note of the Sign on URL and Sign out URL, and click Download next to Signing Certificate. These values are required in the next section.
authentik configuration
To support the integration of Okta with authentik, import the Okta signing certificate into authentik and create a SAML source.
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to System > Certificates and click Import Existing Certificate-Key Pair.
- Set Certificate Name to
Okta Signing Certificate. - Paste the contents of the Okta signing certificate that you downloaded earlier into the Certificate field.
- Leave the Private Key field empty.
- Click Import Certificate-Key Pair.
- Navigate to Directory > Federation and Social login and click New Source.
- Select SAML Source and configure the following settings:
- Set Source Name to
Okta. - Set Slug to
<okta-slug>. The slug must match the one used in the Okta Single sign-on URL and Audience URI fields. - Set SSO URL to the Sign on URL from Okta.
- Set SLO URL to the Sign out URL from Okta.
- Set Binding Type to Post-auto binding.
- Set Signing keypair to the authentik certificate that you exported earlier.
- Set Verification Certificate to the Okta certificate that you uploaded earlier.
- Enable Verify Assertion Signature.
- Under Advanced protocol settings, set Encryption Certificate to the authentik certificate that you exported earlier. authentik uses its private key to decrypt the assertions encrypted by Okta.
- Set Source Name to
- Click Finish.
For instructions on how to display the new source on the authentik login page, refer to the Add sources to default login page documentation.
For instructions on embedding the new source within a flow, such as an authorization flow, refer to the Source Stage documentation.
Source property mappings
Source property mappings allow you to modify or gather extra information from sources. See the overview for more information.