<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mike van den Berge</title>
    <description>The latest articles on DEV Community by Mike van den Berge (@mikevdberge).</description>
    <link>https://dev.to/mikevdberge</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F712257%2F887ee9fa-5579-46e1-a96b-0a669ce01462.jpeg</url>
      <title>DEV Community: Mike van den Berge</title>
      <link>https://dev.to/mikevdberge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mikevdberge"/>
    <language>en</language>
    <item>
      <title>Setting up SnowMirror Integration with Authentik SAML IDP</title>
      <dc:creator>Mike van den Berge</dc:creator>
      <pubDate>Tue, 22 Aug 2023 15:20:15 +0000</pubDate>
      <link>https://dev.to/mikevdberge/setting-up-snowmirror-integration-with-authentik-saml-idp-2eff</link>
      <guid>https://dev.to/mikevdberge/setting-up-snowmirror-integration-with-authentik-saml-idp-2eff</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create SAML Property Mappings&lt;/li&gt;
&lt;li&gt;Set up a SAML Provider in Authentik&lt;/li&gt;
&lt;li&gt;Create an application in Authentik&lt;/li&gt;
&lt;li&gt;Create Groups and assign users in Authentik&lt;/li&gt;
&lt;li&gt;Configure the SnowMirror Security Real&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We'll go through each of these steps in detail below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Create SAML Property Mappings
&lt;/h3&gt;

&lt;p&gt;Login to your Authentik admin interface and &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Browse to the Customisation &amp;gt; Property Mappings section from the left sidebar&lt;/li&gt;
&lt;li&gt;Click the Create button. &lt;/li&gt;
&lt;li&gt;Select SAML Property Mapping and then click Next.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ajUYBotI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/27zo3mrwrkufrbjub131.png" alt="SAML Property Mapping" width="800" height="543"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then use the following values to create the property and click Finish.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;SnowMirror SAML Mapping: Groups&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SAML Attribute Name&lt;/td&gt;
&lt;td&gt;groups&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression&lt;/td&gt;
&lt;td&gt;for group in request.user.ak_groups.all(): yield group.name&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---SqNFMzp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2vvgtxcmh3mptmsf7vk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---SqNFMzp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2vvgtxcmh3mptmsf7vk.png" alt="New Property Mapping" width="800" height="550"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Set up a SAML Provider in Authentik
&lt;/h3&gt;

&lt;p&gt;The first step is to create a Authentik Provider. To do this, follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Browse to the Applications &amp;gt; Providers section from the left sidebar&lt;/li&gt;
&lt;li&gt;Click the Create button.
 
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8fA7AAov--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9dof5dub4mm7f38352km.png" alt="Create provider" width="496" height="64"&gt;

&lt;/li&gt;
&lt;li&gt;Select "SAML Provider" and Click on "Next"
 
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h4KNUMpq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fsuilheypiurxxlvuzve.png" alt="New Application" width="800" height="539"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
Then use the following values to create the provider and click Finish.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;SnowMirror&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authorization flow&lt;/td&gt;
&lt;td&gt;default-provider-authorization-implicit-consent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ACS URL&lt;/td&gt;
&lt;td&gt;&lt;a href="https://snowmirror.company/saml/SSO"&gt;https://snowmirror.company/saml/SSO&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Issuer&lt;/td&gt;
&lt;td&gt;SnowMirror&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Service Provider Binding&lt;/td&gt;
&lt;td&gt;Post&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Property Mapping&lt;/td&gt;
&lt;td&gt;SnowMirror SAML Mapping: Groups,&lt;br&gt; authentik Default SAML Mapping: User ID&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--87DyJsl6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lzgayox79l5944c39rs2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--87DyJsl6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lzgayox79l5944c39rs2.png" alt="SAML Provider" width="800" height="545"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BDax89Kg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3jmd8kf0ju1aq7qstt3o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BDax89Kg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3jmd8kf0ju1aq7qstt3o.png" alt="SAML Provider Part 2" width="800" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;⚠️ WARNING&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;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&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Step 3: Create an application in Authentik
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Click the Create button under the "Assigned to application" heading that's now showing for the SnowMirror provider in Authentik.

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1AsJ4mKk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5o4rfh8ns34r33tckg6g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1AsJ4mKk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5o4rfh8ns34r33tckg6g.png" alt="New application" width="800" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Populate the form with the information pictured below and then click the Create button:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;SnowMirror&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;slug&lt;/td&gt;
&lt;td&gt;snowmirror&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provider&lt;/td&gt;
&lt;td&gt;SnowMirror&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BAVg29EG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1loghflv2qz90m9woymf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BAVg29EG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1loghflv2qz90m9woymf.png" alt="Create application" width="800" height="571"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Create Groups and assign users in Authentik
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Browse to the Directory &amp;gt; Groups section from the left sidebar&lt;/li&gt;
&lt;li&gt;Click the Create button. &lt;/li&gt;
&lt;li&gt;Enter SUPER_ADMINISTRATOR and click Create
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FfszJv3O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v5j50boxyrohhmjhqssf.png" alt="Create Group" width="800" height="319"&gt;
&lt;/li&gt;
&lt;li&gt;Setup additional SnowMirror Groups if required
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SpHHKtZC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8hb7fegqkw87a7cx55f.png" alt="Create Groups" width="506" height="377"&gt;
&lt;/li&gt;
&lt;li&gt;Select the Group for which you would like to add users to and select Users from the top tab bar.&lt;/li&gt;
&lt;li&gt;Click on Add Existing User
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fmu2uBav--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i6quqb2oukrlbdborqz4.png" alt="Add User" width="800" height="232"&gt;
&lt;/li&gt;
&lt;li&gt;Select the user and click Add&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 5: Configure the SnowMirror Security Real
&lt;/h3&gt;

&lt;p&gt;Login to your SnowMirror admin interface and &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Browse to the Settings &amp;gt; User Management section from the top menu&lt;/li&gt;
&lt;li&gt;Click the Configure Security Realm button
Then use the following values to create the Security Realm and click Save.&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Security Realm&lt;/td&gt;
&lt;td&gt;SSO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Entity Id&lt;/td&gt;
&lt;td&gt;SnowMirror&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IdP Metadata&lt;/td&gt;
&lt;td&gt;copy the Metadata from the Authentik provider created in &lt;strong&gt;Step 2&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Internal Realm&lt;/td&gt;
&lt;td&gt;Enabled&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gk4uZ4Us--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3v9f5a1kagjzn1dhn00.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gk4uZ4Us--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3v9f5a1kagjzn1dhn00.png" alt="SnowMirror Security Realm" width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click logout and login to your SnowMirror using your SnowMirror FQDN.&lt;/p&gt;

</description>
      <category>snowmirror</category>
      <category>saml</category>
      <category>servicenow</category>
      <category>authentik</category>
    </item>
  </channel>
</rss>
