{
    "componentChunkName": "component---src-pages-blog-markdown-remark-fields-slug-js",
    "path": "/blog/demystifying-saml",
    "result": {"data":{"markdownRemark":{"html":"<h2 id=\"table-of-contents\" style=\"position:relative;\"><a href=\"#table-of-contents\" aria-label=\"table of contents permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Table of Contents</h2>\n<ul>\n<li><a href=\"#introduction\">Introduction</a></li>\n<li><a href=\"#what-is-single-sign-on-sso\">What is Single Sign-On (SSO)?</a></li>\n<li><a href=\"#how-does-saml-authentication-work\">How Does SAML Authentication Work?</a></li>\n<li><a href=\"#the-benefits-of-saml-authentication\">The Benefits Of SAML Authentication</a></li>\n<li><a href=\"#what-is-the-difference-between-saml-and-sso\">What Is The Difference Between SAML and SSO?</a></li>\n<li><a href=\"#when-to-choose-saml-for-your-security-protocol\">When To Choose SAML For Your Security Protocol</a></li>\n<li><a href=\"#implementing-saml-authentication\">Implementing SAML Authentication</a></li>\n<li><a href=\"#wrapping-up\">Wrapping up</a></li>\n</ul>\n<h2 id=\"introduction\" style=\"position:relative;\"><a href=\"#introduction\" aria-label=\"introduction permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Introduction</h2>\n<p>SAML, the Security Assertion Markup Language, is a protocol released in 2000 to give people a way to authenticate themselves across domains. The XML standard had just been released a couple of years before and was a popular way to send data across the internet, so the idea was to make a protocol to send a variation of XML that could authenticate a user called a SAML assertion. Now, if a user needed to verify themselves across domains, they could log into one location and be verified at any other location that has a trust with that service.</p>\n<h2 id=\"what-is-single-sign-on-sso\" style=\"position:relative;\"><a href=\"#what-is-single-sign-on-sso\" aria-label=\"what is single sign on sso permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is Single Sign-On (SSO)?</h2>\n<p>Single Sign-on is a process where a user can authenticate themselves with an Identity Provider (IdP) and log into any other eligible Service Provider (SP) without re-entering their password. It’s the main goal that SAML sets out to accomplish. But if that’s unclear, let’s give a real-world example.</p>\n<p>Let’s pretend you’re a janitor in an office. You’ve got one of those massive key loops with hundreds of keys on them. Every time you go to open a door, you have to search through your massive key loop to find the right key for the right door. It’s an absolute headache. But your boss (Identity Provider) wants to help out, so they implement keycard readers at every door. Now instead of managing a bunch of keys (passwords) for every door (Service Provider), you have a single keycard (SAML assertion) that you can scan at every door for access.</p>\n<h2 id=\"how-does-saml-authentication-work\" style=\"position:relative;\"><a href=\"#how-does-saml-authentication-work\" aria-label=\"how does saml authentication work permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How Does SAML Authentication Work?</h2>\n<p>SAML works by having a user log in at an Identity Provider who generates a SAML assertion for the user. Then the user’s browser forwards the SAML assertion to the Service Provider to authenticate them. SAML SSO can be done with either an IdP initiated flow or an SP initiated flow. In an IdP initiated flow, the Identity Provider redirects you to the Service Provider after you’ve already been logged in, and you can access the Service Provider’s application. With an SP flow, a user starts the login process at the Service Provider and is redirected to the Identity Provider to log in. After logging in, they are redirected back to the Service Provider to use the application.</p>\n<p>Before either process happens for a user, the Identity Provider and Service Provider need to agree on a SAML configuration stating how the user data will be sent over. This is configured through the Identity Provider. The IdP must also give a copy of its public key to the Service Provider. Both the public key and configuration are bundled into an XML Metadata file that must be given to the Service Provider for SAML SSO to work. This process is called establishing a trust relationship.</p>\n<h2 id=\"the-benefits-of-saml-authentication\" style=\"position:relative;\"><a href=\"#the-benefits-of-saml-authentication\" aria-label=\"the benefits of saml authentication permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>The Benefits Of SAML Authentication</h2>\n<p>SAML authentication allows people to not have to manage multiple passwords for multiple programs. It’s useful inside large organizations that need to handle many employees as well. They can configure what applications people have access to through what’s called an Identity Access Management (IAM) platform. This allows an organization to easily provision and remove employee access in one location. A common IAM integration for SAML is Microsoft Entra ID, a cloud-based alternative to Microsoft’s Active Directory product.</p>\n<p>For an example of how this works, let’s say you started a new job at SuperWorkers. SuperWorkers will need to give you access to tools like Gsuite, Slack, and Salesforce. To make this process simple, SuperWorkers has put all of your information, such as your email address and what applications you are allowed to access, in Entra ID. Now they can configure Entra ID as an Identity Provider for the services you need to access, like Gsuite, Slack, and Salesforce, and you can log into Microsoft and access all of your services. If you ever need access to new platforms, they can change your permissions in Entra ID, and if you ever need to be offboarded, they can simply remove you from Entra ID instead of individually offboarding you from each platform.</p>\n<h2 id=\"what-is-the-difference-between-saml-and-sso\" style=\"position:relative;\"><a href=\"#what-is-the-difference-between-saml-and-sso\" aria-label=\"what is the difference between saml and sso permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What Is The Difference Between SAML and SSO?</h2>\n<p>Single Sign-on is a way to authenticate at one location and be authenticated at multiple other services, as we discussed earlier. SAML is a way to implement that process. There are other ways to implement SSO, such as OpenID Connect. Although they are different technologies, you can think of SSO as an umbrella of technologies that SAML falls under.</p>\n<h2 id=\"when-to-choose-saml-for-your-security-protocol\" style=\"position:relative;\"><a href=\"#when-to-choose-saml-for-your-security-protocol\" aria-label=\"when to choose saml for your security protocol permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>When To Choose SAML For Your Security Protocol</h2>\n<p>SAML is usually the main choice for large organizations who are using an IAM platform. If you’re building a service that caters to large organizations (B2B), it’s recommended to have an ability to allow Single Sign-on through SAML, as it’s common in that space. Otherwise, it’s much more common to use a service like OpenID Connect to handle SSO, especially in the B2C space.</p>\n<h2 id=\"implementing-saml-authentication\" style=\"position:relative;\"><a href=\"#implementing-saml-authentication\" aria-label=\"implementing saml authentication permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Implementing SAML Authentication</h2>\n<p>It’s possible to implement SAML authentication in Supertokens, our authentication platform. SuperTokens has a front-end and back-end SDK that makes integration simple and a core for managing user state.</p>\n<p>We’re going to walk through implementing SAML authentication using Microsoft’s Entra ID as the Identity provider. However, you can integrate with any SAML Identity Provider when using SuperTokens. We handle SAML integrations with Boxy HQ’s SAML Jackson product, which converts a SAML SSO flow to plug into an OAuth/OpenID Connect platform.</p>\n<p>Let’s get started.</p>\n<h3 id=\"microsoft-entra-id\" style=\"position:relative;\"><a href=\"#microsoft-entra-id\" aria-label=\"microsoft entra id permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Microsoft Entra ID</h3>\n<p>In order to integrate the SAML SSO flow, we first need to register an application with Entra ID. Head to the <a href=\"https://entra.microsoft.com/\" target=\"_blank\" rel=\"nofollow\">Microsoft Entra ID dashboard</a> and select <strong>Enterprise Applications</strong> on the left side.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/79c6c69dfd7b2d8fb0157c14521744a5/29007/ms-entra--setup-1.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAAsTAAALEwEAmpwYAAABuElEQVQozzWQ227aQBCG/SJVH64CpOYGwQ30LlWVNBdVVSEfCBC7Xu/a6z15ZtbGoJRnq9Yo39VIszv/NxN9mc0fHr4uFovZfDGbz78/PiZxnOz+xPEuSeIkidM0SdPkcHh9fn5aLper1Wq9Xm+3281mG1V1QGvt+95733s/jGPeDcMwjuN4uVwAUMq2kdIaCwB2YhiG2+0WHU+nPH8risIYg0Rnwr2jz5vjS1xdzx4QnTVtzVUj2qauqooxVlUh0VobPpdlyRiz1iLS6Clr4dMi+Zk113PvPZXS/UjF015mlfWEdwAAEaP8LcQyxpxz/WROREEQiYi8p9bCnrusckzB1A8ghjHRKWjnZVkqpbTWxhgAIMIwY8ITnXsaB4/QOedCKIQKoYs4523bKqWklEJwzrmUUmvdfYAIOElaY4UQdV23shHGcQ3ROI7X6/X9/R903bkPOTSZ33cjRAfwklavBYeumzyI+v5XUp4KEWVZdjweiyJvlGEKlQUIaXjfbei97fD3QZS8NsZOl4IOoOEtOhflRZHnOWfl/m/zbdekRdPUQmkdHn0w3RaMMULUUkrOubWGPP0HEeCHeBafOMAAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"setup 1\"\n        title=\"setup 1\"\n        src=\"/static/79c6c69dfd7b2d8fb0157c14521744a5/f058b/ms-entra--setup-1.png\"\n        srcset=\"/static/79c6c69dfd7b2d8fb0157c14521744a5/c26ae/ms-entra--setup-1.png 158w,\n/static/79c6c69dfd7b2d8fb0157c14521744a5/6bdcf/ms-entra--setup-1.png 315w,\n/static/79c6c69dfd7b2d8fb0157c14521744a5/f058b/ms-entra--setup-1.png 630w,\n/static/79c6c69dfd7b2d8fb0157c14521744a5/40601/ms-entra--setup-1.png 945w,\n/static/79c6c69dfd7b2d8fb0157c14521744a5/78612/ms-entra--setup-1.png 1260w,\n/static/79c6c69dfd7b2d8fb0157c14521744a5/29007/ms-entra--setup-1.png 1600w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Click on <strong>New application</strong> at the top of the page.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/bf94b80fc34bc9e6a8df3a3e392ecbe0/29007/ms-entra-setup-2.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.632911392405056%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABiElEQVQoz52Ry2obQRBF50MNsaKAjZB2FoR4ZYNICMSgUbzyzOjRPf2afsyjRxsp+gH7n26YEgYvEy0ONFR13bq3ktHnMW5vbvBlPMb1aIyrTyN8/XaP7z9+YrFY4OnpF1arFGm6xCpNkS6XeH7+jcfHB0wmE0ynU8xmM8znc9zdzZGUUkJKCe8cfNMjNC2c8zgc/+D17Q0x9mi7DjFGtF3Evu/RxYj9fo/D4UCcTiccj0cieclyFEWOzWaDUghYa1HX9XlA06CqKiilIJWCUIaorIU2BtZ5eB+ov2kaIsnyHNvtFpwx7BgD5xzOWpRSgHEOrRSJCKlRKoMdF9Cmgq4shDZQxpKA9x4hBCRFUdB2nDNSV1qja1vsFIdxjtSH5iGSOgSEcP7YNDW9h3pdh3OP9x8GMgYhJbTWVOhjj9h16P6T5CXLyDJjjLJyzlIWbdteRJLlBbIsI8ulUDBVRUoXDxw2XK/XdIxSSNpyKHQX2CXLebFG8X7psgTjjK462D4H/m+8x/QXlYdR7yOksGMAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"setup 2\"\n        title=\"setup 2\"\n        src=\"/static/bf94b80fc34bc9e6a8df3a3e392ecbe0/f058b/ms-entra-setup-2.png\"\n        srcset=\"/static/bf94b80fc34bc9e6a8df3a3e392ecbe0/c26ae/ms-entra-setup-2.png 158w,\n/static/bf94b80fc34bc9e6a8df3a3e392ecbe0/6bdcf/ms-entra-setup-2.png 315w,\n/static/bf94b80fc34bc9e6a8df3a3e392ecbe0/f058b/ms-entra-setup-2.png 630w,\n/static/bf94b80fc34bc9e6a8df3a3e392ecbe0/40601/ms-entra-setup-2.png 945w,\n/static/bf94b80fc34bc9e6a8df3a3e392ecbe0/78612/ms-entra-setup-2.png 1260w,\n/static/bf94b80fc34bc9e6a8df3a3e392ecbe0/29007/ms-entra-setup-2.png 1600w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Then click on <strong>Create your own application</strong> at the top. Input your application name, select <strong>Integrate any other application you don’t find in the gallery (Non-gallery)</strong> and click <strong>Create</strong>.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/274794440a0b6ae73cbbd5e3de6fc420/29007/ms-entra-setup-3.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.632911392405056%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAAsTAAALEwEAmpwYAAABxElEQVQoz2WO227TQBBA/akIGvyQtzyVBPEB3Co1iCDF9q7ttb32emd31pdISIB6eSlKXNIAJQLxlh9AgIKKCLhRQSpHo9GOZs7OWJ3bdrfbtW17Z6dz4+atwd17Dx/vPXi0tz988mz0dHQVw+H+YDDodDq2bfd6vX6/v7t7x2JJwpNECHF4eNQ0p0fHx5ynSumqrqsr6roGpQBkWRbGYNsoy8lkYjmuRwihlAohACCXkqcZT7e0D56mCecvXh1Mm/mbxbu358vF+w/LT59nTWM5rhsEPmMsjuMoigBAI+agBGghQci2zoQ4X378ur748n397cfF+uevzWazWq0s4nmUUsZYlmVxHDPGRJZpRB6SwCNKa62Vw/jzlweLs3nTzE6bZjadns3nr09OLEKI7/thGOa5zEUWeGOlQCmdROMx8QE0gLzvpk4sDGpQ/9BaW2PH2cqZEEpBgQqx3aa1KQwiamwdrdFU5XUsz/Nc12WM8TSlQRREqQR16SDPZMzzv2XxH5bjOJTSMAwlAJpC6XawMC0SVC4BEdGYuiwmVWmuyR4hnutS6rMoClkohNC63bPN7eGIZYGjQDhxXhV4+Xkbf+Tfb0WT7xRiessAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"setup\"\n        title=\"setup\"\n        src=\"/static/274794440a0b6ae73cbbd5e3de6fc420/f058b/ms-entra-setup-3.png\"\n        srcset=\"/static/274794440a0b6ae73cbbd5e3de6fc420/c26ae/ms-entra-setup-3.png 158w,\n/static/274794440a0b6ae73cbbd5e3de6fc420/6bdcf/ms-entra-setup-3.png 315w,\n/static/274794440a0b6ae73cbbd5e3de6fc420/f058b/ms-entra-setup-3.png 630w,\n/static/274794440a0b6ae73cbbd5e3de6fc420/40601/ms-entra-setup-3.png 945w,\n/static/274794440a0b6ae73cbbd5e3de6fc420/78612/ms-entra-setup-3.png 1260w,\n/static/274794440a0b6ae73cbbd5e3de6fc420/29007/ms-entra-setup-3.png 1600w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Now that our application is created, we need to set up Single Sign-On. Select <strong>Single Sign-On</strong> from the sidebar and choose the <strong>SAML</strong> option.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/a58f6ba4778076b9b0a2080ba3cc3ddb/29007/ms-entra-setup-5.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.632911392405056%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABuUlEQVQoz42SS48SQRSF+4cak1GSMQR2Q+K4Y00cRxA1Q1c32F2Ppt8wgCQ8Apo2rNmzZkPChoTdMXW1Rp2Y6OJLVapunXtOVVkXz57jxeUlSqUS9PzJ0wu8vH6Fm5vXaDQauL19g1ariVbzB83mW7TbbdTrdZTLZVQqFVSrVdRqNVxd1WBxKSGlRBzHyIb3SLIceZ4jTVNaGwwGGI1GxHg8fmA6nWKxWDwwn88xm81gdWwGhzF0u11wIRAEAQlGUQTOOeH7PnzO4XFBzYUQUEohyzKq1aPBshlDr9eD73nwhUA/DGkjCkMIzhEoBSUl7kcTrL98RVEU2Gw2WC6XlMKI6iQay3EccqcF4zTFcDgk64GS+NB+B9a5w93H9/hWFDidTjgcDjifz9jtduRUJ9CpkiShs5br/hLM8hyfJxOsVyskcQTBfRL2PvWwXq9wPB6x3+9JdLvdkkPtysQmh7ZtU2TP8yCVRBiGSNOMivV96e56zcTSLjQm4mMsxhxoURIMFB02m7qrFtZowcdCfxO2OrYN13XpJYVU9Lq/F5q5cfYvLOa4YD9fWn+LoN9Hnmd/fIX/wVzJd0OVV+MB4JS9AAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"setup 4\"\n        title=\"setup 4\"\n        src=\"/static/a58f6ba4778076b9b0a2080ba3cc3ddb/f058b/ms-entra-setup-5.png\"\n        srcset=\"/static/a58f6ba4778076b9b0a2080ba3cc3ddb/c26ae/ms-entra-setup-5.png 158w,\n/static/a58f6ba4778076b9b0a2080ba3cc3ddb/6bdcf/ms-entra-setup-5.png 315w,\n/static/a58f6ba4778076b9b0a2080ba3cc3ddb/f058b/ms-entra-setup-5.png 630w,\n/static/a58f6ba4778076b9b0a2080ba3cc3ddb/40601/ms-entra-setup-5.png 945w,\n/static/a58f6ba4778076b9b0a2080ba3cc3ddb/78612/ms-entra-setup-5.png 1260w,\n/static/a58f6ba4778076b9b0a2080ba3cc3ddb/29007/ms-entra-setup-5.png 1600w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Click the <strong>Edit</strong> button in the Basic SAML Configuration.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/a0d445090447c0b0aa1f9f23358d9cfb/29007/ms-entra-setup-4.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.632911392405056%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABsElEQVQoz22S227aQBCG/ZBVlaRIKYK7UrW9bm4aKRU0fQNsc/B6T7bX67UBIQFXyXP91UwxooeLXyOvZ775Z2ej27t3eH9/j8FggJvbO7x5e4NPn7/g+9MTHh+/cfwxm2E2m/7WdIqfz894ePiK4XCI8XiM0WiEyeQDJpOPiHKtoZRCVVXwTQNXe3jfoK5rlGWJuvboug6bzQbb7Ra73Q5dt8F+v8fpdMLxeOR4OBxY0TxOkKYJlsslRC6htYb3Hs45bkTfJIIXRXGJJGpKuddi4Gq1gsgySK1RVQ4hBBRlBaUtjC1gjIGxliHUyLmKi5sQ0LYtQmg5kqLFYnEBCqUglYKncWuPXCoopdmJsxbBe7Rdx4Uvr688ftM0Z2hgRUmSgKBCCFYuBGrn2IGUEsZoTiyLgs/6wl497OJwPo+xWi2RZRmMNTwS/SjrBkZrWGvZITn5V/8BxkmCOI4hMgGpFQMooWsDtFYMo8R+OdfjXTv8Y2TaMDlU5232DpU2lwYEpqfVF9LT6h1eK0rSFGmaYr1eI8sVjLFoCeAbSKl4swQgGMGpoTvfMY39953+Aqi1T0aQovWZAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"setup 5\"\n        title=\"setup 5\"\n        src=\"/static/a0d445090447c0b0aa1f9f23358d9cfb/f058b/ms-entra-setup-4.png\"\n        srcset=\"/static/a0d445090447c0b0aa1f9f23358d9cfb/c26ae/ms-entra-setup-4.png 158w,\n/static/a0d445090447c0b0aa1f9f23358d9cfb/6bdcf/ms-entra-setup-4.png 315w,\n/static/a0d445090447c0b0aa1f9f23358d9cfb/f058b/ms-entra-setup-4.png 630w,\n/static/a0d445090447c0b0aa1f9f23358d9cfb/40601/ms-entra-setup-4.png 945w,\n/static/a0d445090447c0b0aa1f9f23358d9cfb/78612/ms-entra-setup-4.png 1260w,\n/static/a0d445090447c0b0aa1f9f23358d9cfb/29007/ms-entra-setup-4.png 1600w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>And add the following values to your application:</p>\n<ul>\n<li><strong>Entity ID</strong> - <code class=\"language-text\">https://saml.boxyhq.com</code></li>\n<li><strong>Reply URL</strong> - <code class=\"language-text\">http://localhost:5225/api/oauth/saml</code></li>\n</ul>\n<p>Then click <strong>Save</strong> at the top.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/57cae5801fe7c643aa057ad2453b514a/29007/ms-entra-setup-6.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.632911392405056%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB8klEQVQozz2QTW8SURSG538aU2RBYGftQk1srE1qqLZJ3cPAwGXux9zPuUOJiVBsWLCBlJVJq8FfIHPnQoeBLpRp6pOzfc57zusUXhRLpVKxWNwrFJ4933v95u3Z2efTavX8/OzLxcXHk5Pj4w9HR+8/nVYPD9+VSqVyuVypVPb3X746OHA6CCEIOedShUKpUGspJaVMShVFUb8/+H59PRqNxuPxZDKZzW5mNzez2Ww6nQ4GA6dWdxuu6zWbvg8JwUpKIQRCCGOEELq9vV0sFsaYxFpjEmNMHMeLOLbWdrvdndxqtQAAPkKMca3DgHKIAxJQgvGPu/kfuzartVllNt3YdGvTzX2arpbLy8tLx3XdZrMJAOhA6ENfCUG57MBdLGfs7ucvkySxie1ymWXZZrvNss3D9mG9Xvd6PafRaHiet5M7/k6WUkoFISSEKKXm898re2+N3aw3WZplabZarmySJMbs5Fqt7nleu93GhHDOtdZUKIwxpVQppbu9Xu9r/1t/eDV8mqthThRFTt116/U6AABiFARBGIZahxD6nIsw1BghANp5f/ixQoQQeYpxarXa488QIsZYFOXJJGCMaa0JIRBCxhjPEULInN1RWjtuo9lw88I7EBMShiEXAgAQBIFSitIAYxzkEEIopf+3/JP/AkfEprFNrO4xAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"setup 6\"\n        title=\"setup 6\"\n        src=\"/static/57cae5801fe7c643aa057ad2453b514a/f058b/ms-entra-setup-6.png\"\n        srcset=\"/static/57cae5801fe7c643aa057ad2453b514a/c26ae/ms-entra-setup-6.png 158w,\n/static/57cae5801fe7c643aa057ad2453b514a/6bdcf/ms-entra-setup-6.png 315w,\n/static/57cae5801fe7c643aa057ad2453b514a/f058b/ms-entra-setup-6.png 630w,\n/static/57cae5801fe7c643aa057ad2453b514a/40601/ms-entra-setup-6.png 945w,\n/static/57cae5801fe7c643aa057ad2453b514a/78612/ms-entra-setup-6.png 1260w,\n/static/57cae5801fe7c643aa057ad2453b514a/29007/ms-entra-setup-6.png 1600w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Scroll down to section 3 and download the Federation Metadata XML—we’ll need this later to upload into SAML Jackson.</p>\n<p>Click <strong>Users and groups</strong> on the sidebar and then <strong>Add user/group</strong> at the top of the page.</p>\n<p>Select <strong>None Selected</strong> then click your username and click <strong>Select</strong>. Then click the <strong>Assign</strong> button to add yourself as a user for this app. If a user is not assigned to the app in Entra ID, then they won’t be able to use SSO to log in.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/9ecf9ff66fe1fc21f8018654ec4ae86b/29007/ms-entra-setup-7.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.632911392405056%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABtUlEQVQoz32ST28SQRiH94sapZiQEI54MMaDPdSLsRT0YncXFlIpsLPM7M4i7C7cjKVtQguCH+cxO7YIDXp4Mu/8+72/d96xCkdFSqUSL4tFXhSOePa8wOs3b/nw8ZT3JyfUaqc0GnUa9TND/azG508Njo/fUS6XqVQqhmq1SrX6Cuui26Xb7SKEQCmJED5SKSKtUWH8BE0Uf0PHY0bjlDSbkkwmzGYzptMp0yzDOrcdXNeh2WwiRZ9RGDDWklE0pN/rMxj4+L5g4Asz+iJAiMDEvYGP+/WSQb/PcCgNlu04tNtt2m0PHY+4ms+5vbnmen7FaJIQj8dkaUqWpaRpQpJMDLmbJEkIlEIpRRiGBst1XVqtFp1OB9/3UVIipTTj99sFP+5XbFZLNps1m/WK9c8ly7sFvzZr7u8WaB0RRX+xmq6L53nGZRAEaK3NRp4tChU6DFE5uZMHF6GZh3vOtg6/nNt7go9iW6J9B9tkO+d2Y8txXRzbPiz4KPJw6ZDwLqbkc9s2Hc7f8GnJsQpM2YfE/pXActym+TYtz6PXu2QYBH+aohQXyQ1BnKJkvqbM+v/IBX8DNX5aeXJiC0YAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"setup 7\"\n        title=\"setup 7\"\n        src=\"/static/9ecf9ff66fe1fc21f8018654ec4ae86b/f058b/ms-entra-setup-7.png\"\n        srcset=\"/static/9ecf9ff66fe1fc21f8018654ec4ae86b/c26ae/ms-entra-setup-7.png 158w,\n/static/9ecf9ff66fe1fc21f8018654ec4ae86b/6bdcf/ms-entra-setup-7.png 315w,\n/static/9ecf9ff66fe1fc21f8018654ec4ae86b/f058b/ms-entra-setup-7.png 630w,\n/static/9ecf9ff66fe1fc21f8018654ec4ae86b/40601/ms-entra-setup-7.png 945w,\n/static/9ecf9ff66fe1fc21f8018654ec4ae86b/78612/ms-entra-setup-7.png 1260w,\n/static/9ecf9ff66fe1fc21f8018654ec4ae86b/29007/ms-entra-setup-7.png 1600w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h3 id=\"prepare-supertokens\" style=\"position:relative;\"><a href=\"#prepare-supertokens\" aria-label=\"prepare supertokens permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Prepare SuperTokens</h3>\n<p>In order to set up SuperTokens, we need to download our quickstart which contains the front-end and back-end SDK along with the SuperTokens core, which manages user and session state for SuperTokens. Since SAML is commonly used for corporate integrations, we’ll make this project a multitenant project.</p>\n<p>First, download the SuperTokens core and run it using Docker:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"52417276912047600000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`docker run -p 3567:3567 -d registry.supertokens.io/supertokens/supertokens-postgresql:9.1.2`, `52417276912047600000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">docker</span> run -p <span class=\"token number\">3567</span>:3567 -d registry.supertokens.io/supertokens/supertokens-postgresql:9.1.2</code></pre></div>\n<h3 id=\"connect-supertokens-to-local-core\" style=\"position:relative;\"><a href=\"#connect-supertokens-to-local-core\" aria-label=\"connect supertokens to local core permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Connect SuperTokens to local core</h3>\n<p>To connect your project to your locally running core, head to the <code class=\"language-text\">backend/config.ts</code> and change the connectionURI to <code class=\"language-text\">http://localhost:3567</code>.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"81820469708899660000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`import supertokens from &quot;supertokens-node&quot;;\n\nsupertokens.init({\n    supertokens: {\n        connectionURI: &quot;http://localhost:3567&quot;,\n        // only required for production\n        apiKey: &quot;<YOUR API KEY>&quot;,\n    },\n    appInfo: {\n        apiDomain: &quot;...&quot;,\n        appName: &quot;...&quot;,\n        websiteDomain: &quot;...&quot;,\n    },\n    recipeList: [],\n});`, `81820469708899660000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"ts\"><pre class=\"language-ts\"><code class=\"language-ts\"><span class=\"token keyword\">import</span> supertokens <span class=\"token keyword\">from</span> <span class=\"token string\">\"supertokens-node\"</span><span class=\"token punctuation\">;</span>\n\nsupertokens<span class=\"token punctuation\">.</span><span class=\"token function\">init</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n    supertokens<span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n        connectionURI<span class=\"token operator\">:</span> <span class=\"token string\">\"http://localhost:3567\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token comment\">// only required for production</span>\n        apiKey<span class=\"token operator\">:</span> <span class=\"token string\">\"&lt;YOUR API KEY>\"</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    appInfo<span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n        apiDomain<span class=\"token operator\">:</span> <span class=\"token string\">\"...\"</span><span class=\"token punctuation\">,</span>\n        appName<span class=\"token operator\">:</span> <span class=\"token string\">\"...\"</span><span class=\"token punctuation\">,</span>\n        websiteDomain<span class=\"token operator\">:</span> <span class=\"token string\">\"...\"</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    recipeList<span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p>Now that we’ve configured our project, we can start setting up SAML Jackson.</p>\n<h3 id=\"start-the-saml-jackson-service\" style=\"position:relative;\"><a href=\"#start-the-saml-jackson-service\" aria-label=\"start the saml jackson service permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Start the SAML Jackson service</h3>\n<p>Run the following command to download and run the SAML Jackson docker container:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"30066539148845474000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`docker run \\\n  -p 5225:5225 \\\n  -e JACKSON_API_KEYS=&quot;secret&quot; \\\n  -e DB_ENGINE=&quot;mem&quot; \\\n  -e NEXTAUTH_SECRET=&quot;super-secret&quot; \\\n  -e NEXTAUTH_ADMIN_CREDENTIALS=&quot;admin@company.com:secretpassword&quot; \\\n  -d boxyhq/jackson`, `30066539148845474000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">docker</span> run <span class=\"token punctuation\">\\</span>\n  -p <span class=\"token number\">5225</span>:5225 <span class=\"token punctuation\">\\</span>\n  -e <span class=\"token assign-left variable\">JACKSON_API_KEYS</span><span class=\"token operator\">=</span><span class=\"token string\">\"secret\"</span> <span class=\"token punctuation\">\\</span>\n  -e <span class=\"token assign-left variable\">DB_ENGINE</span><span class=\"token operator\">=</span><span class=\"token string\">\"mem\"</span> <span class=\"token punctuation\">\\</span>\n  -e <span class=\"token assign-left variable\">NEXTAUTH_SECRET</span><span class=\"token operator\">=</span><span class=\"token string\">\"super-secret\"</span> <span class=\"token punctuation\">\\</span>\n  -e <span class=\"token assign-left variable\">NEXTAUTH_ADMIN_CREDENTIALS</span><span class=\"token operator\">=</span><span class=\"token string\">\"admin@company.com:secretpassword\"</span> <span class=\"token punctuation\">\\</span>\n  -d boxyhq/jackson</code></pre></div>\n<p>This will start the SAML Jackson server on <code class=\"language-text\">http://localhost:5225</code>.</p>\n<h3 id=\"add-your-xml-to-boxxy-saml\" style=\"position:relative;\"><a href=\"#add-your-xml-to-boxxy-saml\" aria-label=\"add your xml to boxxy saml permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add your XML to Boxxy SAML</h3>\n<p>Run the following command to configure SAML Jackson with your downloaded xml, replacing the encodedRawData with a base64 encoded copy of your XML file.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"29171190742701203000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`curl --location --request POST 'http://localhost:5225/api/v1/saml/config' \\\n--header 'Authorization: Api-Key secret' \\\n--header 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode 'encodedRawMetadata=<BASE_64_XML>' \\\n--data-urlencode 'defaultRedirectUrl=http://localhost:3000/auth/callback/saml-jackson' \\\n--data-urlencode 'redirectUrl=[&quot;http://localhost:3000/*&quot;]' \\\n--data-urlencode &quot;tenant=tenant1&quot; \\\n--data-urlencode 'product=supertokens' \\\n--data-urlencode 'name=supertokens-config' \\\n--data-urlencode 'description=SuperTokens + BOXYHQ SAML config'`, `29171190742701203000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">curl</span> --location --request POST <span class=\"token string\">'http://localhost:5225/api/v1/saml/config'</span> <span class=\"token punctuation\">\\</span>\n--header <span class=\"token string\">'Authorization: Api-Key secret'</span> <span class=\"token punctuation\">\\</span>\n--header <span class=\"token string\">'Content-Type: application/x-www-form-urlencoded'</span> <span class=\"token punctuation\">\\</span>\n--data-urlencode <span class=\"token string\">'encodedRawMetadata=&lt;BASE_64_XML>'</span> <span class=\"token punctuation\">\\</span>\n--data-urlencode <span class=\"token string\">'defaultRedirectUrl=http://localhost:3000/auth/callback/saml-jackson'</span> <span class=\"token punctuation\">\\</span>\n--data-urlencode <span class=\"token string\">'redirectUrl=[\"http://localhost:3000/*\"]'</span> <span class=\"token punctuation\">\\</span>\n--data-urlencode <span class=\"token string\">\"tenant=tenant1\"</span> <span class=\"token punctuation\">\\</span>\n--data-urlencode <span class=\"token string\">'product=supertokens'</span> <span class=\"token punctuation\">\\</span>\n--data-urlencode <span class=\"token string\">'name=supertokens-config'</span> <span class=\"token punctuation\">\\</span>\n--data-urlencode <span class=\"token string\">'description=SuperTokens + BOXYHQ SAML config'</span></code></pre></div>\n<p>It will output a client id and client secret; save those for the following steps.</p>\n<h3 id=\"add-and-configure-supertokens-tenants\" style=\"position:relative;\"><a href=\"#add-and-configure-supertokens-tenants\" aria-label=\"add and configure supertokens tenants permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add and configure SuperTokens tenants</h3>\n<p>Run the following command to add a tenant to SuperTokens that supports SSO:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"96201311800489900000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`curl --location --request PUT 'http://localhost:3567/recipe/multitenancy/tenant' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    &quot;tenantId&quot;: &quot;tenant1&quot;,\n    &quot;emailPasswordEnabled&quot;: false,\n    &quot;thirdPartyEnabled&quot;: true,\n    &quot;passwordlessEnabled&quot;: false\n}'`, `96201311800489900000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">curl</span> --location --request PUT <span class=\"token string\">'http://localhost:3567/recipe/multitenancy/tenant'</span> <span class=\"token punctuation\">\\</span>\n--header <span class=\"token string\">'Content-Type: application/json'</span> <span class=\"token punctuation\">\\</span>\n--data-raw <span class=\"token string\">'{\n    \"tenantId\": \"tenant1\",\n    \"emailPasswordEnabled\": false,\n    \"thirdPartyEnabled\": true,\n    \"passwordlessEnabled\": false\n}'</span></code></pre></div>\n<h3 id=\"add-boxy-saml-login-to-tenant1\" style=\"position:relative;\"><a href=\"#add-boxy-saml-login-to-tenant1\" aria-label=\"add boxy saml login to tenant1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add boxy-saml login to tenant1</h3>\n<p>Now run the following command to connect your SSO integration with SAML Jackson. The API key is only required for production.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"83778195575611970000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`curl --location --request PUT 'http://localhost:3567/tenant1/recipe/multitenancy/config/thirdparty' \\\n--header 'api-key: <API_KEY>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  &quot;config&quot;: {\n    &quot;thirdPartyId&quot;: &quot;boxy-saml&quot;,\n    &quot;name&quot;: &quot;SAML Login&quot;,\n    &quot;clients&quot;: [\n      {\n        &quot;clientId&quot;: &quot;<ClientID from curling to Boxxy HQ>&quot;,\n        &quot;clientSecret&quot;: &quot;<ClientSecret from curling to Boxxy HQ>&quot;,\n        &quot;additionalConfig&quot;: {\n          &quot;boxyURL&quot;: &quot;http://localhost:5225&quot;\n        }\n      }\n    ]\n  }\n}'`, `83778195575611970000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">curl</span> --location --request PUT <span class=\"token string\">'http://localhost:3567/tenant1/recipe/multitenancy/config/thirdparty'</span> <span class=\"token punctuation\">\\</span>\n--header <span class=\"token string\">'api-key: &lt;API_KEY>'</span> <span class=\"token punctuation\">\\</span>\n--header <span class=\"token string\">'Content-Type: application/json'</span> <span class=\"token punctuation\">\\</span>\n--data-raw <span class=\"token string\">'{\n  \"config\": {\n    \"thirdPartyId\": \"boxy-saml\",\n    \"name\": \"SAML Login\",\n    \"clients\": [\n      {\n        \"clientId\": \"&lt;ClientID from curling to Boxxy HQ>\",\n        \"clientSecret\": \"&lt;ClientSecret from curling to Boxxy HQ>\",\n        \"additionalConfig\": {\n          \"boxyURL\": \"http://localhost:5225\"\n        }\n      }\n    ]\n  }\n}'</span></code></pre></div>\n<h3 id=\"test-the-application\" style=\"position:relative;\"><a href=\"#test-the-application\" aria-label=\"test the application permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Test the application</h3>\n<p>Run <code class=\"language-text\">npm run start</code> to start the application. Go to <code class=\"language-text\">http://localhost:3000</code> in your browser, select tenant 1, and log in with SAML. Once you log in, you’ll be able to see the success screen with your user ID.</p>\n<h2 id=\"wrapping-up\" style=\"position:relative;\"><a href=\"#wrapping-up\" aria-label=\"wrapping up permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Wrapping up</h2>\n<p>Although other alternatives for SSO exist, SAML is still a common SSO option for large companies tying into IAM platforms. It may be an older technology than alternatives like OpenID Connect, but that in no way makes it an invalid option. If you’re building an application in the B2B space, try building your application with SuperTokens!</p>","frontmatter":{"date":"August 20, 2024","title":"Demystifying SAML: A Comprehensive Guide","cover":"demystifying-saml.png","author":"Connor Peshek","description":"SAML is an authentication standard created to address the growing need of federated identity. In this blog we go over what SAML is and what makes it special."},"fields":{"slug":"/demystifying-saml/"}},"site":{"siteMetadata":{"title":"SuperTokens Blog"}}},"pageContext":{"id":"f7701607-f3d9-5b83-b13f-b3ed8205d21d","fields__slug":"/demystifying-saml/","__params":{"fields__slug":"demystifying-saml"}}},
    "staticQueryHashes": []}