Embedding apps with client pages

Cloudera Data Visualization (CDV) allows you to embed CDV apps into client pages using an HTML iframe component. You have two options: open access, which makes the app available to all users without requiring authentication or login, or trusted authentication for added security.

When you embed a CDV app into an iframe on a web page, you need to specify the frame-ancestor attribute, otherwise the browser security policy prevents the application from rendering on the page. The host sources you list will be the locations where the app can be embedded..
  • If you want to embed a CDV app into a client page iframe without requiring authentication, enable the Enable Unauthenticated Access option for the app. For more information and instructions, see the Public Applications section in Securing Applications.

  • Turn on the correct cookie settings by setting the environment variable IS_EMBED='true'.

  • If you want to maintain the embedding URL and prevent links from opening the application outside the embedded environment, add EMBED_URL_PREFIX=embeddingurl to the advanced site settings and restart the application. This prefix will be added to all CDV URLs.

    For example: EMBED_URL_PREFIX=https://embeddingsite.com# will open the url https://embeddingsite.com#/arc/apps/data if you open the data page in a new tab.

  1. Navigate to Project Settings > Advanced in CML/CDSW.
  2. Set the CDSW_FRAME_ANCESTORS environment variable: specify one or more website locations where you want to embed the application in <host-source> format.
    If you are adding multiple websites, use a comma-separated list.