| 
 | 1 | +.. procedure::  | 
 | 2 | +   :style: normal  | 
 | 3 | + | 
 | 4 | +   .. include:: /includes/nav/steps-charts.rst  | 
 | 5 | + | 
 | 6 | +   .. step:: Select a dashboard.  | 
 | 7 | + | 
 | 8 | +      From your dashboard page, select the dashboard containing the   | 
 | 9 | +      chart for which you want to enable embeddings.  | 
 | 10 | + | 
 | 11 | +   .. step:: Select a chart.  | 
 | 12 | + | 
 | 13 | +      From the dashboard, click :icon-mms:`ellipsis` at the top-right of  | 
 | 14 | +      the chart to access its embedding information. Select  | 
 | 15 | +      :guilabel:`Embed chart` from the dropdown menu.  | 
 | 16 | + | 
 | 17 | +   .. include:: /includes/fact-charts-in-embedded-dashboards.rst  | 
 | 18 | + | 
 | 19 | +   .. step:: Enable external sharing on the data source.  | 
 | 20 | + | 
 | 21 | +      If you've already enabled external sharing on the data source   | 
 | 22 | +      this chart uses, skip this step. If you haven't yet enabled  | 
 | 23 | +      eexternal sharing on the data source, you can do so now. Click the  | 
 | 24 | +      :guilabel:`Configure external sharing` link.  | 
 | 25 | + | 
 | 26 | +   .. step:: Enabled signed authentication.  | 
 | 27 | +        | 
 | 28 | +      a. Select the :guilabel:`Verified Signature` tab in the dialog   | 
 | 29 | +         box.  | 
 | 30 | + | 
 | 31 | +      #. Toggle :guilabel:`Enable signed authentication access` to   | 
 | 32 | +         :guilabel:`On`.  | 
 | 33 | + | 
 | 34 | +      The |html| code that appears in the modal window shows the   | 
 | 35 | +      required parameters for sharing a chart with   | 
 | 36 | +      authentication enabled. To use this code, you must continue with   | 
 | 37 | +      the subsequent steps to enable authenticated access.  | 
 | 38 | + | 
 | 39 | +   .. step:: Acquire an embedding key.  | 
 | 40 | + | 
 | 41 | +      a. Click :guilabel:`Embedding` in the sidebar.  | 
 | 42 | +       | 
 | 43 | +      #. Click the :guilabel:`Authentication Settings` tab.  | 
 | 44 | + | 
 | 45 | +      .. note::  | 
 | 46 | + | 
 | 47 | +         You must be a :ref:`Project Owner <dashboard-permissions>` to  | 
 | 48 | +         access the :guilabel:`Authentication Settings` page. As a   | 
 | 49 | +         non-admin user, you can still use embedded charts, but you   | 
 | 50 | +         must get a key from a Project Owner.  | 
 | 51 | + | 
 | 52 | +   .. step:: Generate an embedding key.  | 
 | 53 | + | 
 | 54 | +      Click the :guilabel:`Generate New Key` button to create a new  | 
 | 55 | +      embedding key. Store the key in a safe place.  | 
 | 56 | + | 
 | 57 | +      .. warning::  | 
 | 58 | + | 
 | 59 | +         If you generate a new key, any previous keys become invalid.  | 
 | 60 | +         Ensure that all the existing shared charts that use the old key  | 
 | 61 | +         are updated to use the new key.  | 
 | 62 | + | 
 | 63 | +   .. step:: Create the server-side code necessary for a verified signature.  | 
 | 64 | + | 
 | 65 | +      Generating a verified signature to accompany data requests from   | 
 | 66 | +      shared charts with authentication enabled requires server-side   | 
 | 67 | +      code. The verified signature creates a payload by generating a  | 
 | 68 | +      :wikipedia:`HMAC </HMAC>` from your embedding key, a timestamp,   | 
 | 69 | +      and identifying data from your chart. The verified signature is   | 
 | 70 | +      valid for a limited time period specified in your server-side   | 
 | 71 | +      code.  | 
 | 72 | + | 
 | 73 | +      Code examples demonstrating how to generate a verified  | 
 | 74 | +      signature are available for the following languages and platforms:  | 
 | 75 | + | 
 | 76 | +      - :github:`Node.js   | 
 | 77 | +        </mongodb/charts-embedding-examples/tree/master/node>`  | 
 | 78 | +      - :github:`C#   | 
 | 79 | +        </mongodb/charts-embedding-examples/tree/master/c-sharp>`  | 
 | 80 | +      - :github:`Java   | 
 | 81 | +        </mongodb/charts-embedding-examples/tree/master/java>`  | 
 | 82 | +      - :github:`Python   | 
 | 83 | +        </mongodb/charts-embedding-examples/tree/master/python>`  | 
 | 84 | +      - :github:`MongoDB Stitch   | 
 | 85 | +        </mongodb/charts-embedding-examples/tree/master/stitch>`  | 
 | 86 | +   | 
0 commit comments