<?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 Sagar Choudhary on Medium]]></title>
        <description><![CDATA[Stories by Sagar Choudhary on Medium]]></description>
        <link>https://medium.com/@sagar.choudhary_53622?source=rss-9becc675ac21------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7cbuaAyyk-O3I7qxV5uiHA.jpeg</url>
            <title>Stories by Sagar Choudhary on Medium</title>
            <link>https://medium.com/@sagar.choudhary_53622?source=rss-9becc675ac21------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 16:36:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sagar.choudhary_53622/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[Single sign-on (SSO) Embedding in Looker]]></title>
            <link>https://blog.searce.com/single-sign-on-sso-embedding-in-looker-fa4ccc467ded?source=rss-9becc675ac21------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa4ccc467ded</guid>
            <dc:creator><![CDATA[Sagar Choudhary]]></dc:creator>
            <pubDate>Wed, 04 Jan 2023 06:58:56 GMT</pubDate>
            <atom:updated>2023-01-04T06:58:56.243Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7gB0XzCqpca8-VCZSVPndA.png" /></figure><p><strong>Introduction to SSO Embedding</strong></p><p>Single sign-on (SSO) embedding is a way to present private embedded Looks, visualizations, Explores, dashboards, or LookML dashboards to your users without requiring them to have a separate Looker login. Instead, users will be authenticated through your own application.</p><p>SSO embedding works by creating a special Looker URL that you will use in an iframe. The URL contains the information you want to share, the ID of the user in your system, and the permissions you want that user to have. You’ll then sign the URL with a secret key provided by Looker.</p><p>SSO Embedding is the most advanced and complex embedding Looker functionality. It is one of the most secure concepts. You must perform a few tasks from the admin section or you need to ensure that the SSO Embedding is enabled on your Looker instance.</p><p><strong>Let’s Start Hand’son:</strong></p><p><strong>FIRST LET’S GET UNDERSTAND THE WORKING FLOW OF SSO</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oY_HfTlxpYHh7GLnfFlAQg.png" /><figcaption><strong>Architecture of SSO</strong></figcaption></figure><p><strong>Step 1. Enable the Embed Authentication</strong></p><p>In the Embed pane, in the admin panel, find and enable the Embed Authentication option. This should trigger the creation of the Client Secret variable, which will appear on the same page. So you need to make sure that the SSO embedding features are enabled or not in your looker admin panel, if it is disabled you need to make it enable. For making it enabled you need to follow these steps.</p><p>Open Your Looker Instance Click <strong>Admin</strong> &gt;&gt; <strong>Embed</strong> &gt;&gt; Make Sure <strong>Embed SSO Authentication</strong> is enabled.</p><ol><li>Click on <strong>Admin.</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/0*yS-81jnlenzvV-x6" /></figure><p>2. Then search for <strong>Embed </strong>then click on that Embed Option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/0*-leLSP0Hs78A7_H8" /></figure><p>3. Check for the <strong>Embed SSO Authentication</strong> &amp; make sure it is enable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*78EKVSyT_mdNPES4" /></figure><p><strong>Step 2. Create and copy the Embed secret</strong></p><p>The Embed Secret should be available above on the same page. If it is not visiable, please click on the <strong>Reset Secret </strong>button. steps mentioned below:</p><ol><li>click on<strong> Admin.</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/0*2uab2QXNVhWv7G3H" /></figure><p>2. Then search for <strong>Embed </strong>then click on that Embed Option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/0*j0EmtGUr9_mjLENu" /></figure><p>3. When you click on that you are able to see the <strong>Embed Secret </strong>Section. if it’s visible it is fine or if it is not visible then you need to click on<strong> Set Secret </strong>button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*iIcv9KwDlRRjFb6z" /></figure><p>4. After clicking on Set Secret the new Secret will be generated.</p><p><em>Tip : Move this Secret in a safe place because if you generate the new secret it will affect your embed dashboard.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*PdCWooRkJis5CnYR" /></figure><p><strong>Step 3. Create a dedicated permissions set</strong></p><p>In the Roles pane, choose New Permissions Set and create a new set as per your requirenment with the following permissions, you can also call it the SSO Permissions:</p><ul><li>access_data,</li><li>embed_browse_spaces,</li><li>see_looks.</li></ul><p><strong>Step 4. Create the Embed group</strong></p><p>In the Groups pane, add a new Group, we call it the Embed Group. Once Embed group created go back to the Roles pane and add this group to the SSO Permissions role.</p><p><strong>Step 5. Create a dedicated folder and content to be shared with the Embed Client</strong></p><p>This step is required to keep the embedded content separate from the content we don’t want to share with the Embed Group. It might seem like a redundant step but is vital for the security and maintenance of the curated content.</p><p><strong>Step 6. Grant the content access to the right Embed Group</strong></p><p>In the Content Access pane, grant the access to the created folder, let’s call it Embed Content in the process above, to the Embed Group.</p><p><strong>Step 7. Create a unique Embed URI.</strong></p><p>For Creating an Embed URI the Requirement is<strong> Visual Studio code</strong> &amp; <strong>Ruby Software</strong>. This is the ruby script I am giving below for creating an Embed URI. You need to do some modification in the below script as per your requirement.</p><pre>require &#39;cgi&#39;<br>require &#39;securerandom&#39;<br>require &#39;uri&#39;<br>require &#39;base64&#39;<br>require &#39;json&#39;<br>require &#39;openssl&#39;<br>module LookerEmbedClient<br>def self.created_signed_embed_url(https://medium.com/options)<br># looker options<br>secret = options[:secret]<br>host = options[:host]<br># user options<br>json_external_user_id = options[:external_user_id].to_json<br>json_first_name = options[:first_name].to_json<br>json_last_name = options[:last_name].to_json<br>json_permissions = options[:permissions].to_json<br>json_models = options[:models].to_json<br>json_group_ids = options[:group_ids].to_json<br>json_external_group_id = options[:external_group_id].to_json<br>json_user_attributes = options[:user_attributes].to_json<br>json_access_filters = options[:access_filters].to_json<br># url/session specific options<br>embed_path = &#39;/login/embed/&#39; + CGI.escape(options[:embed_url])<br>json_session_length = options[:session_length].to_json<br>json_force_logout_login = options[:force_logout_login].to_json<br># computed options<br>json_time = Time.now.to_i.to_json<br>json_nonce = SecureRandom.hex(16).to_json<br># compute signature<br>string_to_sign = &quot;&quot;<br>string_to_sign += host + &quot;\n&quot;<br>string_to_sign += embed_path + &quot;\n&quot;<br>string_to_sign += json_nonce + &quot;\n&quot;<br>string_to_sign += json_time + &quot;\n&quot;<br>string_to_sign += json_session_length + &quot;\n&quot;<br>string_to_sign += json_external_user_id + &quot;\n&quot;<br>string_to_sign += json_permissions + &quot;\n&quot;<br>string_to_sign += json_models + &quot;\n&quot;<br># optionally add settings not supported in older Looker versions<br>string_to_sign += json_group_ids + &quot;\n&quot; if options[:group_ids]<br>string_to_sign += json_external_group_id+ &quot;\n&quot; if options[:external_group_id]<br>string_to_sign += json_user_attributes + &quot;\n&quot; if options[:user_attributes]<br>string_to_sign += json_access_filters<br>signature = Base64.encode64(<br>OpenSSL::HMAC.digest(<br>OpenSSL::Digest.new(&#39;sha1&#39;),<br>secret,<br>string_to_sign.force_encoding(&quot;utf-8&quot;))).strip<br># construct query string<br>query_params = {<br>nonce: json_nonce,<br>time: json_time,<br>session_length: json_session_length,<br>external_user_id: json_external_user_id,<br>permissions: json_permissions,<br>models: json_models,<br>access_filters: json_access_filters,<br>first_name: json_first_name,<br>last_name: json_last_name,<br>force_logout_login: json_force_logout_login,<br>signature: signature<br>}<br># add optional parts as appropriate<br>query_params[:group_ids] = json_group_ids if options[:group_ids]<br>query_params[:external_group_id] = json_external_group_id if options[:external_group_id]<br>query_params[:user_attributes] = json_user_attributes if options[:user_attributes]<br>query_params[:user_timezone] = options[:user_timezone].to_json if options.has_key?(:user_timezone)<br>query_string = URI.encode_www_form(query_params)<br>&quot;#{host}#{embed_path}?#{query_string}&quot;<br>end<br>end<br>def sample<br>fifteen_minutes = 15 * 60<br>#YOU NEED TO MODIFY THE BELOW CODE AS PER YOUR REQUIRMENT.<br>url_data = {<br>host: &#39;instancename.cloud.looker.com&#39;,<br>secret: &#39;c17001c68440f858f4fed4&#39;,<br>external_user_id: &#39;57&#39;,<br>first_name: &#39;Sagar&#39;,<br>last_name: &#39;choudhary&#39;,<br>permissions: [&#39;see_user_dashboards&#39;, &#39;see_lookml_dashboards&#39;, &#39;access_data&#39;, &#39;see_looks&#39;], #dedicated Permission Set<br>models: [&#39;Model-name&#39;],<br>group_ids: [],<br>external_group_id: &#39;&#39;,<br>user_attributes: {},<br>access_filters: {},<br>session_length: fifteen_minutes,<br>embed_url: &quot;/embed/dashboards/143&quot;,<br>force_logout_login: true<br>}<br>url = LookerEmbedClient::created_signed_embed_url(https://medium.com/url_data)<br>puts &quot;https://#{url}&quot;<br>end<br>sample()</pre><p>User need to modify the last 20 line of code when you’re going to create the SSO embedd URI.</p><p><strong>Commands For Running the code :</strong></p><p><strong><em>cd &lt;folder name&gt;<br>ruby &lt;filename.rb&gt;</em></strong></p><p>After doing this steps you will get this type of SSO embed URI will be generate you need to validate that URI looker embed section.</p><p><strong>Step 8. Check whether the URL correct or not.</strong></p><p>For validating the URI Open Your Looker Instance Click <strong>Admin</strong> &gt;&gt; <strong>Embed</strong> &gt;&gt; there is one filed as <strong>Embed URI Validator </strong>you need to paste that URI for validating steps mentioned below:</p><ol><li>click on the <strong>Admin</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/0*Rzzsgl2G1IVd93fM" /></figure><p>2. Then search for <strong>Embed </strong>then click on that Embed Option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/0*1nyqr7yScEGa3yXp" /></figure><p>3. You’re able to see the<strong> Embed URI Validator </strong>Section. You need to paste that link in this section and then need to Click on the<strong> Test URI</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*iImJokDh0hfAMv5U" /></figure><p>4. After clicking on Test URI if your link is correct you will get the pop-up<strong> Embed URI is valid </strong>so this new page will appear in front of you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*Fk71XShxAnr5oFtN" /></figure><p><strong>Step 9. Create Iframe using HTML.</strong></p><p>1 . You need to create the iframe using HTML so you are able to embed the dashboard on a particular portal and you need to paste the embedded link in front of <strong>src.</strong></p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;center&gt;&lt;iframe src= &quot;https://instancename.cloud.looker.com/embed/dashboards/143&quot;    <br>width=&quot;900&quot; height=&quot;600&quot;&gt;   # You need to paste your embedded link here</pre><pre>&lt;/center&gt;<br>&lt;/iframe&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>2. When you open this HTML file you are able to see the dashboard is embedded successfully on our portal. So like this you’re able to do the SSO embedding and able to embed the dashboard on the customer portal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_C3DJQC5qnBeMdxQzZ6arg.png" /><figcaption><strong>Embedded Dashboard on Customer Portal</strong></figcaption></figure><p>So here we successfully implemented SSO through embedding to use an iFrame, which is an HTML element that allows a website to be embedded within another website. To implement SSO using an iFrame, the parent website can include an iFrame that contains the login form for the other application or website. When the user submits the login form within the iFrame, their credentials are sent to the other application or website for authentication. If the authentication is successful, the user is granted access to both the parent website and the application or website contained within the iFrame.</p><h3>Best practices for creating the embedded content :</h3><ul><li>Make sure you are using a dedicated folder, where you store the shared content. Restrict the access for dedicated external users.</li><li>Always use the PII access control, so the sensitive content is protected and can’t be reached within the embedded content.</li><li>Put the managing curated content best practices in place, so it’s regularly checked for data protection.</li></ul><p><strong>Advantages :</strong></p><ul><li>No looker account required</li><li>All content types available for embedding</li><li>The safest way to share the Looker content due to its most advanced security settings.</li></ul><p><strong>Disadvantages :</strong></p><ul><li>Pretty hefty URL setting up a process</li><li>Not available for Internet Explorer and Safari</li></ul><h3>Conclusion :</h3><p>Looker is Powerful data visualization tool that is quite effective and interesting to use so in this blog we covered Single sign-on (SSO) embedding concept. I explain the end to end procedure of SSO embedding.SSO can be a useful tool for improving the user experience and increasing security on a blog or website. There are a variety of methods and technologies available for implementing SSO, and the best option will depend on the specific needs and resources of the organization.</p><p><strong>Happy Reading 😊 !!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa4ccc467ded" width="1" height="1" alt=""><hr><p><a href="https://blog.searce.com/single-sign-on-sso-embedding-in-looker-fa4ccc467ded">Single sign-on (SSO) Embedding in Looker</a> was originally published in <a href="https://blog.searce.com/">Searce</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>