Configuration
authentik: 2025.12.0+
Before deploying the authentik Agent, configure your authentik deployment. This involves:
- Create and apply an OAuth Device code flow
- Creating an OAuth application and provider
- Creating a Connector
Create and apply an OAuth device code flow
The OAuth device code flow enables secure authentication for input-limited clients like CLI tools and is required for the authentik Agent to function.
If you have already deployed the authentik OAuth device code flow, skip to the next section.
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Flows and Stages > Flows and click New Flow.
- Set the following required configurations:
- Name: provide a name (e.g.
default-device-code-flow) - Title: provide a title (e.g.
Device code flow) - Slug: provide a slug (e.g.
default-device-code-flow) - Designation:
Stage Configuration - Authentication:
Require authentication
- Name: provide a name (e.g.
- Click Create.
- Navigate to System > Brands and click the Edit icon on the default brand.
- Set Device code flow to the newly created device code flow and click Update.
Create an application and provider in authentik for CLI
The authentik Agent requires an OAuth application/provider pair to handle authentication.
-
Log in to authentik as an administrator and open the authentik Admin interface.
-
Navigate to Applications > Applications and click New Application to open the application wizard. Alternatively, you can first create a provider separately, then create the application and connect it to the provider.
- Application: set the Name and Slug to
authentik-cli, and provide an optional group for the type of application, the policy engine mode, and optional UI settings. - Choose a Provider Type: select OAuth2/OpenID Connect as the provider type.
- Configure the Provider: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
- Set the Client Type to
Public. - Set the Client ID to
authentik-cli. - Select any available signing key.
- Under Advanced protocol settings:
- In addition to the three default Selected Scopes, add the
authentik default OAuth Mapping: OpenID 'offline_access'andauthentik default OAuth Mapping: authentik API accessscopes. - (Optional) To bind the Agent's tokens to a key on each device, also add the
authentik default OAuth Mapping: OpenID 'bound_key'scope. Refer to Key binding.
- In addition to the three default Selected Scopes, add the
- Set the Client Type to
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage access to the application.
- Application: set the Name and Slug to
-
Click Submit to save the new application and provider.
Create the authentik Agent connector
The authentik Agent Connector allows device information to be reported to authentik.
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Endpoint Devices > Connectors and click New Endpoint Connector.
- Select Agent Connector as the agent type and click Next.
- Configure the following required settings:
- Connector name: provide a descriptive name (e.g.
authentik Agent) - Refresh interval: select how often the agent updates its configuration.
- Enabled: toggle to enable the connector.
- Under Authentication settings:
- Federated OAuth2/OpenID Providers: add the
authentik-cliprovider that you created in the previous section.
- Federated OAuth2/OpenID Providers: add the
- Connector name: provide a descriptive name (e.g.
- Click Finish.
Key binding
With key binding, the authentik Agent creates a key pair on the device when a profile is added, and authentik binds the profile's refresh token and ID token to that key. A refresh token that is copied from the device can't be used without the key. Access tokens are not bound to the key. For more information, refer to OpenID Connect key binding.
Key binding requires authentik 2026.8 or later and authentik Agent 0.70 or later.
To enable key binding on an existing provider:
- Log in to authentik as an administrator and open the authentik Admin interface.
- Navigate to Applications > Providers and click the Edit icon of the
authentik-cliprovider. - Under Advanced protocol settings, add the
authentik default OAuth Mapping: OpenID 'bound_key'scope to Selected Scopes. - Click Update.
Profiles that are added after this change are key-bound, and the authentik Agent app shows a Key-bound badge for them. Existing profiles remain unbound until the user adds the profile again with the same name. Agents older than 0.70 continue to work without key binding.
To allow only key-bound profiles on a device, enforce the profile_management.require_dpop setting. Refer to Agent settings and policies.