# Configure Starburst (Trino) Integration

{% hint style="warning" %}
**Deprecation notice**

Support for configuring the Starburst (Trino) integration using this legacy workflow has been deprecated. Instead, configure your integration and register your data using [connections](https://documentation.immuta.com/SaaS/configuration/integrations/starburst-trino/how-to-guides/register-a-trino-connection).
{% endhint %}

The plugin comes pre-installed with Starburst Enterprise, so this page provides separate sets of guidelines for configuration:

* [Starburst Cluster Configuration](#starburst-cluster-configuration): These instructions are specific to Starburst Enterprise clusters.
* [Trino Cluster Configuration](#trino-cluster-configuration): These instructions are specific to open-source Trino clusters.

## Starburst Cluster Configuration

### Requirements

* A valid [Starburst Enterprise license](https://docs.starburst.io/latest/license-requirements.html).
* The Starburst Cluster must be publicly accessible or have [private connectivity](https://documentation.immuta.com/SaaS/configuration/application-configuration/how-to-guides/private-networking-support/data-connection-private-networking/index-2) configured.

{% hint style="warning" %}
Starburst does not support using Starburst built-in access control (BIAC) concurrently with any other access control providers such as Immuta. If Starburst BIAC is in use, it must be disabled to allow Immuta to enforce policies on cluster.
{% endhint %}

### 1 - Enable the Integration

1. Click the <i class="fa-gear">:gear:</i> **App Settings** icon in the navigation menu.
2. Click the **Integrations** tab.
3. Click **Add Integration** and select **Trino** from the **Integration Type** dropdown menu.
4. Click **Save**.

### 2 - Configure the Immuta System Access Control Plugin in Starburst

{% hint style="info" %}
**Default configuration property values**

If you use the default property values in the configuration file described in this section,

* you will **give users read and write access to tables that are not registered in Immuta** and
* results for `SHOW` queries will not be filtered on table metadata.

These default settings help ensure that a new Starburst integration installation is minimally disruptive for existing Starburst deployments, allowing you to then add Immuta data sources and update configuration to enforce more controls as you see fit.

However, the **`access-control.config-files`** property can be configured to allow Immuta to work with existing Starburst installations that have already configured an access control provider. For example, if the Starburst integration is configured to allow users write access to tables that are not protected by Immuta, you can still lock down write access for specific non-Immuta tables using an additional access control provider.
{% endhint %}

1. Create the Immuta access control configuration file in the Starburst configuration directory (**`/etc/starburst/immuta-access-control.properties`** for Docker installations or **`<starburst_install_directory>/etc/immuta-access-control.properties`** for standalone installations).

   The table below describes the properties that can be set during configuration.

   | Property                                              | Starburst version | Required or optional                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   | ----------------------------------------------------- | ----------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | **`access-control.name`**                             | 392 and newer     | Required                                    | This property enables the integration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
   | **`access-control.config-files`**                     | 392 and newer     | Optional                                    | Starburst allows you to enable multiple system access control providers at the same time. To do so, add providers to this property as comma-separated values. Immuta has tested the Immuta system access control provider alongside the [Starburst built-in access control system](https://docs.starburst.io/latest/security/biac-overview.html). This approach allows Immuta to work with existing Starburst installations that have already configured an access control provider. Immuta does not manage all permissions in Starburst and will default to allowing access to anything Immuta does not manage so that the Starburst integration complements existing controls. For example, if the Starburst integration is configured to allow users write access to tables that are not protected by Immuta, you can still lock down write access for specific non-Immuta tables using an additional access control provider.                                                                                                                                                                                         |
   | **`immuta.allowed.immuta.datasource.operations`**     | 413 and newer     | Optional                                    | This property defines a comma-separated list of allowed operations for Starburst (Trino) users on tables registered as Immuta data sources: `READ`,`WRITE`, and `OWN`. (See the [Customize read and write access policies for Starburst (Trino) guide](https://documentation.immuta.com/SaaS/configuration/integrations/starburst-trino/how-to-guides/write-access-mapping) for details about the `OWN` operation.) When set to `WRITE`, all querying users are allowed read and write operations to data source schemas and tables. By default, this property is set to `READ`, which blocks write operations on data source tables and schemas. *If* [*write policies*](https://documentation.immuta.com/SaaS/govern/secure-your-data/authoring-policies-in-secure/section-contents/reference-guides/subscription-access-types#granting-starburst-trino-privileges) *are enabled for your Immuta tenant, this property is set to `READ,WRITE` by default, so users are allowed read and write operations to data source schemas and tables.*                                                                            |
   | **`immuta.allowed.non.immuta.datasource.operations`** | 392 and newer     | Optional                                    | This property defines a comma-separated list of allowed operations users will have on tables not registered as Immuta data sources: `READ`, `WRITE`, `CREATE`, and `OWN`. (See the [Customize read and write access policies for Starburst (Trino) guide](https://documentation.immuta.com/SaaS/configuration/integrations/starburst-trino/how-to-guides/write-access-mapping) for details about `CREATE` and `OWN` operations.) When set to `READ`, users are allowed read operations on tables not registered as Immuta data sources. When set to `WRITE`, users are allowed read and write operations on tables not registered as Immuta data sources. If this property is left empty, users will not get access to any tables outside Immuta. By default, this property is set to `READ,WRITE`. *If* [*write policies*](https://documentation.immuta.com/SaaS/govern/secure-your-data/authoring-policies-in-secure/section-contents/reference-guides/subscription-access-types#granting-starburst-trino-privileges) *are enabled for your Immuta tenant, this property is set to `READ,WRITE,OWN,CREATE` by default.* |
   | **`immuta.apikey`**                                   | 392 and newer     | Required                                    | This should be set to the Immuta API key displayed when enabling the integration on the app settings page. To rotate this API key, use the [Integrations API](https://documentation.immuta.com/SaaS/developer-guides/api-intro/integrations-api/how-to-guides/trino-api#generate-a-new-immuta-api-key) to generate a new API key, and then replace the existing `immuta.apikey` value with the new one.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
   | **`immuta.audit.legacy.enabled`**                     | 435 and newer     | Optional                                    | This property allows you to turn off Starburst (Trino) audit. Must set both `immuta.audit.legacy.enabled` and `immuta.audit.uam.enabled` to `false` to fully disable query audit.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
   | **`immuta.audit.uam.enabled`**                        | 435 and newer     | Optional                                    | This property allows you to turn off Starburst (Trino) audit. Must set both `immuta.audit.legacy.enabled` and `immuta.audit.uam.enabled` to `false` to fully disable query audit.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
   | **`immuta.ca-file`**                                  | 392 and newer     | Optional                                    | This property allows you to specify a path to your CA file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   | **`immuta.cache.views.seconds`**                      | 392 and newer     | Optional                                    | Amount of time in seconds for which a user's specific representation of an Immuta data source will be cached for. Changing this will impact how quickly policy changes are reflected for users actively querying Starburst. By default, cache expires after 30 seconds.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
   | **`immuta.cache.datasource.seconds`**                 | 392 and newer     | Optional                                    | Amount of time in seconds for which a user's available Immuta data sources will be cached for. Changing this will impact how quickly data sources will be available due to changing projects or subscriptions. By default, cache expires after 30 seconds.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
   | **`immuta.endpoint`**                                 | 392 and newer     | Required                                    | The protocol and fully qualified domain name (FQDN) for the Immuta tenant used by Starburst (for example, `https://my.immuta.tenant.io`). This should be set to the endpoint displayed when enabling the integration on the app settings page.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
   | **`immuta.filter.unallowed.table.metadata`**          | 392 and newer     | Optional                                    | When set to false, Immuta won't filter unallowed table metadata, which helps ensure Immuta remains noninvasive and performant. If this property is set to true, running `show catalogs`, for example, will reflect what that user has access to instead of returning all catalogs. By default, this property is set to false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
   | **`immuta.group.admin`**                              | 420 and newer     | Required if `immuta.user.admin` is not set  | This property identifies the Starburst group that is the Immuta administrator. The users in this group will not have Immuta policies applied to them. Therefore, data sources should be created by users in this group so that they have access to everything. This property can be used in conjunction with the `immuta.user.admin` property, and regex filtering can be used (with a `\|` delimiter at the end of each expression) to assign multiple groups as the Immuta administrator. Note that you must escape regex special characters (for example, `john\\.doe+svcacct@immuta\\.com`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
   | **`immuta.http.timeout.milliseconds`**                | 464 and newer     | Optional                                    | The timeout for all HTTP calls made to Immuta in milliseconds. Defaults to `30000` (30 seconds).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
   | **`immuta.user.admin`**                               | 392 and newer     | Required if `immuta.group.admin` is not set | This property identifies the Starburst user who is an Immuta administrator (for example, `immuta.user.admin=immuta_system_account`). This user will not have Immuta policies applied to them because this account will run the subqueries. Therefore, data sources should be created by this user so that they have access to everything. This property can be used in conjunction with the `immuta.group.admin` property, and regex filtering can be used (with a `\|` delimiter at the end of each expression) to assign multiple users as the Immuta administrator. Note that you must escape regex special characters (for example, `john\\.doe+svcacct@immuta\\.com`).                                                                                                                                                                                                                                                                                                                                                                                                                                               |
2. Enable the Immuta access control plugin in Starburst's configuration file (**`/etc/starburst/config.properties`** for Docker installations or **`<starburst_install_directory>/etc/config.properties`** for standalone installations). For example,

   ```conf
   access-control.config-files=/etc/starburst/immuta-access-control.properties
   ```

#### Example Immuta System Access Control Configuration

The example configuration snippet below uses the default configuration settings for `immuta.allowed.immuta.datasource.operations` and `immuta.allowed.non.immuta.datasource.operations`, which allow read access for data registered as Immuta data sources and read and write access on data that is not registered in Immuta. See the [Granting Starburst (Trino) privileges section](https://documentation.immuta.com/SaaS/govern/secure-your-data/authoring-policies-in-secure/section-contents/reference-guides/subscription-access-types#granting-starburst-trino-privileges) for details about customizing and enforcing read and write access controls in Starburst.

```conf
# Enable the Immuta System Access Control (v2) implementation.
access-control.name=immuta

# The Immuta endpoint that was displayed when enabling the Starburst integration in Immuta.
immuta.endpoint=http://service.immuta.com:3000

# The Immuta API key that was displayed when enabling the Starburst integration in Immuta.
immuta.apikey=45jdljfkoe82b13eccfb9c

# The administrator user regex. Starburst usernames matching this regex will not be subject to
# Immuta policies. This regex should match the user name provided at Immuta data source
# registration.
immuta.user.admin=immuta_system_account

# Optional argument (default is shown).
# A CSV list of operations allowed on schemas/tables registered as Immuta data sources.
immuta.allowed.immuta.datasource.operations=READ

# Optional argument (default is shown).
# A CSV list of operations allowed on schemas/tables not registered as Immuta data sources.
# Set to empty to allow no operations on non-Immuta data sources.
immuta.allowed.non.immuta.datasource.operations=READ,WRITE

# Optional argument (default is shown).
# Controls table metadata filtering for inaccessible tables.
#   - When this property is enabled and non-Immuta reads are also enabled, a user performing
#     'show catalogs/schemas/tables' will not see metadata for a table that is registered as
#     an Immuta data source but the user does not have access to through Immuta.
#   - When this property is enabled and non-Immuta reads and writes are disabled, a user
#     performing 'show catalogs/schemas/tables' will only see metadata for tables that the
#     user has access to through Immuta.
#   - When this property is disabled, a user performing 'show catalogs/schemas/tables' can see
#     all metadata.
immuta.filter.unallowed.table.metadata=false
```

### 3 - Add Starburst Users to Immuta

1. [Configure your external IAM](https://documentation.immuta.com/SaaS/configuration/people/section-contents/reference-guides/index) to add users to Immuta.
2. [Map their Starburst usernames](https://documentation.immuta.com/SaaS/configuration/people/users-index/how-to-guides/external-user-mapping) when configuring your IAM (or map usernames manually) to Immuta.
   * All Starburst users must map to Immuta users or match the `immuta.user.admin` regex configured on the cluster, and their Starburst username must be mapped to Immuta so they can query policy-enforced data.
   * A user impersonating a different user in Starburst requires the IMPERSONATE\_USER permission in Immuta. Both users must be mapped to an Immuta user, or the querying user must match the configured `immuta.user.admin` regex.

### 4 - Register data

[Register Starburst (Trino) data in Immuta](https://documentation.immuta.com/SaaS/configuration/integrations/data-and-integrations/registering-metadata/register-data-sources/trino-tutorial).

## Trino Cluster Configuration

### 1 - Enable the Integration

1. Click the <i class="fa-gear">:gear:</i> **App Settings** icon in the navigation menu.
2. Click the **Integrations** tab.
3. Click **Add Integration** and select **Trino** from the dropdown menu.
4. Click **Save**.

### 2 - Configure the Immuta System Access Control Plugin in Trino

{% hint style="info" %}
**Default configuration property values**

If you use the default property values in the configuration file described in this section,

* you will **give users read and write access to tables that are not registered in Immuta** and
* results for `SHOW` queries will not be filtered on table metadata.

These default settings help ensure that a new Starburst integration installation is minimally disruptive for existing Trino deployments, allowing you to then add Immuta data sources and update configuration to enforce more controls as you see fit.

However, the **`access-control.config-files`** property can be configured to allow Immuta to work with existing Trino installations that have already configured an access control provider. For example, if the Starburst (Trino) integration is configured to allow users write access to tables that are not protected by Immuta, you can still lock down write access for specific non-Immuta tables using an additional access control provider.
{% endhint %}

1. The Immuta Trino plugin version matches the version of the corresponding Trino releases. For example, the Immuta plugin version supporting Trino version 403 is simply version `403`. Navigate to the [Immuta GitHub repository](https://github.com/immuta/trino-artifacts/releases) for a list of supported Trino versions. Immuta follows [Starburst's release cycle](https://docs.starburst.io/latest/versions.html), but you can contact your Immuta representative for a specific Trino OSS release.
2. Download the assets for the release that corresponds to your Trino version.
3. Enable Immuta on your cluster. Select the tab below that corresponds to your installation method for instructions:

{% tabs %}
{% tab title="Docker installations" %}
**Docker installations**

1. Follow [Trino's documentation](https://trino.io/docs/current/installation/plugins.html#plugins-installation) to install the plugin archive on all nodes in your cluster.
2. Create the Immuta access control configuration file in the Trino configuration directory: **`/etc/trino/immuta-access-control.properties`**.

<details>

<summary>immuta-trino Docker image</summary>

For Trino versions 414 and newer, an `immuta-trino` Docker image that includes the Trino plugin jars is available from ocir.immuta.com. Before using this image, consider the following factors:

* This image was designed to provide a method for organizations to quickly set up and validate the integration, so it should be used in a development environment. Use the Docker installation method above for production environments.
* Immuta only supports the Immuta Trino plugin on the Docker image, not any other software packaged on the image.
* If you experience an issue with the image outside of the scope of the Immuta plugin, you must rebuild your own version of the image using the Docker installation method above.

To use this image,

1. Pull the image and start the container. The example below specifies the Immuta Trino plugin version 414 with the `414` tag, but any supported Trino version newer than 414 can be used:

   ```
   docker run ocir.immuta.com/immuta/immuta-trino:414
   ```
2. Create the Immuta access control configuration file in the Trino configuration directory: **`/etc/trino/immuta-access-control.properties`**.

</details>
{% endtab %}

{% tab title="Standalone installations" %}
**Standalone installations**

1. Follow [Trino's documentation](https://trino.io/docs/current/installation/plugins.html#plugins-installation) to install the plugin archive on all nodes in your cluster.

2. Create the Immuta access control configuration file in the Trino configuration directory: **`<trino_install_directory>/etc/immuta-access-control.properties`**.
   {% endtab %}
   {% endtabs %}

3. Configure the properties described in the table below.

   | Property                                              | Trino version | Required or optional                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   | ----------------------------------------------------- | ------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | **`access-control.name`**                             | 392 and newer | Required                                    | This property enables the integration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
   | **`access-control.config-files`**                     | 392 and newer | Optional                                    | Trino allows you to enable multiple system access control providers at the same time. To do so, add providers to this property as comma-separated values. This approach allows Immuta to work with existing Trino installations that have already configured an access control provider. Immuta does not manage all permissions in Trino and will default to allowing access to anything Immuta does not manage so that the Starburst (Trino) integration complements existing controls. For example, if the Starburst (Trino) integration is configured to allow users write access to tables that are not protected by Immuta, you can still lock down write access for specific non-Immuta tables using an additional access control provider.                                                                                                                                                                                                                                                                                                                                                                         |
   | **`immuta.allowed.immuta.datasource.operations`**     | 413 and newer | Optional                                    | This property defines a comma-separated list of allowed operations for Starburst (Trino) users on tables registered as Immuta data sources: `READ`,`WRITE`, and `OWN`. (See the [Customize read and write access policies for Starburst (Trino) guide](https://documentation.immuta.com/SaaS/configuration/integrations/starburst-trino/how-to-guides/write-access-mapping) for details about the `OWN` operation.) When set to `WRITE`, all querying users are allowed read and write operations to data source schemas and tables. By default, this property is set to `READ`, which blocks write operations on data source tables and schemas. *If* [*write policies*](https://documentation.immuta.com/SaaS/govern/secure-your-data/authoring-policies-in-secure/section-contents/reference-guides/subscription-access-types#granting-starburst-trino-privileges) *are enabled for your Immuta tenant, this property is set to `READ,WRITE` by default, so users are allowed read and write operations to data source schemas and tables.*                                                                            |
   | **`immuta.allowed.non.immuta.datasource.operations`** | 392 and newer | Optional                                    | This property defines a comma-separated list of allowed operations users will have on tables not registered as Immuta data sources: `READ`, `WRITE`, `CREATE`, and `OWN`. (See the [Customize read and write access policies for Starburst (Trino) guide](https://documentation.immuta.com/SaaS/configuration/integrations/starburst-trino/how-to-guides/write-access-mapping) for details about `CREATE` and `OWN` operations.) When set to `READ`, users are allowed read operations on tables not registered as Immuta data sources. When set to `WRITE`, users are allowed read and write operations on tables not registered as Immuta data sources. If this property is left empty, users will not get access to any tables outside Immuta. By default, this property is set to `READ,WRITE`. *If* [*write policies*](https://documentation.immuta.com/SaaS/govern/secure-your-data/authoring-policies-in-secure/section-contents/reference-guides/subscription-access-types#granting-starburst-trino-privileges) *are enabled for your Immuta tenant, this property is set to `READ,WRITE,OWN,CREATE` by default.* |
   | **`immuta.apikey`**                                   | 392 and newer | Required                                    | This should be set to the Immuta API key displayed when enabling the integration on the app settings page. To rotate this API key, use the [Integrations API](https://documentation.immuta.com/SaaS/developer-guides/api-intro/integrations-api/how-to-guides/trino-api#generate-a-new-immuta-api-key) to generate a new API key, and then replace the existing `immuta.apikey` value with the new one.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
   | **`immuta.audit.legacy.enabled`**                     | 435 and newer | Optional                                    | This property allows you to turn off Starburst (Trino) audit. Must set both `immuta.audit.legacy.enabled` and `immuta.audit.uam.enabled` to `false` to fully disable query audit.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
   | **`immuta.audit.uam.enabled`**                        | 435 and newer | Optional                                    | This property allows you to turn off Starburst (Trino) audit. Must set both `immuta.audit.legacy.enabled` and `immuta.audit.uam.enabled` to `false` to fully disable query audit.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
   | **`immuta.ca-file`**                                  | 392 and newer | Optional                                    | This property allows you to specify a path to your CA file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   | **`immuta.cache.views.seconds`**                      | 392 and newer | Optional                                    | Amount of time in seconds for which a user's specific representation of an Immuta data source will be cached for. Changing this will impact how quickly policy changes are reflected for users actively querying Trino. By default, cache expires after 30 seconds.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
   | **`immuta.cache.datasource.seconds`**                 | 392 and newer | Optional                                    | Amount of time in seconds for which a user's available Immuta data sources will be cached for. Changing this will impact how quickly data sources will be available due to changing projects or subscriptions. By default, cache expires after 30 seconds.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
   | **`immuta.endpoint`**                                 | 392 and newer | Required                                    | The protocol and fully qualified domain name (FQDN) for the Immuta tenant used by Trino (for example, `https://my.immuta.tenant.io`). This should be set to the endpoint displayed when enabling the integration on the app settings page.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
   | **`immuta.filter.unallowed.table.metadata`**          | 392 and newer | Optional                                    | When set to false, Immuta won't filter unallowed table metadata, which helps ensure Immuta remains noninvasive and performant. If this property is set to true, running `show catalogs`, for example, will reflect what that user has access to instead of returning all catalogs. By default, this property is set to false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
   | **`immuta.group.admin`**                              | 420 and newer | Required if `immuta.user.admin` is not set  | This property identifies the Trino group that is the Immuta administrator. The users in this group will not have Immuta policies applied to them. Therefore, data sources should be created by users in this group so that they have access to everything. This property can be used in conjunction with the `immuta.user.admin` property, and regex filtering can be used (with a `\|` delimiter at the end of each expression) to assign multiple groups as the Immuta administrator. Note that you must escape regex special characters (for example, `john\\.doe+svcacct@immuta\\.com`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
   | **`immuta.http.timeout.milliseconds`**                | 464 and newer | Optional                                    | The timeout for all HTTP calls made to Immuta in milliseconds. Defaults to `30000` (30 seconds).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
   | **`immuta.user.admin`**                               | 392 and newer | Required if `immuta.group.admin` is not set | This property identifies the Trino user who is an Immuta administrator (for example, `immuta.user.admin=immuta_system_account`). This user will not have Immuta policies applied to them because this account will run the subqueries. Therefore, data sources should be created by this user so that they have access to everything. This property can be used in conjunction with the `immuta.group.admin` property, and regex filtering can be used (with a `\|` delimiter at the end of each expression) to assign multiple users as the Immuta administrator. Note that you must escape regex special characters (for example, `john\\.doe+svcacct@immuta\\.com`).                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

4. Enable the Immuta access control plugin in Trino's configuration file (**`/etc/trino/config.properties`** for Docker installations or **`<trino_install_directory>/etc/config.properties`** for standalone installations). For example,

   ```conf
   access-control.config-files=/etc/trino/immuta-access-control.properties
   ```

#### Example Immuta System Access Control Configuration

The example configuration snippet below uses the default configuration settings for `immuta.allowed.immuta.datasource.operations` and `immuta.allowed.non.immuta.datasource.operations`, which allow read access for data registered as Immuta data sources and read and write access on data that is not registered in Immuta. See the [Granting Starburst (Trino) privileges section](https://documentation.immuta.com/SaaS/govern/secure-your-data/authoring-policies-in-secure/section-contents/reference-guides/subscription-access-types#granting-starburst-trino-privileges) for details about customizing and enforcing read and write access controls in Starburst.

```conf
# Enable the Immuta System Access Control (v2) implementation.
access-control.name=immuta

# The Immuta endpoint that was displayed when enabling the Starburst integration in Immuta.
immuta.endpoint=http://service.immuta.com:3000

# The Immuta API key that was displayed when enabling the Starburst integration in Immuta.
immuta.apikey=45jdljfkoe82b13eccfb9c

# The administrator user regex. Starburst usernames matching this regex will not be subject to
# Immuta policies. This regex should match the user name provided at Immuta data source
# registration.
immuta.user.admin=immuta_system_account

# Optional argument (default is shown).
# A CSV list of operations allowed on schemas/tables registered as Immuta data sources.
immuta.allowed.immuta.datasource.operations=READ

# Optional argument (default is shown).
# A CSV list of operations allowed on schemas/tables not registered as Immuta data sources.
# Set to empty to allow no operations on non-Immuta data sources.
immuta.allowed.non.immuta.datasource.operations=READ,WRITE

# Optional argument (default is shown).
# Controls table metadata filtering for inaccessible tables.
#   - When this property is enabled and non-Immuta reads are also enabled, a user performing
#     'show catalogs/schemas/tables' will not see metadata for a table that is registered as
#     an Immuta data source but the user does not have access to through Immuta.
#   - When this property is enabled and non-Immuta reads and writes are disabled, a user
#     performing 'show catalogs/schemas/tables' will only see metadata for tables that the
#     user has access to through Immuta.
#   - When this property is disabled, a user performing 'show catalogs/schemas/tables' can see
#     all metadata.
immuta.filter.unallowed.table.metadata=false
```

### 3 - Add Trino Users to Immuta

1. [Configure your external IAM](https://documentation.immuta.com/SaaS/configuration/people/section-contents/reference-guides/index) to add users to Immuta.
2. [Map their Trino usernames](https://documentation.immuta.com/SaaS/configuration/people/users-index/how-to-guides/external-user-mapping) when configuring your IAM (or map usernames manually) to Immuta.
   * All Trino users must map to Immuta users or match the `immuta.user.admin` regex configured on the cluster, and their Trino username must be mapped to Immuta so they can query policy-enforced data.
   * A user impersonating a different user in Trino requires the IMPERSONATE\_USER permission in Immuta. Both users must be mapped to an Immuta user, or the querying user must match the configured `immuta.user.admin` regex.

### 4 - Register data

[Register Starburst (Trino) data in Immuta](https://documentation.immuta.com/SaaS/configuration/integrations/data-and-integrations/registering-metadata/register-data-sources/trino-tutorial).
