Multi-tenancy is the ability of software to serve multiple clients. This means that depending on the client that logs into your platform, the embedded dashboard(s) will show different numbers. This also means that ideally you only need to create and maintain one or more template dashboards that can be securely provided to multiple clients!

There are multiple ways to implement this and Luzmo aims to provide a good solution for each of them. Setting up multi-tenancy in Luzmo happens via embed authorization tokens and their properties, which specific properties are used depends on your data-structure.


Dataset(s) with multi-tenant data

  • Parameter overrides are the most straight-forward solution to filter data that lives in a single dataset. By defining a parameter filter with a default value when adding an embed filter to a dataset, you can override the parameter value in the embed authorization request. Luzmo will then translate the parameters to filters that your data source understands.
    Alternatively, you can add static filter(s) to a dataset. Both parameterizable filters as well as static filters can be used in all setups, whether you have uploaded the data to Luzmo, use one of our out-of-the-box connectors or have written your own plugin.

  • Connection overrides (account_overrides) can be used when your database supports row-level security based on the connection details (i.e. your database can automatically filter out rows based on the user credentials). This can be used when connecting this type of database through both our out-of-the-box connector and your own plugin.

  • User context filtering can be implemented in your own plugin: when creating an embed authorization token, you specify the user's metadata and based on this metadata your plugin should only return the relevant data. This is particularly powerful when you need custom logic to decide which rows should be returned.


Dataset(s) per tenant

  • Connection overrides (account_overrides) are an easy solution in case you have a multi-database approach. This token property can be used for both our out-of-the-box connectors (Luzmo will send queries to the overridden connection) as well as for your own plugin (Luzmo will send queries to the overridden base_url and/or specify the overridden host/key/token in the request header).

  • Internal brokering should be implemented in your own plugin: your plugin should decide which data source(s) should be queried using the metadata specified in the embed authorization token. This is useful when you need custom logic to decide which data sources should be used for a certain client.


These approaches can of course be combined, which would result in querying certain subsets of different datasets based on your user management!

Warp and connection overrides

Warp can be used to speed up dashboards built on top of any data source with our out-of-the-box acceleration layer. When you use connection overrides together with Warp:

  • the main connection (the one connected in Luzmo) is used is used to sync the data
  • when data is requested with an connection override (account_overrides), the data will be queried from your data source given it could return different results
Previous
Next

Need more information?

Do you still have questions? Let us know how we can help.
Send us feedback!

Course Outline