Data authorization or Data access control (optional)

Data authorization or data access control are defined with filters used to restrict data based on a parameter such as a UserID or DepartmentID. You can use URL parameters to filter data. For example, you can use the UserID passed from the HTTP authentication request to identify the user's group and filter all data to display only authorized data for that user's group. If you have a dashboard but only want users to see data filtered by their group_id, you can create the filter here for use in a record or metric.

  1. In Admin Console, on the Documents Tree, right-click User filters and click New. Name the filter and click OK.
  2. Enter the following filter details.
    1. In the Name field, assign a name to the filter.
    2. In the Source field, select a connection source to a database from the Documents Tree > Connections tab. It establishes a connection to the database that the Query (filter) runs against.
    3. In the Query field, enter the query to execute on the database specified in the Source field. Define a custom query for the filter according to your configuration.
      Note Within an SQL statement, enclose each of the URL properties in angle brackets and single quotation marks to avoid SQL injections.
      Example

      Select Clients from Clients_mapping, where Staff_ID = ’<UserID>’

      Where:

      • Clients and Staff_ID are fields in the Clients_Mapping table

      • UserID is a parameter from an HTTP request

      Optional. In case of Insight User Authentication, use the following parameters: Login, Password, and Email. Email is defined in the Insight User document.

      Optional. In case you use the Login panel for authentication, the following parameters are available: Login and Password.

  3. Apply the newly created filter as needed for dimensions of records or metrics within Insight Studio.
    1. Log in to Insight Studio.
    2. Open a metric or a record to apply the filter.
    3. Select the field that needs to be filtered. On the Property Panel, select Filter. From the list of filters, select the filter created above.
      In the sample screen below, the LoginID field in the record is filtered by the user filter named AllowedIDs. This user filter is applied to all users, including the Administrator user.