Join our Newsletter — 33% off our NHI Course
Home› Guides› authentik Security Guide: Flows, Outposts, Tokens and Admin…
Guide Identity & Access Management (IAM)

authentik Security Guide: Flows, Outposts, Tokens and Admin Hardening

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 20 November 2026 17 min read
On this page

authentik is a self-hosted identity provider, so the security of every application behind it depends on how its flows, MFA stages, sessions, administrator access, service account tokens, outposts and deployment settings are configured by the team that runs it. This guide walks through each of those areas using authentik's own documentation and turns its hardening advice into a practical baseline for security and identity teams.

authentik's documentation describes the product as secure out of the box, with optional hardening steps that increase security at some cost to user convenience. This guide focuses on those steps and on the non-human identities that authentik itself creates and relies on: service accounts, API tokens, app passwords and outpost tokens. It is written for teams that already run authentik or are planning a production deployment.

This is an independent guide from NHI Mgmt Group, based on authentik's public documentation as of November 2026. It is not sponsored or reviewed by authentik. Product features change, so confirm settings against authentik's current documentation.

Key takeaways

  • authentik's hardening guidance raises the password minimum to 15 characters, recommends restricting MFA to WebAuthn with user verification required, and warns that recovery flows should not rely on an emailed link alone.
  • Unlinking the Enrollment, Recovery or Passwordless flows only hides them from the login screen; the documentation says to bind policies to them or delete them.
  • Superuser membership should be small and reviewed; the documentation recommends roles and access control instead, phishing-resistant MFA for superusers, and disabling impersonation if it is not used.
  • Service accounts and tokens are the main non-human identities in authentik. Tokens expire after 360 days by default but can be set to never expire, and viewing a token's value needs a specific permission.
  • Every outpost gets an automatically generated service account and token, and each outpost serves Prometheus metrics on port 9300 without authentication.
  • Deployment defaults need attention: PostgreSQL SSL mode defaults to disable, the trusted proxy CIDR default is broader than most deployments need, and trace logging can record cookies and headers.
  • Only the latest patch releases of the two most recent versions are supported, so a regular upgrade cadence is part of the security baseline.

How authentik's security model fits together

It helps to name the moving parts before hardening them. In authentik's model:

  • Flows define what a user goes through to authenticate, enrol, recover an account or change a password. Each flow is a sequence of stages, such as an Identification stage, a password stage, an Authenticator Validation stage and a User Login stage.
  • Policies are bound to flows, stages and applications to decide whether something applies or is allowed. The hardening documentation uses password, expression, reputation and GeoIP policies.
  • Providers implement protocols for applications. Some provider types (Proxy, LDAP, RADIUS and RAC) require an outpost, a separately deployed component that talks to authentik Core over its API.
  • Users include people and service accounts. The documentation describes three service account types: user-created service accounts, internal service accounts managed by authentik for components such as outpost communication, and agent accounts that act on behalf of a parent user.
  • Tokens and app passwords are credentials attached to users and service accounts, managed under Directory, Tokens and App passwords.

Most security weaknesses in an identity provider come from flows that are more permissive than intended, administrators with too much standing power, machine credentials that never expire, and infrastructure settings left at defaults. The sections below address each in turn. For background on where an identity provider sits relative to a directory, see Directory Service vs Identity Provider.

Flows, enrolment and account enumeration

Flows are authentik's most powerful feature and its most important attack surface, because any flow that can be reached can be executed.

Flows that are hidden are not disabled

The hardening documentation makes a point that is easy to miss: for the Enrollment, Recovery and Passwordless flows, unlinking them from the login screen only hides them. If a flow should not be usable by everyone, bind policies to it that restrict who can execute it, or delete it. Teams should review every flow in the instance, including defaults created at installation, and decide for each one whether it should exist and who can run it.

Identification stage settings

To reduce account enumeration, the documentation recommends that the Identification stage keeps "Pretend user exists" enabled, has "Show matched user" disabled, and limits User Fields to the identifiers you actually need. Together these stop an attacker learning which user names or email addresses are valid from the login screen's behaviour.

Password policy

The documentation recommends raising the minimum password length to 15 characters and enabling "Check haveibeenpwned.com". That check needs outbound access; for air-gapped instances the documentation suggests an expression policy with a local list instead. The policy must be bound to every flow where users choose passwords, not just the default password change flow, otherwise enrolment or recovery flows can set weaker passwords.

Locking down configuration changes to flows and expressions

Expression policies, property mappings and prompts can contain logic that runs inside authentik. The hardening documentation describes blocking specific API endpoints at the reverse proxy so that these objects cannot be changed through the API, which means changes must instead be made through file-system blueprints. The listed paths are:

  • Expressions: /api/v3/policies/expression*, /api/v3/propertymappings*, /api/v3/stages/prompt/prompts* and /api/v3/managed/blueprints*
  • Blueprints: /api/v3/managed/blueprints*
  • CAPTCHA stage: /api/v3/stages/captcha* and /api/v3/managed/blueprints*

This moves sensitive configuration into a reviewed, version-controlled path. It also means a stolen administrator session or API token cannot quietly alter expression logic, which is a valuable property for an identity provider.

MFA and brute-force resistance

Authenticator Validation stage

authentik's guidance for the Authenticator Validation stage is specific:

  • Set "Not configured action" to force enrolment or deny access, rather than continuing without MFA.
  • Limit Device Classes, ideally to WebAuthn only.
  • Set WebAuthn User verification to Required.
  • Use WebAuthn Device type restrictions, and mirror them on the WebAuthn authenticator setup stage so users cannot enrol a device type that validation would later reject.
  • Delete enrolments made before authentik 2024.4 or with unrecognised AAGUIDs, so that users re-enrol.
  • Keep the last validation threshold at its default unless you intentionally want to skip validation.
  • Keep the four throttling factors at 1.

The documentation also says recovery flows deserve the same scrutiny and should not rely on an emailed link alone. A strong login flow with a weak recovery flow simply moves the attacker to the recovery flow. For how WebAuthn user verification and AAGUIDs work, see the FIDO2 and WebAuthn Internals Guide, and for a policy baseline the Authentication and MFA Policy Template.

Brute force and credential stuffing

The documentation describes several layers:

  • A Reputation policy with Negate on the authentication flow, or bound to a CAPTCHA stage, with limits set under System, Settings ("Reputation: lower limit" and "Reputation: upper limit").
  • An unconditional CAPTCHA stage if you prefer not to depend on reputation.
  • A GeoIP policy to restrict sign-ins by country.
  • Notification rules for the login_failed and suspicious_request events.

Sessions and session binding

Once a user has authenticated, the session cookie is the credential. The User Login stage controls how long it lasts. The documentation recommends:

  • Keep Session duration at zero, or keep any duration short.
  • Set Remember device to zero if you do not need it; it defaults to 30 days.
  • Keep the Remember me offset at zero or short.
  • Enable "Terminate other sessions".

authentik can also bind sessions to network and location attributes. Network binding can match ASN, ASN and network, or ASN, network and IP; GeoIP binding can match continent, country or city. The documentation advises starting with the loosest binding that works, because stricter settings cause spurious logouts. Session binding requires the ASN and GeoIP context processors (AUTHENTIK_EVENTS__CONTEXT_PROCESSORS__ASN and AUTHENTIK_EVENTS__CONTEXT_PROCESSORS__GEOIP), and the documentation warns that a missing database terminates bound sessions. Test binding with a pilot group before applying it widely.

Administrative access and impersonation

An identity provider's administrators can change who can access every connected application, so administrator access needs the strictest controls in the deployment.

Superusers

The documentation recommends using roles and access control instead of superuser membership, reviewing superuser membership regularly, and requiring phishing-resistant MFA for superusers. In practice that means a very small superuser group, named personal accounts rather than shared ones, WebAuthn bound to each, and roles that grant only what each administrator needs for day-to-day work. Plan an emergency access path that does not depend on the normal login flow, and document it using the Break-Glass Account Guide.

Impersonation

authentik allows administrators to impersonate users. The documentation recommends disabling impersonation under System, Settings if it is unused, keeping "Require reason for impersonation" enabled, and adding notification rules for impersonation_started and impersonation_ended. Impersonation is effectively a way to act as any user, so where it is kept, every use should be visible to someone other than the administrator doing it.

Configuration change alerts

The documentation recommends notification rules for model_created, model_updated, model_deleted and secret_view. Routing these to a security channel or SIEM gives near real-time visibility of changes to flows, policies, providers and credentials, and of anyone viewing a secret.

Service accounts, API tokens and app passwords

authentik's service accounts and tokens are non-human identities, and they deserve the same lifecycle discipline as any other machine credential. The service accounts documentation describes them as specialised user accounts for machine-to-machine authentication and automation.

Token intents

The service accounts documentation describes two intents set in the Intent field:

  • App password: for flows and clients that take a user name and password, such as an LDAP bind.
  • API Token: for HTTP Bearer authentication against the /api/v3/ endpoints.

Expiry and rotation

Tokens expire after 360 days by default, but can be set to non-expiring, and a custom Expires on date can be set. For a new service account the default app password expiry is also 360 days. Expiring app passwords become invalid on expiry, while authentik automatically rotates expiring API tokens. To rotate an app password, the documentation describes creating a replacement, updating the external system and then deleting the old token. Revocation is by deleting the token. OAuth2 access tokens tied to service accounts can be introspected or revoked through OAuth2 provider endpoints.

A reasonable baseline is to forbid non-expiring tokens unless there is a documented exception with an owner and review date, and to set expiry shorter than the default for high-privilege tokens.

Who can see a token

Viewing a token's value uses the copy action in Tokens and App passwords and requires the "View token's key" permission. Grant that permission narrowly, and pair it with the secret_view notification rule described above so token views are recorded and visible.

Permissions and limits

Service accounts start with no special access beyond normal authentication. Access is granted through groups, roles (global or object permissions), direct object permissions, or application bindings and policies. The documentation gives the example of an LDAP search account that receives the "Search full LDAP directory" object permission on the LDAP provider through a role. Service accounts cannot use a password, cannot access the user or Admin interfaces, cannot complete interactive MFA, and should not represent a person.

The hardening documentation adds that teams should review tokens and app passwords under Directory, Tokens and App passwords, and prefer scoped service accounts over tokens linked to superusers. A token tied to a superuser carries the superuser's full power and is not protected by that superuser's MFA.

The service accounts documentation's own security notes are worth adopting as policy: one service account per integration, least privilege, expiring tokens with scheduled rotation for long-lived secrets, storage in a secret manager, deletion or deactivation of unused accounts, and auditing of logins, API calls and token access. The API Keys vs Service Accounts guide explains why scoped accounts are easier to govern than free-floating keys, and the Secrets Management Guide covers storage.

Outposts

An outpost is a separately deployed instance of an authentik component that handles provider logic outside authentik Core. Proxy, LDAP, RADIUS and RAC providers require one. Outposts can run anywhere that can reach the authentik API, including firewalled or air-gapped environments.

Outpost identity

Creating an outpost automatically generates a service account and a token, which the outpost uses to connect. According to the outposts documentation, that service account can only read the outpost's configuration and the configuration of its assigned application and provider pairs, plus related objects such as certificates. Configuration updates and health checks travel over websockets. Because the token is a credential that can read certificates and provider configuration, treat it as a secret: store it in your deployment's secret store and restrict who can read the outpost's environment.

Security-relevant outpost settings

SettingWhat it does (per the documentation)Hardening note
authentik_host_insecureDisables SSL validation for the connection to authentik.Leave off in production.
kubernetes_disable_x509_strictRelaxes certificate validation for the Kubernetes API server.Enable only if needed and with the risk understood.
kubernetes_ingress_secret_nameTLS secret for the ingress; leaving it empty disables TLS.Always set.
container_imageOverrides the default outpost image.Verify the source of any override.
kubernetes_json_patchesAllows arbitrary patches to created Kubernetes objects.Review patches as code.
log_leveltrace, debug, info, warning or error.Verbose levels may expose more detail in logs.
docker_map_ports, docker_networkControl port exposure and network attachment.Expose only what clients need.

Metrics and the embedded outpost

Each outpost serves Prometheus metrics on port 9300 at /metrics with no authentication. The outposts documentation notes that Docker does not map this port; keep it restricted to trusted networks in every deployment model. The hardening documentation recommends setting AUTHENTIK_OUTPOSTS__DISABLE_EMBEDDED_OUTPOST to true if you run standalone outposts or no proxy providers, which removes a component you do not use.

Deployment and HTTP hardening

Several authentik environment settings have defaults that suit getting started more than production. The hardening documentation covers them directly.

  • Secret key: generate AUTHENTIK_SECRET_KEY securely, keep it out of version control and load it from a secret manager. Rotate it only if it leaks, because rotation invalidates all sessions.
  • Trusted proxy headers: narrow AUTHENTIK_LISTEN__TRUSTED_PROXY_CIDRS to your actual reverse proxies. The default is broader than most deployments need, and an over-broad setting lets clients influence the source address authentik sees, which matters for reputation, GeoIP and session binding.
  • Database connections: set AUTHENTIK_POSTGRESQL__SSLMODE to verify-ca or verify-full unless you use a trusted local socket. The default is disable.
  • Logging: keep AUTHENTIK_LOG_LEVEL at info in production, because trace can log cookies and headers.
  • Error reporting: keep AUTHENTIK_ERROR_REPORTING__ENABLED off, or keep AUTHENTIK_ERROR_REPORTING__SEND_PII disabled.

For HTTP headers, the documentation recommends setting a Content Security Policy at the reverse proxy without overwriting the existing CSP on /media. Its minimum directives are default-src 'self', img-src https: data:, object-src 'none', frame-ancestors 'self', and style-src and script-src with 'unsafe-inline'. Test before rollout, since CAPTCHA, error reporting, custom JavaScript or externally hosted images may need extra sources. It also recommends Strict-Transport-Security once all hosts use HTTPS, a restrictive Referrer-Policy and X-Content-Type-Options: nosniff.

Audit events and monitoring

authentik records events for logins, changes and administrative actions. The hardening documentation recommends reviewing Event retention (default 365 days) and forwarding events externally if needed. It also mentions the GDPR compliance setting, which deletes a user's events with the user; weigh that against your incident investigation needs before enabling it, and make sure forwarded copies are handled under your retention policy.

A practical monitoring set built from the events the documentation names:

  • login_failed and suspicious_request for brute force and probing.
  • impersonation_started and impersonation_ended for administrator impersonation.
  • model_created, model_updated and model_deleted for configuration change.
  • secret_view for viewing of secrets such as token values.

Correlate these with service account activity. A service account token used from a new network, or a burst of API calls from a token that is normally quiet, is the machine identity equivalent of a suspicious login.

Patching and security advisories

authentik's security policy states that it supports the latest patch release of the two most recent versions; at the time of writing those are 2026.5.x and 2026.8.x. Running anything older means running without security fixes.

The policy describes the disclosure process: reports are filed as private GitHub Security Advisories, severity is assigned using the NVD CVSS calculator, a CVE ID is requested from GitHub as authentik's CVE numbering authority where the issue qualifies, fixes are backported to supported versions, and an announcement with the fix release date and severity is sent at least 24 hours before the security fix is released. To receive those announcements, the policy points to the "authentik-security-announcements" Google Groups mailing list and the authentik Discord server. The documentation also maintains a CVEs section listing published advisories.

For an operations team that means: subscribe to the announcements list, use the 24-hour notice to prepare a change window, and plan regular upgrades so the instance never drops out of the supported range. Include outposts in upgrade planning, since they are separate deployments.

Common failure patterns

  • Hidden but live flows: unlinking Enrollment, Recovery or Passwordless flows from the login page and assuming they are disabled.
  • MFA that can be skipped: leaving "Not configured action" set to continue, so users without an enrolled authenticator pass straight through.
  • Weak recovery: a WebAuthn-only login flow paired with a recovery flow that relies only on an emailed link.
  • Superuser tokens in automation: scripts and integrations using API tokens linked to superuser accounts instead of scoped service accounts.
  • Tokens that never expire: non-expiring tokens created for convenience with no owner or review date.
  • Default deployment settings: unencrypted database connections, broad trusted proxy ranges and trace logging left on after troubleshooting.
  • Exposed metrics: outpost metrics on port 9300 reachable from untrusted networks.
  • Falling out of support: skipping upgrades until the running version no longer receives security fixes.

Practitioner checklist

  • Review every flow; bind policies to or delete Enrollment, Recovery and Passwordless flows that should not be public.
  • Set a 15-character minimum password policy with breached password checking and bind it to every flow where passwords are set.
  • Configure Authenticator Validation to force enrolment or deny, restrict to WebAuthn with user verification required, and apply the same scrutiny to recovery flows.
  • Enable "Pretend user exists", disable "Show matched user" and limit User Fields on the Identification stage.
  • Add reputation, CAPTCHA or GeoIP controls and notification rules for login_failed and suspicious_request.
  • Shorten session duration, disable Remember device if unused and enable "Terminate other sessions".
  • Reduce superusers, move administrators to roles, require phishing-resistant MFA and disable impersonation if unused.
  • Inventory all tokens and app passwords, remove superuser-linked automation tokens and set expiry on every token.
  • Restrict the "View token's key" permission and alert on secret_view.
  • Store outpost tokens and AUTHENTIK_SECRET_KEY in a secret manager and restrict port 9300 to trusted networks.
  • Set PostgreSQL SSL mode to verify-ca or verify-full, narrow trusted proxy CIDRs and keep logging at info.
  • Consider blocking expression and blueprint API endpoints at the reverse proxy and managing them as blueprints.
  • Subscribe to authentik security announcements and keep core and outposts on a supported version.

Standards and references

Related NHI Mgmt Group resources: Self-Hosted OIDC Issuer Security Guide · FIDO2 and WebAuthn Internals Guide · API Keys vs Service Accounts · Break-Glass Account Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 20 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.