Skip to main content

authentik – SSO & Connector Permissions

Documentation Snapshot: Late 2026

Reference Environment: authentik Admin Interface (versions 2024.x–2026.x as of late 2026). Note for administrators: authentik cleanly separates identity configurations into Applications (user-facing catalog entries, access policies, launch tiles, and URL slug) and Providers (protocol-specific engines such as OAuth2/OpenID Connect that hold the Client ID, Client Secret, and signing key). Terminology, Python-based property mappings, and OIDC discovery endpoints (/application/o/<application-slug>/.well-known/openid-configuration) described in this guide reflect this modern architecture.

This guide provides a comprehensive, step-by-step walkthrough for administrators to set up Single Sign-On (SSO) with authentik for FSI Server, secure the integration using OpenID Connect (OIDC) with PKCE (S256) and confidential client authentication, and manage fine-grained access to different Source Connectors on FSI Server.

It covers architecture considerations, provider and application pairing, built-in and custom Python scope mappings for token claims, user federation (such as Active Directory / LDAP synchronization), access policy bindings, and security hardening.


authentik Architecture: Applications vs. Providers vs. Property Mappings​

authentik decouples application identity management into distinct, modular layers. Both an OAuth2/OpenID Provider and an Application bound to that Provider are required before OIDC endpoints become active:

ComponentFunction in authentikRole in FSI Server Integration
ApplicationDefines the catalog entry, icon, user access policies, and Slug.Controls who can access FSI Server and defines the OIDC Discovery Issuer URL (/application/o/<application-slug>/).
OAuth2/OpenID ProviderGenerates OIDC endpoints, issues RSA-signed JWT tokens, validates Client ID, Client Secret & PKCE (S256).Implements the Authorization Code Flow, JWKS signing keys, and server-to-server token exchange for FSI Server.
Property Mappings (Scopes)Python-based expressions that dynamically compute token claims.Injects preferred_username and the groups claim array into the OIDC ID token.
Policies & BindingsAccess rules (group membership, IP filters, GeoIP, MFA requirements).Enforces access restrictions directly at the authentik login gate.
Critical Distinction: Provider Client ID vs. Application Slug

In authentik, two different identifiers are created in Steps 3 and 4:

  1. Provider Client ID (Step 3): Automatically generated 40-character alphanumeric string (or a custom string you set). This value goes into clientId in FSI Server's settings.yml.
  2. Application Slug (Step 4): URL-safe identifier (e.g., fsi-server). This value forms the path of issuerUrl (https://<authentik-domain>/application/o/<application-slug>/) in settings.yml.

Confusing these two values (for example, leaving the random 40-character Client ID in the Provider while entering the Application Slug fsi-server as clientId in settings.yml) will cause authentik to reject every login request!


Identity Directory Models: Built-in Directory vs. LDAP/AD Synchronization vs. Upstream Federation​

authentik provides flexible options for managing user identities and synchronizing group memberships:

Capabilityauthentik Built-in DirectoryLDAP / Active Directory Sync (Source)Identity Federation (SAML / OIDC Sources)
OIDC Single Sign-On (FSI Server)✅ Supported✅ Supported✅ Supported
Connector Access Control✅ authentik User Groups✅ Synced AD / LDAP Groups✅ Mapped from Upstream IdP claims
Group Membership ManagementDirect assignment in authentik✅ Periodic sync via LDAP Source✅ Dynamic provisioning at login
Client Authentication (BFF)✅ Confidential Client (Secret + PKCE)✅ Confidential Client (Secret + PKCE)✅ Confidential Client (Secret + PKCE)
Token Group Filtering✅ Built-in profile or Custom Scope Mapping✅ Built-in profile or Custom Scope Mapping✅ Built-in profile or Custom Scope Mapping
Multi-Factor Authentication (MFA)✅ Built-in (Passkeys / WebAuthn / TOTP)✅ Built-in authentik MFA stage✅ Delegated or enforced in authentik
Back-Channel Single Logout (SLO)✅ Supported✅ Supported✅ Supported
Consent Customization✅ Implicit Consent (Silent login)✅ Implicit Consent (Silent login)✅ Implicit Consent (Silent login)

Architecture & Data Flow​

On FSI Server, digital assets are organized into Source Connectors (such as local storage directories, SAN/NAS shares, or cloud buckets). Access to each connector is governed by FSI Server Groups.

The following diagram illustrates how user attributes in authentik map to security groups, pass through the OIDC authorization code flow with PKCE (S256), and resolve to connector permissions on FSI Server:

Scenario Overview:​

FSI ConnectorPurposeauthentik GroupLocal authentik SetupLDAP / Active Directory SetupFSI Permission
marketing-assetsCampaign images, graphicsfsi-marketingAssigned in authentik group managerSynced via LDAP Source from Active DirectoryRead, Write, Upload (rw)
product-catalogE-Commerce product photosfsi-productsAssigned in authentik group managerSynced via LDAP Source from Active DirectoryRead Only / Download (r)
internal-archiveConfidential company archivefsi-archiveAssigned with enforced MFA policy bindingSynced via LDAP Source from Active DirectoryRead Only (r)
All ConnectorsFull server administrationfsi-administratorsAssigned with WebAuthn/Passkey & TOTPSynced from domain administratorsAdministrator (Full access)

authentik Administration Interface Configuration​

Step 1: Create Groups for Connectors​

In the authentik Admin Interface, navigate to: 👉 Directory → Groups → Create

  1. Create the groups corresponding to your connector permissions:
    • fsi-marketing
    • fsi-products
    • fsi-archive
    • fsi-administrators
  2. Click Create for each group.
Group Names in authentik

Unlike Microsoft Entra ID (which uses Object ID GUIDs), authentik uses human-readable group names (e.g., fsi-marketing). These exact group names are matched in FSI Server's groupMapping.


Step 2: Verify or Customize Scope Mappings (groups & preferred_username)​

FSI Server initiates every OIDC login with scope=openid profile email and reads two claims from the returned ID token:

  • preferred_username (the user's login name)
  • groups (array of group names for connector access)

Out of the box, authentik's built-in authentik default OAuth Mapping: OpenID 'profile' already includes both preferred_username and groups ("groups": [group.name for group in request.user.ak_groups.all()]). If you keep the three default OpenID scopes (openid, email, profile) selected when creating the Provider in Step 3, no custom Scope Mapping is required!

Option B: Custom Scope Mapping (Optional – For Filtering Large AD Group Lists)​

If your users belong to hundreds of Active Directory groups and you want to emit only fsi-* groups into the ID token (to keep the JWT compact), create a custom Scope Mapping:

  1. Navigate to: 👉 Customization → Property Mappings → Create.
  2. Select Scope Mapping and click Next.
  3. Configure the mapping parameters:
    • Name: FSI Server - Filtered Groups (profile)
    • Scope name: profile
    • Description: Emits user profile and filtered fsi-* groups into the ID token.
    • Expression:
      return {
      "name": request.user.name,
      "given_name": request.user.name,
      "preferred_username": request.user.username,
      "nickname": request.user.username,
      "groups": [
      group.name for group in request.user.ak_groups.all()
      if group.name.startswith("fsi-")
      ],
      }
  4. Click Finish.
Do Not Drop preferred_username When Using a Custom Scope Mapping

If you replace authentik default OAuth Mapping: OpenID 'profile' with a custom mapping (or accidentally deselect the default profile and openid scopes in Step 3), preferred_username will be missing from the ID token unless included in your expression as shown above!


Step 3: Create the OAuth2/OpenID Provider​

  1. In the left navigation, navigate to: 👉 Applications → Providers → Create.
  2. Select OAuth2/OpenID Provider and click Next.
  3. Configure the Protocol settings:
    • Name: FSI Server Provider
    • Authentication flow: Select your default authentication flow (e.g., default-authentication-flow (Welcome to authentik!)).
    • Authorization flow: Select default-provider-authorization-implicit-consent (Authorize Application). (Important: Using implicit consent allows users to sign in seamlessly without encountering an interactive consent prompt on every login).
    • Client type: Confidential (Mandatory for FSI Server).
    • Client ID: Copy the automatically generated 40-character alphanumeric string, or replace it with fsi-server. (Important: Whatever value is in this field must be copied verbatim into clientId in settings.yml!)
    • Client Secret: Copy and save the automatically generated secret string for clientSecret in settings.yml.
    • Redirect URIs/Origins (RegEx):
      • Set matching mode to Strict (default in authentik 2024.2+) and enter: https://<fsi-domain>/fsi/interface/
      • (Example: https://fsi.example.com/fsi/interface/ – Ensure the trailing slash / is included! If you use Regex matching mode instead of Strict, enter ^https://fsi\.example\.com/fsi/interface/$).
    • Signing Key: Select authentik Self-signed Certificate (or your organization's RSA signing certificate).
  4. Expand Advanced protocol settings:
    • Scopes (Selected Scopes): Ensure all three default OpenID mappings remain selected in the right-hand / active list:
      • authentik default OAuth Mapping: OpenID 'openid'
      • authentik default OAuth Mapping: OpenID 'email'
      • authentik default OAuth Mapping: OpenID 'profile' (or your custom FSI Server - Filtered Groups (profile) mapping from Step 2B).
    • Subject mode: Select Based on the User's hashed ID (default) or Based on the User's username.
    • Include claims in id_token: Ensure this is switched ON (enabled by default – Critical: FSI Server reads claims directly from the id_token).
    • Backchannel Logout URI (available in authentik 2024.8+): https://<fsi-domain>/fsi/service/oidc/logout
  5. Click Finish.
Mandatory: Select an RSA Signing Key (Never Leave Signing Key Empty or Use EC Keys)

FSI Server validates OIDC ID tokens and Back-Channel Logout tokens using asymmetric RSA public keys (RS256) fetched from authentik's JWKS endpoint (jwks_uri), matching the token's kid (Key ID) header:

  1. Do NOT leave Signing Key empty (---------): When no Signing Key is selected in authentik, authentik falls back to symmetric HS256 signing without a kid header and exposes an empty JWKS ("keys": []). FSI Server will reject the token with JWT header is missing 'kid' (key ID).
  2. Use an RSA key (e.g., authentik Self-signed Certificate), NOT an Elliptic Curve (EC / ECDSA) key: FSI Server's JWKS verifier requires RSA keys (RSAKey / RSASSAVerifier).
PKCE (S256) Support in authentik

FSI Server automatically sends a PKCE (S256) code_challenge with every authorization request and supplies the matching code_verifier alongside the Client Secret during the server-to-server token exchange. In authentik, OAuth2/OpenID Providers validate PKCE (S256) automatically out of the box whenever code_challenge is included in the authorization request—no separate PKCE toggle needs to be enabled in the Provider UI.


Step 4: Create and Bind the Application (Mandatory!)​

An Unbound Provider Will Not Work (404 Not Found / Provider not found)

In authentik, creating a Provider alone does not activate its OIDC Discovery or authorization endpoints. You must create an Application in Applications → Applications and bind it to FSI Server Provider.

  1. Navigate to: 👉 Applications → Applications → Create (do not use the wizard that creates a duplicate provider; click Create to bind your existing provider).
  2. Configure the following fields:
    • Name: FSI Server
    • Slug: fsi-server (Important: This exact slug defines the OIDC issuerUrl path: https://<authentik-domain>/application/o/fsi-server/)
    • Provider: Select FSI Server Provider (created in Step 3).
    • Launch URL: https://<fsi-domain>/fsi/interface/
  3. Click Create.
Verifying the Issuer URL & OIDC Discovery in authentik

Once the Application is saved, click Applications → Providers → FSI Server Provider and open the OpenID Configuration Issuer URL shown on the Overview tab: https://<authentik-domain>/application/o/fsi-server/.well-known/openid-configuration Opening this URL in your browser must return a 200 OK JSON document containing "issuer": "https://<authentik-domain>/application/o/fsi-server/".


Step 5: Record Client Credentials & Issuer URL​

From the Provider (Step 3) and Application (Step 4), record the three parameters required for settings.yml:

  • Client ID (clientId): Copy the exact Client ID from Applications → Providers → FSI Server Provider (either the 40-character generated string or fsi-server if you changed it in Step 3).
  • Client Secret (clientSecret): Copy the Client Secret from FSI Server Provider.
  • Issuer URL (issuerUrl): https://<authentik-domain>/application/o/fsi-server/ (using the Application Slug from Step 4).

Step 6: Assign Users, LDAP Synchronization & Access Policies​

Option A: Local authentik Users​

  1. In the left navigation, navigate to: 👉 Directory → Users → Create.
  2. Enter Username (e.g., jdoe), Name, and Email, then click Create.
  3. Click on the newly created user in the list:
    • On the Overview tab, click Set Password, enter a password, and click Update password.
    • On the Groups tab, click Add to existing group, select the appropriate connector group (e.g., fsi-marketing or fsi-administrators), and click Add.

Option B: Active Directory / LDAP Source Synchronization​

In enterprise environments, authentik can synchronize users and groups from Active Directory:

  1. Navigate to: 👉 Directory → Federation and Social login → Create.
  2. Select LDAP Source and configure Server URI, Bind CN, Bind Password, and Base DN.
  3. In the LDAP Source settings:
    • Enable Sync users and Sync groups.
    • Select the Parent Group or specify Group Object Filter: (objectCategory=group) (for Active Directory) or (objectClass=groupOfNames) (for OpenLDAP).
  4. Benefit: Security groups in Active Directory (e.g., fsi-marketing) are continuously mirrored into authentik groups and forwarded directly to FSI Server.

Option C: Restricting Application Access via Policy Bindings​

To prevent unauthorized users from even seeing or authenticating against FSI Server:

  1. Navigate to: Applications → Applications → click FSI Server.
  2. Go to the Policy / Group / User Bindings tab.
  3. Click Bind existing policy/group/user → select Group and bind the allowed connector groups (fsi-marketing, fsi-products, fsi-archive, fsi-administrators).
  4. Security Model: Any tenant user not belonging to one of these groups is immediately stopped at the authentik login gate with an "Access Denied" screen, before reaching FSI Server.

Option D: Multi-Factor Authentication (MFA / WebAuthn / Passkeys)​

  • Under Flows and Stages → Flows, bind an Authenticator Validation Stage (WebAuthn / Passkeys, TOTP / Google Authenticator) to the authentication flow.
  • authentik enforces MFA transparently before issuing the authorization code to FSI Server.

FSI Server Configuration (settings.yml)​

Configure the OIDC authentication module in settings.yml (located in the FSI Server configuration directory, e.g., /etc/fsi/fsi-server/config/settings.yml or ./config/settings.yml).

Restart FSI Server, Use Only One oidc Module & Omit Manual authorizationUri
  1. Single active oidc entry: FSI Server uses the first enabled type: "oidc" module in authModules. If you previously configured another IdP (such as Microsoft Entra ID or Keycloak), remove or set enabled: false on the previous oidc entry.
  2. Do not hardcode authorizationUri or tokenUri: Let FSI Server discover all endpoints automatically via issuerUrl.
  3. Restart required: Changes to settings.yml are loaded only at server startup. Restart FSI Server after saving settings.yml so the new clientId and issuerUrl take effect.

The example below shows all parameters, highlighting mandatory settings and default values:

settings.yml
authentication:
authModules:
- type: "oidc" # Mandatory: Module type
enabled: true # Default: true
name: "authentik (SSO)" # Display label on login button
provider: "authentik" # Provider identifier

# 1. Credentials from authentik OAuth2 Provider (Steps 3 & 5)
# IMPORTANT: Must match the Provider's exact Client ID (40-char string or custom ID), NOT the Application Slug!
clientId: "your-client-id-from-authentik-provider"
clientSecret: "your-client-secret-from-authentik-provider"

# 2. Issuer URL (Endpoints are automatically discovered via .well-known/openid-configuration)
# Mandatory: authentik Application Issuer URL using the Application Slug from Step 4
issuerUrl: "https://auth.example.com/application/o/fsi-server/"

# 3. Redirect URI
# Default: Uses base request URL if omitted.
# Recommendation: Specify explicitly with [IP_ADDRESS] to match authentik Redirect URIs.
redirectUri: "https://[IP_ADDRESS]/fsi/interface/"

# 4. Token Claims
usernameClaim: "preferred_username" # Default: "preferred_username" (or "email")
groupsClaim: "groups" # Default: "groups"

# 5. User Provisioning & Session Mode
autoProvision: true # Default: true (provisions user upon first SSO login)

# 6. Group Mapping: Map authentik Group Names to FSI Server Groups
# Note: FSI Server groups must correspond to defined group names
groupMapping:
# Full Administrator (Access to server settings & all connectors)
"fsi-administrators": "administrators"

# Marketing Team (Mapped to marketing connector)
"fsi-marketing": "marketing"

# Products Team (Mapped to product catalog connector)
"fsi-products": "products"

# Archive Team (Mapped to internal archive connector)
"fsi-archive": "archive"

# Optional: File-based XML authentication module as local administrative fallback
- type: "file"
enabled: true

Troubleshooting & Common Issues​

Error Code / SymptomPotential Root CauseResolution
authentik shows Client not found / Provider does not exist / 404 Not Found1. Provider Client ID vs. Application Slug confused: clientId in settings.yml was set to the Application Slug (fsi-server), while the Provider in authentik still has its auto-generated 40-character Client ID.
2. Provider not bound to an Application: Step 4 was skipped, or the Application Slug does not match issuerUrl.
3. FSI Server not restarted: FSI Server is still sending an old clientId from memory, or another oidc block is enabled above authentik in settings.yml.
1. Open Applications → Providers → FSI Server Provider → Edit and copy the exact Client ID into clientId in settings.yml.
2. Verify under Applications → Applications that FSI Server is bound to FSI Server Provider and that https://<authentik-domain>/application/o/<slug>/.well-known/openid-configuration returns HTTP 200.
3. Ensure only one oidc module is enabled in settings.yml and restart FSI Server.
Invalid SSO token / Server log shows JWT header is missing 'kid' or JWKS signature verification failed1. Signing Key left empty (---------) in the authentik Provider (causing authentik to sign with symmetric HS256 without a kid header).
2. Elliptic Curve (EC / ECDSA) key selected instead of an RSA key.
In authentik, edit FSI Server Provider and set Signing Key to authentik Self-signed Certificate (or another RSA key). Never leave Signing Key blank and do not use an EC key.
Redirect URI Error / redirect_uri mismatch in authentik1. Trailing slash / missing or mismatched.
2. Matching mode set to Regex with unescaped characters, or HTTP vs. HTTPS mismatch behind reverse proxy.
1. In FSI Server Provider, ensure Redirect URIs/Origins uses Matching mode Strict and matches https://<domain>/fsi/interface/ (including the trailing slash /).
2. If behind a reverse proxy, ensure X-Forwarded-Proto: https is passed.
Interactive consent dialog appears on every loginProvider Authorization flow is set to explicit consent (default-provider-authorization-explicit-consent).In the Provider settings, change Authorization flow to default-provider-authorization-implicit-consent for silent enterprise login.
Token missing groups or preferred_username claim (SSO login denied: user does not belong to any mapped group)1. Default OpenID scopes (openid, email, profile) were deselected when editing Selected Scopes in the Provider.
2. Include claims in id_token was turned OFF.
3. Custom Scope Mapping used Scope name: groups instead of profile or openid.
1. In FSI Server Provider → Advanced protocol settings → Scopes, ensure authentik default OAuth Mapping: OpenID 'openid', 'email', and 'profile' are all selected.
2. Ensure Include claims in id_token is ON.
3. Verify user group membership in authentik under Directory → Users → [User] → Groups.
Back-Channel Logout does not terminate user session1. Network connectivity / firewall between authentik and FSI Server.
2. Self-signed or untrusted SSL certificate on FSI Server.
3. Backchannel Logout URI misconfigured.
1. Ensure the authentik server/worker container can resolve and reach https://<fsi-domain>/fsi/service/oidc/logout over HTTPS.
2. Verify that Backchannel Logout URI under Advanced protocol settings in the Provider matches FSI Server.
PKIX path building failed: unable to find valid certification pathFSI Server Java backend does not trust the internal/self-signed SSL certificate of authentik.Import your corporate CA certificate into the JVM truststore used by FSI Server (keytool -importcert -keystore $JAVA_HOME/lib/security/cacerts -file ca.crt).
unauthorized_client or invalid_clientClient secret mismatch or Provider configured as Public client instead of Confidential.In the Provider settings, verify that Client type is set to Confidential, re-copy the secret, update clientSecret in settings.yml, and restart FSI Server.