Setting up SnowMirror Integration with Authentik SAML IDP

Security Assertion Markup Language (SAML) is an XML-based standard for exchanging authentication and authorization data between parties, in particular, between an identity provider (IDP) and a service provider (SP). In this article, we will walk through how to set up a SnowMirror SP integration with Authentik SAML IDP.

Overview

The SAML flow allows you to authenticate a user's identity and obtain a SAML response that can be used to interact with Authentik SAML IDP on their behalf. Here are the steps involved in setting up a SnowMirror integration with Authentik SAML IDP:

  1. Create SAML Property Mappings

  2. Set up a SAML Provider in Authentik

  3. Create an application in Authentik

  4. Create Groups and assign users in Authentik

  5. Configure the SnowMirror Security Real

We'll go through each of these steps in detail below.

Step 1: Create SAML Property Mappings

Login to your Authentik admin interface and

  1. Browse to the Customisation > Property Mappings section from the left sidebar

  2. Click the Create button.

  3. Select SAML Property Mapping and then click Next.

    SAML Property Mapping

Then use the following values to create the property and click Finish.

ParameterValue
NameSnowMirror SAML Mapping: Groups
SAML Attribute Namegroups
Expressionfor group in request.user.ak_groups.all(): yield group.name

New Property Mapping

Step 2: Set up a SAML Provider in Authentik

The first step is to create a Authentik Provider. To do this, follow these steps:

  1. Browse to the Applications > Providers section from the left sidebar

  2. Click the Create button.

    Create provider

  3. Select "SAML Provider" and Click on "Next"

    New Application

Then use the following values to create the provider and click Finish.

ParameterValue
NameSnowMirror
Authorization flowdefault-provider-authorization-implicit-consent
ACS URLhttps://snowmirror.company/saml/SSO
IssuerSnowMirror
Service Provider BindingPost
Property MappingSnowMirror SAML Mapping: Groups,

authentik Default SAML Mapping: User ID |

SAML Provider

⚠️ WARNING
The ACS URL is an example URLs only and will not work in your setup. You need to replace snowmirror.company with the FQDN of your SnowMirror server

Step 3: Create an application in Authentik

  1. Click the Create button under the "Assigned to application" heading that's now showing for the SnowMirror provider in Authentik.

New application

  1. Populate the form with the information pictured below and then click the Create button:
ParameterValue
NameSnowMirror
slugsnowmirror
ProviderSnowMirror

Create application

4. Create Groups and assign users in Authentik

  1. Browse to the Directory > Groups section from the left sidebar

  2. Click the Create button.

  3. Enter SUPER_ADMINISTRATOR and click Create

    Create Group

  4. Setup additional SnowMirror Groups if required

    Create Groups

  5. Select the Group for which you would like to add users to and select Users from the top tab bar.

  6. Click on Add Existing User

    Add User

  7. Select the user and click Add

Step 5: Configure the SnowMirror Security Real

Login to your SnowMirror admin interface and

  1. Browse to the Settings > User Management section from the top menu

  2. Click the Configure Security Realm button Then use the following values to create the Security Realm and click Save.

ParameterValue
Security RealmSSO
Entity IdSnowMirror
IdP Metadatacopy the Metadata from the Authentik provider created in Step 2
Internal RealmEnabled

SnowMirror Security Realm

Click logout and login to your SnowMirror using your SnowMirror FQDN.

0
Subscribe to my newsletter

Read articles from Mike van den Berge directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Mike van den Berge
Mike van den Berge