<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rajat Panwar on Medium]]></title>
        <description><![CDATA[Stories by Rajat Panwar on Medium]]></description>
        <link>https://medium.com/@rajat-panwar?source=rss-987feeff188------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KVeg_ubMT7wPtFK_</url>
            <title>Stories by Rajat Panwar on Medium</title>
            <link>https://medium.com/@rajat-panwar?source=rss-987feeff188------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:51:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rajat-panwar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Elasticsearch (elastic cloud) SSO with Azure AD]]></title>
            <link>https://medium.com/@rajat-panwar/elastic-cloud-sso-with-azure-ad-76d0dd1e3319?source=rss-987feeff188------2</link>
            <guid isPermaLink="false">https://medium.com/p/76d0dd1e3319</guid>
            <category><![CDATA[sso]]></category>
            <category><![CDATA[azure-ad]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Rajat Panwar]]></dc:creator>
            <pubDate>Tue, 17 Aug 2021 12:01:50 GMT</pubDate>
            <atom:updated>2022-10-27T10:34:56.124Z</atom:updated>
            <content:encoded><![CDATA[<p>Integrating Elasticsearch (elastic cloud) with Azure AD can be challenging because of so many configurations and not so well defined documentation. This walkthrough will help you align with required details and configurations. (<strong>Assumption</strong>: you already have elastic deployment on <a href="https://cloud.elastic.co/">https://cloud.elastic.co/</a> and access to <a href="https://portal.azure.com/">https://portal.azure.com/</a>)</p><p>Create an Enterprise Application in Azure AD. Go to <strong>Azure Active Directory</strong> section in Azure Portal and create new application by clicking on the <em>New application menu</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*_8EuX9mPxWet-h6yqenbfg.png" /></figure><p>As of date, there is no official application available in Azure AD Gallery, so you need to click on <em>Create your own application</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wbHXW-GGVQjt7Blkx-JcHw.png" /></figure><p>Give some friendly name to your application and select given option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*hwBCbYuWT14eIUOZSVMrbQ.png" /></figure><p>It may take few seconds to create new application. Once done select <em>Single sign on</em> option and then select <em>SAML</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*Wsirvb3IPXAnkmPg58HPpw.png" /></figure><p>You’ll be presented with something similar to this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-rdty4b5eaQibNxhWzuUw.png" /></figure><p><strong>Identifier (Entity ID)</strong>: This is the endpoint of your kibana cluster which you can copy from your elastic cloud deployment section.</p><p><strong>Reply URL (Assertion Consumer Service URL):</strong> This is the endpoint of your kibana cluster suffix with <em>/api/security/v1/saml</em></p><p><strong>Logout Url:</strong> This is the endpoint of your kibana cluster suffix with <em>/logout</em></p><p>Once done, it will look something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*EwZ5wXjplv-7REn2Adrd1Q.png" /></figure><blockquote><strong>NOTE</strong>: For version 8 and above, Reply URL should end with <strong><em>/api/security/saml/callback</em></strong><em> </em>instead of <strong><em>/api/security/v1/saml</em></strong></blockquote><p>Configuring Elastisearch cluster. Go to edit deployment section of your elastic cloud to update elasticsearch.yml configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TiI9IF6nD8imfenTIuE15w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*XbyqoHllt-sXfABe4YRV1w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*oY3HervEoeJwjW8Zas3o4w.png" /></figure><blockquote><strong>NOTE</strong>: For version 8 an above, sp.acs should end with <strong><em>/api/security/saml/callback </em></strong>instead of<strong><em> /api/security/v1/saml</em></strong></blockquote><p><strong>Use App Federation Metadata Url</strong> and <strong>Azure AD identifier</strong> from <em>Single sign on</em> section of your newly created <strong>Azure AD Enterprise Application</strong>.</p><p>This configuration needs to go in all your applicable elasticsearch instances i.e. master nodes, coordinating nodes, hot data and content tier, warm data tier, cold data tier, frozen data tier, machine learning nodes.</p><p>Once added, click save. Elastic cloud will validate all changes and initiate updating the cluster. This process may take few minutes based on your cluster type and size.</p><p>On successful completion, we need to edit kibana.yml configuration so it can accept login from Azure AD along with default login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vQtOE_oF7BFBNS-wZiza4A.png" /></figure><p>Once added, click save. Elastic cloud will validate all changes and initiate updating the cluster. This process may take few minutes based on your cluster type and size.</p><p>Now your kibana login page should have one more login option available, “<strong><em>Log in with Microsoft 365</em></strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*6pCWeCOxpPD5YMMwPfgYnQ.png" /></figure><p>Server configuration part is done on both sides. Now we need to configure <strong>Role Mappings.</strong></p><p>Login to your kibana cluster and go to Stack Management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*B-8YuzunQXP7H7xzdzWmPw.png" /></figure><p>Within Stack management, lets create a role mapping. Role mapping allows creation of <em>realm</em> and <em>role </em>mappings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NoJZQo9Q6Ta7vZYz-bm0Rw.png" /></figure><p>Give a friendly name to Role Mapping. Then select roles as per your requirements. In my case, I am creating a mapping with superuser.</p><p>Now comes the important part, we need to create <em>realm.name</em> mapping where the value should be value of <em>realm </em>we configured in kibana cluster. In my case it was ‘<em>saml-azure-ad</em>’</p><p>Secondly we need to add groups with value being same as selected role. In-case you have more than one role, you can add more options like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HOkrVzN6DNqQUrY1wGACsQ.png" /></figure><p>Click save and go back to Azure Active Directory Section of azure portal. This time go to <strong>App registrations</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*cMKRQ-0v-yLkJrCTY9sU1Q.png" /></figure><p>Search the name of your Enterprise Application under all applications section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HQrmT2uF82NAJopWPWzUXA.png" /></figure><p>Here we need to create new app role like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fYh2xxgxidyb8v6TtJPkQg.png" /></figure><p>Make note to select Users/Groups option and the ‘<em>value’ </em>should match exactly the name of role you selected in elastic. On save, this role will be available in your Enterprise Application to be assigned to your user.</p><p>Now go to your Enterprise Application and select Users and Groups section. Here you can add users with roles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hTf1WORMZVP6LgxcWxwvTQ.png" /></figure><p>That’s it. You can test it using login from Microsoft 365 option of your kibana login page.</p><p>That’s all, in-order to add more roles to SSO, repeat the steps from Role mapping in Kibana, Adding the role in App Registrations in Azure AD and finally adding users for respective role in Enterprise Applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76d0dd1e3319" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>