Configure Starburst (Trino) Integration v2.0

Overview

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

Starburst Cluster Configuration

1 - Enable the Integration

1. Click the App Settings icon in the left sidebar.
2. Scroll to the Native Integrations section and click Add Native Integration.
3. Select Trino from the Native Integration Type dropdown menu.

4. Click Save.

2 - Configure the Immuta System Access Control Plugin in Starburst

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 v2.0 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.

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).

TLS Certificate Generation

If you provided your own TLS certificates during Immuta installation, you must ensure that the hostname in your certificate matches the hostname specified in the Starburst (Trino) configuration.

If you did not provide your own TLS certificates, Immuta generated these certificates for you during installation. See notes about your specific deployment method below for details.

• Kubernetes Deployment: Immuta generates a local certificate authority (CA) that signs certificates for each service by default. Ensure that the externalHostname you specified in the Immuta Helm Chart matches the Immuta hostname name specified in the Starburst (Trino) configuration.

• Single Node Docker Deployment: Ensure that the hostname you specified in the immuta.toml file matches the Immuta hostname name specified in the Starburst (Trino) configuration. If you did not specify this property in the immuta.toml file, the installation script sets it for you based on the hostname of the server where you ran the script.

If the hostnames in your certificate don't match the hostname specified in your Starburst (Trino) integration, you can set immuta.disable-hostname-verification to true in the Immuta access control config file to get the integration working in the interim.

The Starburst (Trino) integration uses the immuta.ca-file property to communicate with Immuta. When configuring the plugin in Starburst (outlined below), specify a path to your CA file using the immuta.ca-file property in the Immuta access control configuration file.

The following properties can be set during configuration:

• access-control.name: This property enables the integration. Both the Starburst integration and the Starburst integration v2.0 can be enabled at the same time. The immuta.allowed.non.immuta.datasource.operations property (explained below) must contain at least READ when both integrations are enabled.
• access-control.config-files: 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. 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 v2.0 complements existing controls. For example, if the Starburst integration v2.0 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.ca-file: This property allows you to specify a path to your CA file.
• immuta.endpoint: The protocol and fully qualified domain name (FQDN) for the Immuta instance used by Starburst (for example, https://my.immuta.instance.io). This should be set to the endpoint displayed when enabling the integration on the App Settings page.
• immuta.apikey: This should be set to the Immuta API key displayed when enabling the integration on the App Settings page.
• immuta.user.admin: This property identifies the Starburst 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. Note that you must escape regex special characters (for example, john\\.doe+svcacct@immuta\\.com).
• immuta.allowed.non.immuta.datasource.operations: When set to true, users will have READ and WRITE access to 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 true.
• immuta.filter.unallowed.table.metadata: 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.cache.views.seconds: 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: 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.
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,

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


Example Immuta System Access Control Configuration

# 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.

# 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.

# 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
#   - When this property is disabled, a user performing 'show catalogs/schemas/tables' can see


3 - Add Starburst Users 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.

Trino Cluster Configuration

1 - Enable the Integration

1. Click the App Settings icon in the left sidebar.
2. Scroll to the Native Integrations section and click Add Native Integration.
3. Select Trino from the Native Integration Type dropdown menu.

4. Click Save.

2 - Configure the Immuta System Access Control Plugin in Trino

A user with access to Immuta's Archives site is required to conduct the download in this step. Credentials to access the site can be obtained by visiting the Immuta Download Site and logging in with your Immuta Accounts credentials. At the very bottom of the page is an All Archives section with a here link that will take you directly to the archives site with your account credentials already applied.

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 v2.0 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.

1. Use the table on the Starburst (Trino) Installation Introduction page to determine the version of the plugin you should download. The Starburst (Trino) v2.0 integration is available in Immuta v2022.2.x and newer. Then, download the plugin from Immuta's Archives site. The Starburst (Trino) integration v1.0 and v2.0 exist in the same plugin archive; you will configure which integration will be enabled.

2. Follow Trino's documentation to install the plugin archive on all nodes in your cluster: create the Immuta access control configuration file in the Trino configuration directory (/etc/trino/immuta-access-control.properties for Docker installations or <trino_install_directory>/etc/immuta-access-control.properties for standalone installations).

3. Configure the following properties:

TLS Certificate Generation

If you provided your own TLS certificates during Immuta installation, you must ensure that the hostname in your certificate matches the hostname specified in the Starburst (Trino) configuration.

If you did not provide your own TLS certificates, Immuta generated these certificates for you during installation. See notes about your specific deployment method below for details.

• Kubernetes Deployment: Immuta generates a local certificate authority (CA) that signs certificates for each service by default. Ensure that the externalHostname you specified in the Immuta Helm Chart matches the Immuta hostname name specified in the Starburst (Trino) configuration.

• Single Node Docker Deployment: Ensure that the hostname you specified in the immuta.toml file matches the Immuta hostname name specified in the Starburst (Trino) configuration. If you did not specify this property in the immuta.toml file, the installation script sets it for you based on the hostname of the server where you ran the script.

If the hostnames in your certificate don't match the hostname specified in your Starburst (Trino) integration, you can set immuta.disable-hostname-verification to true in the Immuta access control config file to get the integration working in the interim.

The Starburst (Trino) integration uses the immuta.ca-file property to communicate with Immuta. When configuring the plugin in Starburst (outlined below), specify a path to your CA file using the immuta.ca-file property in the Immuta access control configuration file.

• access-control.name: This property enables the integration. Both the Starburst (Trino) integration and the Starburst (Trino) integration v2.0 can be enabled at the same time. The immuta.allowed.non.immuta.datasource.operations property (explained below) must contain at least READ when both integrations are enabled.
• access-control.config-files: 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 v2.0 complements existing controls. For example, if the Starburst (Trino) integration v2.0 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.ca-file: This property allows you to specify a path to your CA file.
• immuta.endpoint: The protocol and fully qualified domain name (FQDN) for the Immuta instance used by Trino (for example, https://my.immuta.instance.io). This should be set to the endpoint displayed when enabling the integration on the App Settings page.
• immuta.apikey: This should be set to the Immuta API key displayed when enabling the integration on the App Settings page.
• immuta.user.admin: This property identifies the Trino 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. Note that you must escape regex special characters (for example, john\\.doe+svcacct@immuta\\.com).
• immuta.allowed.non.immuta.datasource.operations: By default, users will have READ and WRITE access to tables not registered as Immuta data sources. If this property is left empty, users will not get access to any tables outside Immuta.
• immuta.filter.unallowed.table.metadata: By default, this value is set to false so that Immuta won't filter unallowed table metadata. This configuration 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.
• immuta.cache.views.seconds: 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: 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.
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,

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


Example Immuta System Access Control Configuration

# 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.

# 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.

# 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

• 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.