* stages/authenticator_duo: return a descriptive error when the Duo API is unreachable `_duo_import_devices` caught only `RuntimeError`, but `duo_client` surfaces transport failures as the underlying socket/TLS error. `SSLCertVerificationError` is an `OSError`, not a `RuntimeError`, so a Duo endpoint behind an untrusted certificate escaped the handler entirely and the request finished as a bare 405 with no actionable error. `OSError` is also in `authentik.lib.sentry.ignored_classes`, so the exception was dropped from error reporting too, leaving nothing to diagnose from. Catch the transport failures explicitly and map them to the documented 400 with a descriptive message, ordered narrowest-first since SSLCertVerificationError < SSLError < OSError: - certificate verification failure -> "TLS certificate verification failed." - any other TLS failure -> "TLS error." - any other connection failure -> "Failed to connect to Duo." The messages stay categorical and do not echo exception text, keeping the existing behaviour of not leaking internals to the API caller. closes #22896 * translate Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
What is authentik?
authentik is an open-source Identity Provider (IdP) for modern SSO. It supports SAML, OAuth2/OIDC, LDAP, RADIUS, and more, designed for self-hosting from small labs to large production clusters.
Our enterprise offering is available for organizations to securely replace existing IdPs such as Okta, Auth0, Entra ID, and Ping Identity for robust, large-scale identity management.
Installation
- Docker Compose: recommended for small/test setups. See the documentation.
- Kubernetes (Helm Chart): recommended for larger setups. See the documentation and the Helm chart repository.
- AWS CloudFormation: deploy on AWS using our official templates. See the documentation.
- DigitalOcean Marketplace: one-click deployment via the official Marketplace app. See the app listing.
Screenshots
| Light | Dark |
|---|---|
![]() |
![]() |
![]() |
![]() |
Development and contributions
See the Developer Documentation for information about setting up local build environments, testing your contributions, and our contribution process.
When you contribute documentation, either to accompany a code change or as a standalone contribution, please be sure to follow our documentation Style Guide.
Security
Please see SECURITY.md.
Adoption
Using authentik? We'd love to hear your story and feature your logo. Email us at hello@goauthentik.io or open a GitHub Issue/PR!



