Connect authentik to Cloudflare Access with Security Assertion Markup Language (SAML) 2.0.
- An authentik account with administrator access
- A Cloudflare account with Zero Trust access
- A publicly accessible authentik deployment with a trusted TLS certificate
Your Cloudflare Access team name is part of the Assertion Consumer Service (ACS) URL. Locate your team name before you configure authentik.
You can find your team name in the Cloudflare dashboard ↗︎ under Settings > Team name and domain > Team name.
- Log in to authentik as an administrator and open the Admin interface.
- Go to Applications > Applications and select New Application.
- Enter the application details and select Next.
- For the provider type, select SAML Provider.
- Configure the provider:
-
Enter a provider name and select an authorization flow.
-
For ACS URL, enter:
https://<YOUR_TEAM_NAME>.cloudflareaccess.com/cdn-cgi/access/callback -
For Audience, enter the same Cloudflare Access callback URL.
-
Select a Signing Certificate and keep Sign assertions turned on.
-
For Service Provider Binding, select Post.
-
For Default NameID Policy, select Email address.
-
- Select Create Application.
For more information about authentik provider settings, refer to Create a SAML provider ↗︎.
-
In the authentik Admin interface, go to Applications > Providers.
-
Select the SAML provider that you created for Cloudflare Access.
-
Record the following values. Replace
<AUTHENTIK_DOMAIN>with your authentik hostname and<APPLICATION_SLUG>with the associated application slug.Cloudflare field authentik value Single Sign-On URL https://<AUTHENTIK_DOMAIN>/application/saml/<APPLICATION_SLUG>/IdP Entity ID or Issuer URL https://<AUTHENTIK_DOMAIN>/application/saml/<APPLICATION_SLUG>/metadata/ -
Under Download signing certificate, select Download. Save the certificate for the Cloudflare configuration.
The metadata tab also contains the SAML endpoint, entity ID, and signing certificate. For more information, refer to SAML Provider ↗︎.
-
In Cloudflare Zero Trust, go to Integrations > Identity providers.
Go to Identity providers ↗ -
Select Add new identity provider > SAML.
-
Enter a name for the identity provider.
-
Enter the Single Sign-On URL and IdP Entity ID or Issuer URL from authentik.
-
For Signing certificate, paste the certificate downloaded from authentik.
-
Select Save.
-
In Cloudflare Zero Trust, go to Integrations > Identity providers.
Go to Identity providers ↗ -
Find the authentik identity provider and select Test.
-
Complete the authentik login flow.
-
Verify that Cloudflare displays a successful test result and the expected email address.