From 6a2388f11c43177187a0b16b0bd4d2d0535a5a09 Mon Sep 17 00:00:00 2001 From: pballai Date: Thu, 22 May 2025 14:07:21 -0400 Subject: [PATCH] embedding_use_case_secure_embedding_into_streamlit --- .../embedding_01_getting_started_v3.md | 24 +- .../embedding_02_federated_access_v3.md | 8 +- .../embedding_03_parameters_ua_v3.md | 2 +- .../embedding_04_isolation_solutions_v3.md | 10 +- .../embedding_09_events_v3.md | 32 +- .../embedding_11_responsive_embeds_v3.md | 4 +- .../embedding_12_parameterized_queries_v3.md | 8 +- .../embedding_13_link_sharing_v3.md | 6 +- .../embedding_15_public_access_v3.md | 6 +- .../assets/caret.png | Bin 0 -> 3664 bytes .../assets/closeview.png | Bin 0 -> 8821 bytes .../assets/crane.png | Bin 0 -> 18076 bytes .../assets/facebook.png | Bin 0 -> 6135 bytes .../assets/horizonalline.png | Bin 0 -> 2234 bytes .../assets/linkedin.png | Bin 0 -> 1212 bytes .../assets/sigma_footer.png | Bin 0 -> 289926 bytes .../assets/sl_1.png | Bin 0 -> 261530 bytes .../assets/sl_10.png | Bin 0 -> 476497 bytes .../assets/sl_11.png | Bin 0 -> 188812 bytes .../assets/sl_12.png | Bin 0 -> 141018 bytes .../assets/sl_13.png | Bin 0 -> 93737 bytes .../assets/sl_14.png | Bin 0 -> 170891 bytes .../assets/sl_15.png | Bin 0 -> 161658 bytes .../assets/sl_16.png | Bin 0 -> 95012 bytes .../assets/sl_17.png | Bin 0 -> 183858 bytes .../assets/sl_18.png | Bin 0 -> 53866 bytes .../assets/sl_19.png | Bin 0 -> 347456 bytes .../assets/sl_2.png | Bin 0 -> 114915 bytes .../assets/sl_20.png | Bin 0 -> 148150 bytes .../assets/sl_21.png | Bin 0 -> 380087 bytes .../assets/sl_22.png | Bin 0 -> 111162 bytes .../assets/sl_23.png | Bin 0 -> 81964 bytes .../assets/sl_24.png | Bin 0 -> 258115 bytes .../assets/sl_4.png | Bin 0 -> 139711 bytes .../assets/sl_5.png | Bin 0 -> 397167 bytes .../assets/sl_6.png | Bin 0 -> 66620 bytes .../assets/sl_7.png | Bin 0 -> 66440 bytes .../assets/sl_8.png | Bin 0 -> 66233 bytes .../assets/sl_9.png | Bin 0 -> 298731 bytes .../assets/twitter.png | Bin 0 -> 1196 bytes ...se_case_secure_embedding_into_streamlit.md | 439 ++++++++++++++++++ 41 files changed, 489 insertions(+), 50 deletions(-) create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/caret.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/closeview.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/crane.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/facebook.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/horizonalline.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/linkedin.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sigma_footer.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_1.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_10.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_11.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_12.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_13.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_14.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_15.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_16.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_17.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_18.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_19.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_2.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_20.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_21.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_22.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_23.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_24.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_4.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_5.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_6.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_7.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_8.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/sl_9.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/assets/twitter.png create mode 100644 site/sigmaguides/src/embedding_use_case_secure_embedding_into_streamlit/embedding_use_case_secure_embedding_into_streamlit.md diff --git a/site/sigmaguides/src/embedding_01_getting_started_v3/embedding_01_getting_started_v3.md b/site/sigmaguides/src/embedding_01_getting_started_v3/embedding_01_getting_started_v3.md index 48a6e359..919e3498 100644 --- a/site/sigmaguides/src/embedding_01_getting_started_v3/embedding_01_getting_started_v3.md +++ b/site/sigmaguides/src/embedding_01_getting_started_v3/embedding_01_getting_started_v3.md @@ -23,7 +23,7 @@ Additionally, it will demonstrate how to set up a local web application so that Sigma also provides an embed sandbox that is built into the product. For more information, see [Test an embed URL in the embed sandbox](https://help.sigmacomputing.com/docs/test-an-embed-url-in-the-embed-sandbox) -The local web application (e.g., native application) refers to the customer-developed application that Sigma is embedded into. +The local web application (e.g., host application) refers to the customer-developed application that Sigma is embedded into. We will use code from a public Git repository, VS Code, Node.js, Javascript and HTML in this QuickStart series. @@ -72,7 +72,7 @@ There are two types of embedding in Sigma: **Secure with JWT** and **Public**. W ### Secure embedding with JSON Web Tokens (JWT) JWT is the preferred method for secure embedding with Sigma. [JWT](https://en.wikipedia.org/wiki/JSON_Web_Token) which is an open, industry-standard [RFC 7519](https://www.rfc-editor.org/rfc/rfc7519) method for representing claims securely between two parties. -JWT is used when a company embeds Sigma content directly into a native application that they want to embed Sigma content directly into while retaining security, tenancy, and a tailored user experience. +JWT is used when a company embeds Sigma content directly into a host application that they want to embed Sigma content directly into while retaining security, tenancy, and a tailored user experience. For example, a company may have an internal web site that employees have to log into using single sign-on where they want to provide a dashboard that only shows data filtered for each employee’s region. @@ -151,7 +151,7 @@ What follows is a more in-depth description of the JWT workflow in Sigma. ### Step-by-Step JWT Flow: **1. Client Request (i.e., end user's web browser):**
-The client (e.g., the end-user's browser in the native application) sends a request to the server to obtain a URL for accessing embedded Sigma content. This request may include user-related information, such as identity or a general request for access to Sigma content. +The client (e.g., the end-user's browser in the host application) sends a request to the server to obtain a URL for accessing embedded Sigma content. This request may include user-related information, such as identity or a general request for access to Sigma content. **2. Server-Side JWT Generation (i.e., customer-created embed API):** ***Credential Handling:***
@@ -178,7 +178,7 @@ https://app.sigmacomputing.com/?jwt= This URL includes the signed JWT that will be used to authenticate and authorize the user when they access the embedded Sigma content. **4. Client Accesses the Signed URL:**
-When the client (e.g., the end-user's browser in the native application) loads the signed URL, Sigma verifies the JWT. Sigma ensures that: +When the client (e.g., the end-user's browser in the host application) loads the signed URL, Sigma verifies the JWT. Sigma ensures that: - The JWT signature is valid, confirming that the token has not been tampered with. - The claims (like sub, roles, exp) are still valid, checking whether the user is authorized and whether the token is within its allowed time frame. @@ -337,7 +337,7 @@ The project has almost everything we need, but we will need set up some things i ![Footer](assets/sigma_footer.png) -## Sample Native App +## Sample Host App Duration: 5 The sample app is built with Node.js, HTML, and JavaScript. @@ -349,7 +349,7 @@ We took some liberties with styling and layout, but there are just a few core fi ### Environment file (.env) @@ -395,7 +395,7 @@ We need to provision `Account Types`, `Teams`, and `Workspaces` in Sigma. This w Sigma has some features that will make this easier for us. ### Users -We already have an administrative user, and we will add additional users on-the-fly from our native application. +We already have an administrative user, and we will add additional users on-the-fly from our host application. Recall that embed users are added at runtime—the first time they access any content embedded in the parent application. @@ -403,7 +403,7 @@ Their permission level is also set automatically by the embed API, via a require