Socket
Socket
Sign inDemoInstall

@suddjian/superset-embedding-test

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@suddjian/superset-embedding-test

Embedding SDK for Superset


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Superset Embedded SDK

The Embed SDK allows you to embed resources from Superset into your own app, using your app's authentication.

Embedding a Dashboard

embedDashboard({
  id: dashboardId,
  supersetDomain,
  mountPoint,
  fetchGuestToken: () => guestToken,
});

Authentication/Authorization

Embedded resources use an auth token called a Guest Token to grant access to your users, without requiring your users to log in to Superset directly. Your backend requests a Guest Token from Superset using the POST /security/guest_token endpoint, and passes that guest token to your frontend.

The Embedding SDK takes the guest token and use it to embed a dashboard.

Creating a Guest Token

From the backend, http POST to /security/guest_token with some parameters to define what the guest token will grant access to. Guest tokens can have Row Level Security rules which filter data for the user carrying the token.

The agent making the POST request must be authenticated with the can_create_guest_token permission.

Example POST /security/guest_token payload:

{
  "user": {
    "username": "stanlee",
    "first_name": "Stan",
    "last_name": "Lee"
  },
  "resources": [{
    "type": "dashboard",
    "id": "abc123"
  }],
  "rls": [
    { "clause": "publisher = 'Nintendo'" }
  ]
}

FAQs

Package last updated on 31 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc