All pages
Powered by GitBook
1 of 13

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

How-to Guides

Reference Guides

Starburst (Trino)

Learn about how you can register data from Starburst (Trino) and enforce access controls on that data

In this integration, Immuta policies are translated into Starburst rules and permissions and applied directly to tables within users’ existing catalogs.

This guide outlines how to integrate Starburst with Immuta.

How-to guides

  • Register a Trino connection

  • Starburst (Trino) integration configuration guide: Configure the integration in Immuta.

  • : Configure how read and write access subscription policies translate to Starburst (Trino) privileges and apply to Starburst (Trino) data sources.

  • : This guide describes the design and components of the integration when registered with a connection.

  • : This guide describes the design and components of the integration.

Security and Compliance

Understand the authentication methods and audit features supported by the Trino integration to ensure you are meeting your organization's security and compliance needs

Authentication

Registering the connection

The Trino integration supports the following authentication methods to register a connection. The credentials provided must be for an account with the permissions listed in the Register a Trino connection guide.

  • Username and password: You can authenticate with your Trino username and password.

  • OAuth 2.0: You can authenticate with OAuth 2.0. Immuta's OAuth authentication method uses the Client Credentials Flow; when you register a connection, Immuta reaches out to your OAuth server to generate a JSON web token (JWT) and then passes that token to the Trino cluster. Therefore, when using OAuth authentication to register a connection in Immuta, configure your Trino cluster to use JWT authentication, not OpenID Connect or OAuth.

The built-in Immuta IAM can be used as a complete solution for authentication and user entitlement. However, you can connect your existing identity management provider to Immuta to use that system for authentication and user entitlement instead.

Each of the supported identity providers includes a specific set of configuration options that enable Immuta to communicate with the IAM system and map the users, permissions, groups, and attributes into Immuta.

See the for a list of supported providers and details.

See the for details about user provisioning and mapping user accounts to Immuta.

Multiple system access control providers can be configured in the Trino integration. This approach allows Immuta to work with existing Trino installations that already have an access control provider configured.

Immuta does not manage all permissions in Trino, so it will default to allowing access to anything Immuta does not manage. This ensures that the Trino integration complements existing controls.

For example, if the 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.

If you have multiple access control providers configured, those providers interact in the following ways:

  • For a user to have access to a resource (catalog, schema, or a table), that user must have access in all of the configured access control providers.

  • In catalog, schema, or table filtering (such as show catalogs, show schemas, or show tables), the user will see the intersection of all access control providers. For example, if a Trino environment includes the catalogs public, demo, and restricted

See the for details on configuring multiple access control providers.

Immuta provides auditing features and governance reports so that data owners and governors can monitor users' access to data and detect anomalies in behavior.

You can view the information in these audit logs on or export the full audit logs to S3 and ADLS for long-term backup and processing with log data processors and tools. This capability fosters convenient integrations with log monitoring services and data pipelines.

See the for details about these capabilities and how they work with the Trino integration.

Immuta captures queries in Trino, making audit records more useful in assessing what users are doing. To audit Trino queries, Immuta uses the Trino event listener to translate events in comprehensive audit logs. Immuta will only audit queries from Immuta users on objects registered as Immuta data sources.

Query audit is enabled by default on all Trino integrations, but you can disable it when by changing the following properties in the : immuta.audit.legacy.enabled and immuta.audit.uam.enabled.

See the for audit log contents and an example of the resulting audit record.

Immuta governance reports allow users with the GOVERNANCE Immuta permission to use a natural language builder to instantly create reports that delineate user activity across Immuta. These reports can be based on various entity types, including users, groups, projects, data sources, purposes, policy types, or connection types.

See the page for a list of report types and guidance.

Protecting Data

Learn how Immuta enforces policies on data in your Trino environment

In the Trino integration, the Trino Immuta plugin enforces policies on data registered in Immuta at query time. The sequence diagram below outlines the events that occur when an Immuta user who is subscribed to a data source queries it in Trino.

Registering a connection

Trino is configured and data is registered through connections, an Immuta feature that allows administrators to register data objects in a technology through a single connection to make data registration more scalable for your organization.

Once the Trino connection is registered, you can author subscription and data policies in Immuta to enforce access controls.

See the Trino integration reference guide for more details about registering a connection.

Protecting data

After data objects are registered in Immuta, you can author data and subscription policies in Immuta to enforce access controls.

Subscription policies

When a subscription policy is applied to a data source, users who meet the conditions of the policy will be automatically subscribed to the data source. Then, the Trino Immuta plugin will allow the user to query that object.

See the for guidance on applying a subscription policy to a data source. See the for details about the subscription policy types supported and Trino privileges Immuta grants on objects registered as Immuta data sources.

When a data policy is applied to a data source and a user subscribed to that data source queries it, the Immuta Trino plugin will request the policy definitions from the Immuta API. The Immuta API returns a SQL view definition to represent data policies. After that, the user's query result will be returned with the policy-protected data.

See the for guidance on authoring data policies in Immuta and the for the Trino integration.

and one provider restricts a user from accessing the
restricted
catalog and another provider restricts the user from accessing the
demo
catalog, running
show catalogs
will only return the
public
catalog for that user.
  • Only one column masking policy can be applied per column across all system access control providers. If two or more access control providers return a mask for a column, Trino will throw an error at query time.

  • For row filtering policies, the expression for each system access control provider is applied one after the other.

  • Identity providers for user authentication

    System access control providers

    Users cannot bypass Immuta controls by changing roles in their system access control provider.

    Auditing and compliance

    Trino query audit

    Governance reports

    Identity managers guide
    Trino reference guide
    Customize the Immuta Trino plugin page
    dashboards
    Audit documentation
    registering the connection
    configuration file
    Trino query audit logs page
    Governance report types

    Reference guides

    Map read and write access policies to Starburst (Trino) privileges
    Trino connection reference guide
    ​Starburst (Trino) integration reference guide
    Getting started

    Data policies

    Author a subscription policy page
    Subscription policy access types page
    Data policies page
    supported data policies

    Accessing Data

    Learn how end users can access policy-enforced data in Trino

    Once data is registered through the Trino connection, you will access your data through your Trino cluster as you normally would. If you are subscribed to the data source, Immuta grants you access to the data in Trino.

    When you submit a query, the Trino Immuta plugin reaches out to Immuta and then provides policy decisions to the Trino execution engine. Then, the Trino execution engine applies policies to the backing catalogs and processes the query. You then get back the policy-enforced data.

    The diagram below illustrates how Immuta, the Trino Immuta plugin, and the Trino execution engine interact when you access data.

    User impersonation

    User impersonation allows Trino users to query data as another Immuta user. The Trino integration supports native Trino impersonation approaches:

    • JDBC method: In your JDBC connection driver properties, set the sessionUser property to the Immuta user you want to impersonate. See the for details.

    • Trino CLI method: Set the --session-user property to specify the session user as the Immuta user you want to impersonate when invoking the . See the for details.

    User impersonation is automatically enabled with your Trino integration, but the authenticated user must be or match the Trino .

    Starburst JDBC driver documentation
    Trino CLI
    Trino release notes
    given the IMPERSONATE_USER permission in Immuta
    immuta.user.admin regex configuration property

    Rotate the System API Key

    Rotate the system API key to mitigate potential security risks

    When you register the Trino connection, Immuta generates an API key for you to add to your Immuta access control properties file for API authentication between Starburst (Trino) and Immuta. You can rotate this shared secret to mitigate potential security risks and comply with your organizational policies.

    Cluster restart required

    To update your API key in Starburst (Trino), you must shut down your cluster, generate and update the API key, and then restart your cluster. If you do not shut down your cluster, generating a new API key using the endpoint below will cause downtime for your deployment.

    1. Disable your Starburst (Trino) cluster.

    2. Copy the request example below and replace these values:

      • Replace the Immuta URL with your own and the with your own user API key.

      • Replace the following parameters:

        • name parameter with the unique name of the Trino API key you want to regenerate.

        • connectionKey parameter of the Trino connection associated with the API key.

      Once you make this request, your old Immuta API key will be deleted and will no longer be valid.

    3. The response includes your new Immuta API key. with this new key.

    4. .

    • 400: Connection key not found, scopes invalid, or a key with the same name exists for a different connection or scope.

    Error responses

    API key
    Replace the old immuta.apikey value in the Immuta access control properties file
    Enable your Starburst (Trino) cluster
    curl -X 'POST' \
      'https://your.immuta.url.com/apikey/system' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -H 'Authorization: api-key' \
      -d '{
      "name": "trino-connection-1",
      "scopes": ["plugin:trino"],
      "connectionKey": "connection-abc123",
      "regenerate": true
      }'

    Register a Trino Connection

    Register your Trino data

    Requirements

    For Trino connections

    • Trino cluster

    For Starburst connections

    • A valid Starburst Enterprise license.

    • The Starburst Cluster must be publicly accessible or have configured.

    The user registering the connection must have the permissions below.

    • APPLICATION_ADMIN Immuta permission

    • The Trino user must have the ability to

      • Create a new file in the Trino etc directory

    In Trino, create a new system account user with the privileges listed below. Immuta uses this system account continuously to crawl the connection, maintain state between Immuta and Trino, and run identification.

    • SELECT on all securables you want registered in Immuta as data sources

    1. In Immuta, click Data and select Connections in the navigation menu.

    2. Click the + Add Connection button.

    3. Select the Trino tile.

    1. to add users to Immuta.

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

    Create a new Trino user and grant that new user permissions

    Enter the cluster connection information:
    1. Display Name: This is the name of your new connection. This name will be used in the API (connectionKey), in data source names from the host, and on the connections page. Avoid the use of periods (.) or restricted words in your connection name.

    2. Hostname: URL of your Trino cluster.

    3. Port: Port configured for Trino.

    4. SSL Mode: Use the dropdown to select the SSL mode to connect to the host.

      1. Enabled: Use this mode if you have http-server.https.enabled=true set in your Trino cluster's config.properties file.

      2. Disabled: Use this mode for plain, unencrypted connections (e.g., your URL starts with

    5. Certificate Validation: Use the dropdown to select whether to require certificate validation to connect to the host.

      1. Enabled: Use this to ensure Immuta verifies that the server's certificate was issued by a trusted Certificate Authority (CA).

      2. Disabled: Use this setting if you are using a self-signed certificate to skip certificate validation for the connection.

  • Select the authentication method from the dropdown and enter the credentials of the Trino user you created above.

    1. Username and Password: Enter the username and password for the system account user.

    2. OAuth 2.0 with Client Secret:

      • Fill out the Token Endpoint with the full URL of the identity provider. This is where the generated token is sent.

      • Fill out the Client ID. This is a combination of letters, numbers, or symbols, used as a public identifier. This is the subject of the generated token.

      • Enter the Scope (string). The scope limits the operations allowed in Trino by the access token. See the for details about scopes.

      • Enter the Client Secret. Immuta uses this secret to authenticate with the authorization server when it requests a token.

    3. OAuth 2.0 with Client Certificate:

      1. Fill out the Token Endpoint with the full URL of the identity provider. This is where the generated token is sent.

      2. Fill out the Client ID. This is a combination of letters, numbers, or symbols, used as a public identifier. This is the subject of the generated token.

  • Click Save connection.

    1. If you are using Starburst, move on to the next step.

    2. If you are using open-source Trino, you must download the Immuta Trino plugin and add it to your Trino cluster.

      1. The Immuta Trino plugin version matches the version of the corresponding Trino releases. Navigate to the for a list of supported Trino versions. Immuta follows , 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:

        1. Docker installations

          1. Follow to install the plugin archive on all nodes in your cluster.

  • On the Next Steps page, copy the provided immuta-access-control.properties file. It is pre-populated with the required fields:

    1. access-control.name: Leave this as immuta.

    2. immuta.endpoint: This is your tenant URL. Use the value provided in the file.

    3. immuta.apikey: This is how Immuta applies policy to your users' queries. Use the value provided in the file.

    4. immuta.user.admin: This is your Trino system account user. To ensure tables can be properly ingested into Immuta, no Immuta policies will ever apply to this user. Use the value pre-populated in the file to match the username you initially used to create the connection.

  • Customize any other properties in the file. See the Customize the Immuta Trino plugin page for detailed descriptions of all the properties.

  • Once your file is customized, add it to your Trino cluster's etc folder.

  • Enable the Immuta access control plugin in your Trino cluster's config.properties file:

    access-control.config-files=/etc/trino/immuta-access-control.properties
  • Ensure you have completed all the connection steps, and click Finish.

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

    database

    Permissions

    Create the system account user

    Register a Trino connection

    Add Trino users to Immuta

    private connectivity
    Configure your external IAM
    Map their Trino usernames
    http://
    ).
    Enter the Scope (string). The scope limits the operations allowed in Trino by the access token. See the for details about scopes.
  • Opt to fill out the Resource field with a URI of the resource where the requested token will be used.

  • Enter the x509 Certificate Thumbprint. This identifies the corresponding key to the token and is often abbreviated as x5t or is called sub (Subject).

  • Upload the Client Certificate, which is used to sign the authorization request.

  • Create the Immuta access control configuration file in the Trino configuration directory: /etc/trino/immuta-access-control.properties.
  • Standalone installations

    1. Follow 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.

  • OAuth 2.0 documentation
    Immuta GitHub repository
    Starburst's release cycle
    Trino's documentation
    OAuth 2.0 documentation
    Trino's documentation

    Getting Started with Starburst (Trino)

    Learn how to best implement Immuta with Starburst (Trino) in your data ecosystem

    The how-to guides linked on this page illustrate how to integrate Starburst (Trino) with Immuta. See the reference guide for information about the Starburst (Trino) integration.

    1

    Connect your technology

    These guides provide instructions on getting your data set up in Immuta for the Request and Govern apps.

    1. : Install the Immuta Starburst (Trino) plugin in Starburst or Trino so that policies can be applied to data objects.

    2. : This will register your data objects into Immuta and allow you to start dictating access through access requests or global policies.

    3. : Use domains to segment your data and assign responsibilities to the appropriate team members. These domains will then be used to manage permissions for publishing data products, authoring policies, viewing audit and managing identification.

    2

    Register your users

    These guides provide instructions on getting your users set up in Immuta for the Request and Govern apps.

    1. : Bring the IAM your organization already uses and allow Immuta to register your users for you.

    2. : Ensure the user IDs in Immuta, Starburst (Trino), and your IAM are aligned so that the right policies impact the right users.

    3

    Start using the Request app

    These guides provide instructions on using the for the first time.

    1. : Once you register your data, assets will appear in the Request app where you can attach request forms.

    2. : After you set up request forms, you can put access request links in your catalog for your data consumers to click. This will take them to the Request app to fill out the request form to request access to data.

    4

    Add data metadata

    These guides provide instructions on getting your data metadata set up in Immuta for the Govern app.

    1. : Bring the external catalog your organization already uses and allow Immuta to continually sync your tags with your data sources for you.

    2. : Identification allows you to automate data tagging using identifiers that detect certain data patterns.

    5

    Start using the Govern app

    These guides provide instructions on using the Govern app for the first time.

    1. : Once you add your data metadata to Immuta, you can immediately create policies that utilize your tags and apply to your tables. Subscription policies can be created to dictate access to data sources.

    2. : Data metadata can also be used to create data policies that apply to data sources as they are registered in Immuta. Data policies dictate what data a user can see once they are granted access to a data source. Using catalog and identification tags you can create proactive policies, knowing that they will apply to data sources as they are added to Immuta with the automated tagging.

  • : To grant access to data, data stewards will respond to the access request.

  • : Once you have your data sources and users, and policies granting them access, you can set up audit export. This will export the audit logs from user queries, policy changes, and tagging updates.

  • Configure your Starburst (Trino) integration
    Register Starburst (Trino) data sources
    Organize your data sources into domains and assign domain permissions to accountable teams
    Connect an IAM
    Map external user IDs from Starburst (Trino) to Immuta
    Request app
    Set up a request form for your assets
    Add access request links to your catalog
    Connect an external catalog
    Run identification
    Author a global subscription policy
    Author a global data policy
    Respond to an access request
    Configure audit

    Customize the Immuta Trino Plugin

    Learn about the available Trino plugin properties so that you can customize your Trino integration

    When you register a connection, there is a provided immuta-access-control.properties file pre-populated with the required properties. You can also add these additional properties to further customize your connection.

    immuta-access-control.properties

    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.

    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 data sources in Immuta and

    Property
    Trino version
    Required or optional
    Description

    access-control.name

    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 for details about customizing and enforcing read and write access controls in Starburst.

    results for SHOW queries will not be filtered on table metadata.

    These default settings help ensure that a new Starburst connection is minimally disruptive for existing Starburst deployments, allowing you to then create 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.

    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 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 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 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 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 registering the connection. To rotate this API key, follow these instructions 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.datasources.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 registering the connection.

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

    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. This should be the Starburst user provided when registering the connection. Note that you must escape regex special characters (for example, john\\.doe+svcacct@immuta\\.com).

    Example Immuta system access control file

    Granting Starburst (Trino) privileges section
    # Enable the Immuta System Access Control implementation.
    access-control.name=immuta
    
    # The Immuta endpoint that was displayed when registering the Trino connection in Immuta.
    immuta.endpoint=http://service.immuta.com:3000
    
    # The Immuta API key that was displayed when registering the Trino in Immuta.
    immuta.apikey=45jdljfkoe82b13eccfb9c
    
    # The administrator user regex. Trino 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

    Configure Starburst (Trino) Integration

    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 .

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

    • Starburst Cluster Configuration: These instructions are specific to Starburst Enterprise clusters.

    • Trino Cluster Configuration: These instructions are specific to open-source Trino clusters.

    Starburst Cluster Configuration

    Requirements

    • A valid .

    • The Starburst Cluster must be publicly accessible or have configured.

    1. Click the 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.

    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

    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 for details about customizing and enforcing read and write access controls in Starburst.

    1. to add users to Immuta.

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

    .

    1. Click the App Settings icon in the navigation menu.

    2. Click the Integrations tab.

    3. Click Add Integration and select Trino from the dropdown menu.

    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 for a list of supported Trino versions. Immuta follows , 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:

    Docker installations

    1. Follow 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.

    Standalone installations

    1. Configure the properties described in the table below.

      Property
      Trino version
      Required or optional
      Description

    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 for details about customizing and enforcing read and write access controls in Starburst.

    1. to add users to Immuta.

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

    .

    Click Save.
    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 . 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

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

    Click Save.
    1. Follow Trino's documentation 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.

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

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

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

    # 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

    access-control.name

    392 and newer

    # 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

    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.

    1 - Enable the Integration

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

    Example Immuta System Access Control Configuration

    3 - Add Starburst Users to Immuta

    4 - Register data

    Trino Cluster Configuration

    1 - Enable the Integration

    2 - Configure the Immuta System Access Control Plugin in Trino

    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.

    immuta-trino Docker image

    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:

    2. Create the Immuta access control configuration file in the Trino configuration directory: /etc/trino/immuta-access-control.properties.

    Example Immuta System Access Control Configuration

    3 - Add Trino Users to Immuta

    4 - Register data

    Starburst Enterprise license
    private connectivity
    Granting Starburst (Trino) privileges section
    Configure your external IAM
    Map their Starburst usernames
    Register Starburst (Trino) data in Immuta
    Immuta GitHub repository
    Starburst's release cycle
    Trino's documentation
    Granting Starburst (Trino) privileges section
    Configure your external IAM
    Map their Trino usernames
    Register Starburst (Trino) data in Immuta
    connections

    Required

    are enabled for your Immuta tenant, this property is set to
    READ,WRITE,OWN,CREATE
    by default.

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

    Starburst built-in access control system
    Customize read and write access policies for Starburst (Trino) guide
    write policies
    Customize read and write access policies for Starburst (Trino) guide
    write policies
    Integrations API
    docker run ocir.immuta.com/immuta/immuta-trino:414

    Customize Read and Write Access Policies for Starburst (Trino)

    Customize how read and write access policies will be enforced when authored

    Private preview: Write policies are available to select accounts. Contact your Immuta representative to enable this feature.

    Requirements

    • Starburst (Trino) version 438 or newer

    • Write policies for Starburst (Trino) enabled. Contact your Immuta representative to get this feature enabled on your account.

    Configuration options

    In its default setting, the Starburst (Trino) integration's write access value controls the authorization of SQL operations that perform data modification (such as INSERT, UPDATE, DELETE, MERGE, and TRUNCATE). However, administrators can allow table modification operations (such as ALTER and DROP tables) to be authorized as write operations. Two locations allow administrators to specify how are applied to data in Starburst (Trino). Select one or both of the options below to customize these settings. If the access-control.properties file is used, it may override the policies configured in the Immuta web service.

    • Immuta web service: Configure write policies in the Immuta web service to allow all Starburst (Trino) clusters targeting that Immuta tenant to receive the same write policy configuration for data sources. This configuration will only affect tables or views registered as Immuta data sources.

    • Starburst (Trino) cluster: Configure write policies using the access-control.properties file in or to broadly customize access for Immuta users on a specific cluster. This configuration file takes precedence over write policies passed from the Immuta web service. Use this option if all Immuta users should have the same level of access to tables regardless of the write policy setting in the Immuta web service.

    Contact your Immuta representative to configure read and write access in the Immuta web service if all Starburst (Trino) data source operations should be affected identically across Starburst (Trino) clusters connected to your Immuta tenant. A configuration example is provided below.

    The following example maps WRITE to READ, WRITE and OWN permissions and READ to just READ. Both READ and WRITE permissions should always include READ:

    Given the above configuration, when a user gets write access to a Starburst (Trino) data source, they will have both data and table modification permissions on that data source. See the Starburst (Trino) privileges section of the for details about these operations.

    Modify one or both properties below in the immuta-access-control.properties file in your Trino or Starburst cluster to customize the behavior of read or write access policies for all users:

    • immuta.allowed.immuta.datasource.operations: This property governs objects (catalogs, schemas, tables, etc.) that are registered as data sources in Immuta. These permissions apply to all querying users except for administrators defined in immuta.user.admin (who get all permissions).

      • READ: Grants SELECT on tables or views; grants SHOW on tables, views, or columns

    For example, the following configuration allows READ, WRITE, and OWN operations to be authorized on data sources registered in Immuta and all operations are permitted on data that is not registered in Immuta:

  • WRITE: Grants INSERT, UPDATE, DELETE, MERGE, or TRUNCATE on tables; grants REFRESH on materialized views.

  • OWN: Grants ALTER and DROP on tables; grants SET on comments and properties

  • immuta.allowed.non.immuta.datasource.operations: This property governs objects (catalogs, schemas, tables, etc.) that are not registered as data sources in Immuta. Use all or a combination of the following access values:

    • READ: Grants SELECT on tables or views; grants SHOW on tables, views, or columns

    • WRITE: Grants INSERT, UPDATE, DELETE, MERGE, or TRUNCATE on tables; grants REFRESH on materialized views.

    • OWN: Grants ALTER and DROP on tables; grants SET on comments and properties

    • CREATE: Grants CREATE on catalogs, schema, tables, and views. This is the only property that can allow CREATE permissions, since CREATE is enforced on new objects that do not exist in Starburst or Immuta yet (such as a new table being created with CREATE TABLE).

  • Immuta web service configuration

    Configuration example

    Cluster configuration

    read and write access policies
    Starburst
    Trino
    Subscription policy access types guide
    accessGrantMapping:
      WRITE: ['READ', 'WRITE', 'OWN']
      READ: ['READ']
    immuta.allowed.immuta.datasource.operations=READ,WRITE,OWN
    immuta.allowed.non.immuta.datasource.operations=READ,WRITE,CREATE,OWN

    Trino Integration Reference Guide

    Learn about how the Trino integration works and what Immuta creates in your environment to administer Trino access controls directly on objects in Trino

    Using the Trino connection, you can register a Trino integration for your open-source Trino or Starburst Enterprise cluster.

    The sequence diagram below outlines the events that occur when an Immuta user wants to query a Trino table that has been registered as an Immuta data source.

    What does Immuta do in my Trino cluster?

    Registering a connection

    Immuta utilizes connections to register and manage data from your entire Trino cluster all at once. This approach simplifies data registration and allows Immuta to automatically monitor your Trino platform for changes. Data sources are then added or removed to reflect the current state of your data platform.

    When a connection is first registered, Immuta will complete or ask your application admin to complete a few actions:

    • The application admin must provide credentials that Immuta will use to initially register all of your Trino tables as data objects. Immuta will also continue to use those credentials for scheduled and .

    • The application admin will also install the Immuta Trino plugin on your Trino cluster and update your Trino cluster's config.properties file to use the Immuta Trino plugin for access control. Immuta will use the Immuta Trino plugin to to user queries and provide events.

    • Immuta ingests and stores connection metadata in the Immuta metadata database.

    Immuta presents a hierarchical view of your data that reflects the hierarchy of objects in Trino after registration is complete:

    • Cluster

    • Catalog

    • Schema

    • Tables

    Beyond making the registration of your data more intuitive, connections provide more control. Instead of performing operations on individual schemas or tables, you can perform operations (such as object sync) at the connection level.

    See the for details about connections and how to manage them. To configure your Trino connection, see the .

    By default, the Trino integration is designed to be minimally invasive: if a catalog is not registered as an Immuta data source, users will still have access to it in Trino.

    However, this limited enforcement can be changed in the provided by Immuta. Additionally, you can continue to use Trino's file-based access control provider or on catalogs that are not protected or controlled by Immuta.

    Immuta enforces read and write on Trino tables by checking the user's access at query time and resulting in the appropriate access.

    Once the connection is registered, this is what happens when a user makes a query in Trino:

    1. User runs a query for a Trino table registered in Immuta.

    2. Trino checks with the Immuta Trino plugin in charge of access control to see if the user should see the table.

    3. The Immuta Trino plugin reaches out to the Immuta API to confirm table access.

    You can author in Immuta to enforce fine-grained access controls on Trino data objects registered as Immuta data sources.

    Once a data policy is applied to a Trino data source in Immuta,

    1. A Trino user, who is subscribed to the data source in Immuta, directly in their Trino catalog.

    2. The Trino execution engine calls various methods on the interface to ask the Immuta Trino plugin where the policies should be applied. The masking and row-level security methods apply the actual policy expressions.

    3. The Immuta Trino plugin calls the Immuta API to retrieve policy information for that data source for the querying user, using the querying user's project, purpose, and entitlements.

    See the for a matrix on the data policies supported for this integration.

    See the for details about the Trino privileges granted to users when they are subscribed to a data source protected by a subscription policy.

    Trino's query passthrough is available in most connectors using the query table function or raw_query in the Elasticsearch connector. Consequently, Immuta blocks functions named raw_query or query, as those table functions would completely bypass Immuta’s access controls.

    For example, without blocking those functions, this query would access the public.customer table directly:

    select * from table(postgres.system.query(query => 'select * from public.customer limit 10'));

    You can add or remove functions that are blocked by Immuta in the Trino configuration file. See the for details.

    The privileges that the Trino connection requires align to the least privilege security principle. The table below describes the privilege required by the IMMUTA_SYSTEM_ACCOUNT user.

    Trino privilege
    User requiring the privilege
    Explanation

    The following user actions spur various processes in the Trino connection so that Immuta data remains synchronous with data in Trino. The list below provides an overview of each process:

    • Data source created or updated: Immuta registers data source metadata and stores that metadata in the Immuta metadata database.

    • Data source deleted: Immuta deletes the data source metadata from the metadata database.

    • : When a user account is mapped to Immuta, their metadata is stored in the metadata database.

    Object type
    Subscription policy support
    Data policy support
    Request app support

    Immuta policies can be applied to .

    The descriptions below provide guidance for applying policies to Trino-created logical views in two modes:

    However, there are other approaches you can use to apply policies to Trino-created logical views. The examples below are the simplest approaches.

    Supported object types are found by object sync and automatically kept up to date. The performance of object sync is dependent on how quickly Trino can pull information from the underlying systems. This can impact the time object sync takes to complete.

    For more details about object sync, see the .

    The Trino integration allows users to author subscription and data policies to enforce access controls. See the corresponding pages for details about specific types of policies supported:

    The Trino integration supports the following authentication methods to register a connection. The credentials provided must be for an account with the permissions listed in the .

    • Username and password: You can authenticate with your Starburst (Trino) username and password.

    • OAuth 2.0: You can authenticate with OAuth 2.0. Immuta's OAuth authentication method uses the ; when you register a connection, Immuta reaches out to your OAuth server to generate a JSON web token (JWT) and then passes that token to the Trino cluster. Therefore, when using OAuth authentication to register a connection in Immuta, configure your Trino cluster to use JWT authentication, not OpenID Connect or OAuth.

    When you register the connection, Immuta generates an API key for you to add to your Immuta access control properties file for API authentication between Starburst (Trino) and Immuta. You can rotate this shared secret to mitigate potential security risks and comply with your organizational policies.

    To rotate this API key, see the .

    The built-in Immuta IAM can be used as a complete solution for authentication and user entitlement. However, you can connect your existing identity management provider to Immuta to use that system for authentication and user entitlement instead. Each of the includes a set of configuration options that enable Immuta to communicate with the IAM system and map the users, permissions, groups, and attributes into Immuta.

    For policies to impact the right users, the user account in Immuta must be mapped to the user account in Trino. You can ensure these accounts are mapped correctly in the following ways:

    • : If usernames in Trino align with usernames in the external IAM and those accounts align with an IAM attribute, you can enter that IAM attribute on the app settings page to automatically map user IDs in Immuta to Trino.

    • : You can manually map user IDs for individual users.

    For guidance on connecting your IAM to Immuta, see the .

    • Tag ingestion is not supported.

    • Object sync may be delayed due to delays in Trino and the underlying data platforms.

    • Limit your masked joins to columns with matching column types: Trino truncates the result of the masking expression to conform to the column type when performing the join, so joining two masked columns with different data types produces invalid results when one of the columns' lengths is less than the length of the masked value.

      For example, if the value of a hashed column is 64 characters, joining a hashed varchar(50) and a hashed varchar(255) column will not be joined correctly, since the varchar(50) value is truncated and doesn’t match the varchar(255) value.

    The query results are returned to the data consumer. If the user is not subscribed to the data source, it will result in
    ACCESS_DENIED
    .

    For each column, the Immuta Trino plugin requests a SQL view expression. If there are no masking policies on the column, nothing is returned.

  • For each table, the Immuta Trino plugin requests the rows the user is allowed to see. If there is a row-level policy on the table, the Immuta API returns a corresponding view expression as a WHERE clause. If there are no row-level policies on the table, nothing is returned.

  • The Immuta Trino plugin provides the returned SQL view expression (for masked columns) or WHERE clause SQL view expression (for row filtering) to the Trino execution engine.

  • The Trino execution engine constructs and executes the SQL statement on the backing catalogs and retrieves the data with appropriate policy enforcement.

  • Data consumer sees policy-enforced data in their query result.

  • ✅

    ✅

    Materialized view

    ✅

    ✅

    ✅

    SELECT on all tables

    Immuta system account

    This privilege provides access to all the Trino tables that you want registered in Immuta.

    Table

    ✅

    ✅

    ✅

    View

    Applying policies

    Subscription policies

    Data policies

    Trino privileges granted by Immuta

    Trino query passthrough blocked

    Required Trino privileges

    Maintaining state with Trino

    Supported object types

    Trino-created logical view support

    Views created in the DEFINER security mode

    For views created using the DEFINER security mode, follow the recommendations below:

    • Ensure the user who created the view is configured as the admin user in the Immuta plugin so that policies are never applied to the underlying tables.

    • Create Immuta data sources and apply policies to logical views exposing those tables.

    • Lock down access to the underlying tables in Trino so that all end user access is provided through the views.

    Views created in the INVOKER security mode

    Avoid creating data policies for both a logical view and its underlying tables. Instead, apply policies to the logical view or the underlying tables.

    For views created using the INVOKER security mode, the querying user needs access to the logical view and underlying tables.

    • If non-Immuta table reads are disabled, provide access to the views and tables through Immuta. To do so, create Immuta data sources for the view and underlying tables, and grant access to the querying user in Immuta. If creating data policies, apply the policies to either the view or underlying tables, not both.

    • If non-Immuta table reads are enabled, the user already has access to the table and view. Create Immuta data sources and apply policies to the underlying table; this approach will enforce access controls for both the table and view in Trino.

    Object sync

    Supported policies

    Security and compliance

    Authentication methods

    Rotating the Immuta API key

    User registration and ID mapping

    Limitations and caveats

    object syncs
    identification
    apply policies
    query audit
    Connections reference guide
    Register a Trino connection guide
    configuration file
    Trino's built-in access control system
    subscription policies
    data policies
    queries the corresponding table
    Data policies reference page
    Subscription policy access types page
    Customize the Immuta Trino plugin page
    User account is mapped to Immuta
    Trino-created logical views
    DEFINER security mode
    INVOKER security mode
    Connections reference guide
    Subscription policy access types
    Data policy types
    Register a Trino connection page
    Client Credentials Flow
    Rotate the system API key guide
    supported IAM protocols
    Automatically
    Manually
    how-to guide for your protocol

    ✅