LogoLogo
2024.2
  • Immuta Documentation - 2024.2
  • What is Immuta?
  • Self-Managed Deployment
    • Getting Started
    • Deployment Requirements
    • Install
      • Managed Public Cloud
      • Red Hat OpenShift
      • Generic Installation
      • Immuta in an Air-Gapped Environment
      • Deploy Immuta without Elasticsearch
    • Configure
      • Ingress Configuration
      • Cosign Verification
      • TLS Configuration
      • Immuta in Production
      • External Cache Configuration
      • Rotating Credentials
      • Enabling Legacy Query Engine and Fingerprint
    • Upgrade
      • Upgrade Immuta
      • Upgrade to Immuta 2024.2 LTS
    • Disaster Recovery
    • Troubleshooting
    • Conventions
    • Release Notes
  • Data and Integrations
    • Immuta Integrations
    • Snowflake
      • Getting Started
      • How-to Guides
        • Configure a Snowflake Integration
        • Snowflake Table Grants Migration
        • Edit or Remove Your Snowflake Integration
        • Integration Settings
          • Enable Snowflake Table Grants
          • Use Snowflake Data Sharing with Immuta
          • Configure Snowflake Lineage Tag Propagation
          • Enable Snowflake Low Row Access Policy Mode
            • Upgrade Snowflake Low Row Access Policy Mode
      • Reference Guides
        • Snowflake Integration
        • Snowflake Data Sharing
        • Snowflake Lineage Tag Propagation
        • Snowflake Low Row Access Policy Mode
        • Snowflake Table Grants
        • Warehouse Sizing Recommendations
      • Phased Snowflake Onboarding Concept Guide
    • Databricks Unity Catalog
      • Getting Started
      • How-to Guides
        • Configure a Databricks Unity Catalog Integration
        • Migrate to Unity Catalog
      • Databricks Unity Catalog Integration Reference Guide
    • Databricks Spark
      • How-to Guides
        • Configuration
          • Simplified Databricks Configuration
          • Manual Databricks Configuration
          • Manually Update Your Databricks Cluster
          • Install a Trusted Library
        • DBFS Access
        • Limited Enforcement in Databricks
        • Hide the Immuta Database in Databricks
        • Run spark-submit Jobs on Databricks
        • Configure Project UDFs Cache Settings
        • External Metastores
      • Reference Guides
        • Databricks Spark Integration
        • Databricks Spark Pre-Configuration Details
        • Configuration Settings
          • Cluster Policies
            • Python & SQL
            • Python & SQL & R
            • Python & SQL & R with Library Support
            • Scala
            • Sparklyr
          • Environment Variables
          • Ephemeral Overrides
          • Py4j Security Error
          • Scala Cluster Security Details
          • Databricks Security Configuration for Performance
        • Databricks Change Data Feed
        • Databricks Libraries Introduction
        • Delta Lake API
        • Spark Direct File Reads
        • Databricks Metastore Magic
    • Starburst (Trino)
      • Getting Started
      • How-to Guides
        • Configure Starburst (Trino) Integration
        • Customize Read and Write Access Policies for Starburst (Trino)
      • Starburst (Trino) Integration Reference Guide
    • Redshift
      • Getting Started
      • How-to Guides
        • Configure Redshift Integration
        • Configure Redshift Spectrum
      • Reference Guides
        • Redshift Integration
        • Redshift Pre-Configuration Details
    • Azure Synapse Analytics
      • Getting Started
      • Configure Azure Synapse Analytics Integration
      • Reference Guides
        • Azure Synapse Analytics Integration
        • Azure Synapse Analytics Pre-Configuration Details
    • Amazon S3
    • Google BigQuery
    • Legacy Integrations
      • Securing Hive and Impala Without Sentry
      • Enabling ImmutaGroupsMapping
    • Registering Metadata
      • Data Sources in Immuta
      • Register Data Sources
        • Create a Data Source
        • Create an Amazon S3 Data Source
        • Create a Google BigQuery Data Source
        • Bulk Create Snowflake Data Sources
      • Data Source Settings
        • How-to Guides
          • Manage Data Sources and Data Source Settings
          • Manage Data Source Members
          • Manage Access Requests and Tasks
          • Manage Data Dictionary Descriptions
          • Disable Immuta from Sampling Raw Data
        • Data Source Health Checks Reference Guide
      • Schema Monitoring
        • How-to Guides
          • Run Schema Monitoring and Column Detection Jobs
          • Manage Schema Monitoring
        • Reference Guides
          • Schema Monitoring
          • Schema Projects
        • Why Use Schema Monitoring?
    • Catalogs
      • Getting Started with External Catalogs
      • Configure an External Catalog
      • Reference Guides
        • External Catalogs
        • Custom REST Catalogs
          • Custom REST Catalog Interface Endpoints
    • Tags
      • How-to Guides
        • Create and Manage Tags
        • Add Tags to Data Sources and Projects
      • Tags Reference Guide
  • People
    • Getting Started
    • Identity Managers (IAMs)
      • How-to Guides
        • Microsoft Entra ID
        • Okta LDAP Interface
        • Okta and OpenID Connect
        • Integrate Okta SAML SCIM with Immuta
        • OneLogin with OpenID
        • Configure SAML IAM Protocol
      • Reference Guides
        • Identity Managers
        • SAML Single Logout
        • SAML Protocol Configuration Options
    • Immuta Users
      • How-to Guides
        • Managing Personas and Permissions
        • Manage Attributes and Groups
        • User Impersonation
        • External User ID Mapping
        • External User Info Endpoint
      • Reference Guides
        • Attributes and Groups in Immuta
        • Permissions and Personas
  • Discover Your Data
    • Getting Started
    • Introduction
    • Architecture
    • Data Discovery
      • How-to Guides
        • Enable Sensitive Data Discovery (SDD)
        • Manage Identification Frameworks
        • Manage Patterns
        • Manage Rules
        • Manage SDD on Data Sources
        • Manage Global SDD Settings
        • Migrate From Legacy to Native SDD
      • Reference Guides
        • How Competitive Pattern Analysis Works
        • Built-in Pattern Reference
        • Built-in Discovered Tags Reference
    • Data Classification
      • How-to Guides
        • Activate Classification Frameworks
        • Adjust Identification and Classification Framework Tags
        • How to Use a Built-In Classification Framework with Your Own Tags
      • Built-in Classification Frameworks Reference Guide
  • Detect Your Activity
    • Getting Started
      • Monitor and Secure Sensitive Data Platform Query Activity
        • User Identity Best Practices
        • Integration Architecture
        • Snowflake Roles Best Practices
        • Register Data Sources
        • Automate Entity and Sensitivity Discovery
        • Detect with Discover: Onboarding Guide
        • Using Immuta Detect
      • General Immuta Configuration
        • User Identity Best Practices
        • Integration Architecture
        • Databricks Roles Best Practices
        • Register Data Sources
    • Introduction
    • Audit
      • How-to Guides
        • Export Audit Logs to S3
        • Export Audit Logs to ADLS
        • Run Governance Reports
      • Reference Guides
        • Universal Audit Model (UAM)
        • Snowflake Query Audit Logs
        • Databricks Unity Catalog Audit Logs
        • Databricks Query Audit Logs
        • Starburst (Trino) Query Audit Logs
        • UAM Schema
        • Audit Export CLI
        • Governance Report Types
      • Deprecated Audit Guides
        • Legacy to UAM Migration
        • Download Audit Logs
        • System Audit Logs
    • Detection
      • Use the Detect Dashboards
      • Reference Guides
        • Detect
        • Detect Dashboards
        • Unknown Users in Audit Logs
    • Monitors
      • Manage Monitors and Observations
      • Detect Monitors Reference Guide
  • Secure Your Data
    • Getting Started with Secure
      • Automate Data Access Control Decisions
        • The Two Paths: Orchestrated RBAC and ABAC
        • Managing User Metadata
        • Managing Data Metadata
        • Author Policy
        • Test and Deploy Policy
      • Compliantly Open More Sensitive Data for ML and Analytics
        • Managing User Metadata
        • Managing Data Metadata
        • Author Policy
      • Federated Governance for Data Mesh and Self-Serve Data Access
        • Defining Domains
        • Managing Data Products
        • Managing Data Metadata
        • Apply Federated Governance
        • Discover and Subscribe to Data Products
    • Introduction
      • Scalability and Evolvability
      • Understandability
      • Distributed Stewardship
      • Consistency
      • Availability of Data
    • Authoring Policies in Secure
      • Authoring Policies at Scale
      • Data Engineering with Limited Policy Downtime
      • Subscription Policies
        • How-to Guides
          • Author a Subscription Policy
          • Author an ABAC Subscription Policy
          • Subscription Policies Advanced DSL Guide
          • Author a Restricted Subscription Policy
          • Clone, Activate, or Stage a Global Policy
        • Reference Guides
          • Subscription Policies
          • Subscription Policy Access Types
          • Advanced Use of Special Functions
      • Data Policies
        • Overview
        • How-to Guides
          • Author a Masking Data Policy
          • Author a Minimization Policy
          • Author a Purpose-Based Restriction Policy
          • Author a Restricted Data Policy
          • Author a Row-Level Policy
          • Author a Time-Based Restriction Policy
          • Certifications Exemptions and Diffs
          • External Masking Interface
        • Reference Guides
          • Data Policy Types
          • Masking Policies
          • Row-Level Policies
          • Custom WHERE Clause Functions
          • Data Policy Conflicts and Fallback
          • Custom Data Policy Certifications
          • Orchestrated Masking Policies
    • Domains
      • Getting Started with Domains
      • Domains Reference Guide
    • Projects and Purpose-Based Access Control
      • Projects and Purpose Controls
        • Getting Started
        • How-to Guides
          • Create a Project
          • Create and Manage Purposes
          • Adjust a Policy
          • Project Management
            • Manage Projects and Project Settings
            • Manage Project Data Sources
            • Manage Project Members
        • Reference Guides
          • Projects and Purposes
          • Policy Adjustments
        • Why Use Purposes?
      • Equalized Access
        • Manage Project Equalization
        • Project Equalization Reference Guide
        • Why Use Project Equalization?
      • Masked Joins
        • Enable Masked Joins
        • Why Use Masked Joins?
      • Writing to Projects
        • How-to Guides
          • Create and Manage Snowflake Project Workspaces
          • Create and Manage Databricks Project Workspaces
          • Write Data to the Workspace
        • Reference Guides
          • Project Workspaces
          • Project UDFs (Databricks)
    • Data Consumers
      • Subscribe to a Data Source
      • Query Data
        • Querying Snowflake Data
        • Querying Databricks Data
        • Querying Databricks SQL Data
        • Querying Starburst (Trino) Data
        • Querying Redshift Data
        • Querying Azure Synapse Analytics Data
      • Subscribe to Projects
  • Application Settings
    • How-to Guides
      • App Settings
      • BI Tools
        • BI Tool Configuration Recommendations
        • Power BI Configuration Example
        • Tableau Configuration Example
      • Add a License Key
      • Add ODBC Drivers
      • Manage Encryption Keys
      • System Status Bundle
    • Reference Guides
      • Data Processing, Encryption, and Masking Practices
      • Metadata Ingestion
  • Releases
    • Immuta v2024.2 Release Notes
    • Immuta Release Lifecycle
    • Immuta LTS Changelog
    • Immuta Support Matrix Overview
    • Immuta CLI Release Notes
    • Immuta Image Digests
    • Preview Features
      • Features in Preview
    • Deprecations
  • Developer Guides
    • The Immuta CLI
      • Install and Configure the Immuta CLI
      • Manage Your Immuta Tenant
      • Manage Data Sources
      • Manage Sensitive Data Discovery
        • Manage Sensitive Data Discovery Rules
        • Manage Identification Frameworks
        • Run Sensitive Data Discovery on Data Sources
      • Manage Policies
      • Manage Projects
      • Manage Purposes
    • The Immuta API
      • Integrations API
        • Getting Started
        • How-to Guides
          • Configure an Amazon S3 Integration
          • Configure an Azure Synapse Analytics Integration
          • Configure a Databricks Unity Catalog Integration
          • Configure a Google BigQuery Integration
          • Configure a Redshift Integration
          • Configure a Snowflake Integration
          • Configure a Starburst (Trino) Integration
        • Reference Guides
          • Integrations API Endpoints
          • Integration Configuration Payload
          • Response Schema
          • HTTP Status Codes and Error Messages
      • Immuta V2 API
        • Data Source Payload Attribute Details
        • Data Source Request Payload Examples
        • Create Policies API Examples
        • Create Projects API Examples
        • Create Purposes API Examples
      • Immuta V1 API
        • Authenticate with the API
        • Configure Your Instance of Immuta
          • Get Fingerprint Status
          • Get Job Status
          • Manage Frameworks
          • Manage IAMs
          • Manage Licenses
          • Manage Notifications
          • Manage Sensitive Data Discovery (SDD)
          • Manage Tags
          • Manage Webhooks
          • Search Filters
        • Connect Your Data
          • Create and Manage an Amazon S3 Data Source
          • Create an Azure Synapse Analytics Data Source
          • Create an Azure Blob Storage Data Source
          • Create a Databricks Data Source
          • Create a Presto Data Source
          • Create a Redshift Data Source
          • Create a Snowflake Data Source
          • Create a Starburst (Trino) Data Source
          • Manage the Data Dictionary
        • Manage Data Access
          • Manage Access Requests
          • Manage Data and Subscription Policies
          • Manage Domains
          • Manage Write Policies
            • Write Policies Payloads and Response Schema Reference Guide
          • Policy Handler Objects
          • Search Audit Logs
          • Search Connection Strings
          • Search for Organizations
          • Search Schemas
        • Subscribe to and Manage Data Sources
        • Manage Projects and Purposes
          • Manage Projects
          • Manage Purposes
        • Generate Governance Reports
Powered by GitBook
On this page
  • User Impersonation with Amazon Redshift
  • 1 - Enable User Impersonation
  • 2 - Grant Users the IMPERSONATE_USER Permission
  • 3 - Impersonate a User
  • 4 - End User Impersonation
  • 5 - Revoke Users' IMPERSONATE_USER Permission
  • Redshift-Specific Caveats
  • User Impersonation with Azure Synapse Analytics
  • 1 - Enable User Impersonation
  • 2 - Grant Users the IMPERSONATE_USER Permission
  • 3 - Impersonate a User
  • 4 - End User Impersonation
  • 5 - Revoke Users' IMPERSONATE_USER Permission
  • Synapse-Specific Caveats
  • User Impersonation with Databricks Spark
  • 1 - Configure User Impersonation
  • 2 - Impersonate a User
  • 3 - Query Data
  • 4 - End User Impersonation
  • Databricks-Specific Caveat
  • User Impersonation with Starburst (Trino)
  • 1 - Grant Users the IMPERSONATE_USER Permission
  • 2 - Impersonate a User
  • 3 - Check User Impersonation
  • 4 - End User Impersonation
  • 5 - Revoke Users' IMPERSONATE_USER Permission
  • Caveat
  • User Impersonation with Snowflake
  • 1 - Enable User Impersonation
  • 2 - Grant Users the IMPERSONATE_USER Permission
  • 3 - Impersonate a User
  • 4 - Revoke Users' IMPERSONATE_USER Permission
  • Snowflake-Specific Caveats

Was this helpful?

Export as PDF
  1. People
  2. Immuta Users
  3. How-to Guides

User Impersonation

PreviousManage Attributes and GroupsNextExternal User ID Mapping

Last updated 3 months ago

Was this helpful?

Other versions

  • SaaS
  • 2024.3

Copyright © 2014-2024 Immuta Inc. All rights reserved.

Impersonation allows users to query data as another Immuta user.

User impersonation is supported with

Impersonating users in projects

If you are impersonating a user who is currently in a project, you will only see data sources within that project. For details about this behavior, see the description of .

User Impersonation with Amazon Redshift

1 - Enable User Impersonation

Select Enable Impersonation when configuring the Redshift integration on the .

2 - Grant Users the IMPERSONATE_USER Permission

After enabling user impersonation with your Amazon Redshift integration, there are two ways to give a user permission to use the feature: in the Immuta UI or in Amazon Redshift. Use the tabs below to select one method.

As an Immuta user with the permission USER_ADMIN,

  1. Click the People icon in the navigation and select the Users tab.

  2. Select the user you want to edit and select the Settings tab.

  3. Click Add Permissions.

  4. Click the Select Permission dropdown, and select the IMPERSONATE_USER permission.

As a Redshift superuser,

  1. Navigate to your Redshift instance.

  2. Run ALTER GROUP <Impersonation Group> ADD USER <Redshift User>.

3 - Impersonate a User

To impersonate another user in Redshift,

  1. Run CALL immuta_procedures.impersonate_user(<Immuta username of the user to impersonate>).

  2. Run queries.

4 - End User Impersonation

To end user impersonation in Redshift, run CALL immuta_procedures.impersonate_user(<NULL>).

5 - Revoke Users' IMPERSONATE_USER Permission

To revoke permission to impersonate users,

As an Immuta user with the permission USER_ADMIN,

  1. Click the People icon in the navigation and select the Users tab.

  2. Select the user you want to edit and select the Settings tab.

  3. Click Add Permissions.

  4. Click the Select Permission dropdown, and select the IMPERSONATE_USER permission.

As a Redshift superuser,

  1. Navigate to your Redshift instance.

  2. Run ALTER GROUP <Impersonation Group> DROP USER <Redshift User>.

Redshift-Specific Caveats

User impersonation is specific to the script and session in which it was set. Using a new script or running a subset of script queries without setting the context will result in the queries being run as the regular user.

User Impersonation with Azure Synapse Analytics

1 - Enable User Impersonation

2 - Grant Users the IMPERSONATE_USER Permission

After enabling user impersonation with your Azure Synapse Analytics integration, there are two ways to give a user permission to use the feature: in the Immuta UI or in Azure Synapse Analytics. Use the tabs below to select one method.

As an Immuta user with the permission USER_ADMIN,

  1. Click the People icon in the navigation and select the Users tab.

  2. Select the user you want to edit and select the Settings tab.

  3. Click Add Permissions.

  4. Click the Select Permission dropdown, and select the IMPERSONATE_USER permission.

As a Synapse user,

  1. Navigate to your Synapse instance.

  2. Run EXEC sp_addrolemember N'<Impersonation Role>', N'<Synapse User>'.

3 - Impersonate a User

To impersonate another user in Synapse,

  1. Run the following command:

    EXEC sys.sp_set_session_context @key = N'immuta_user',
    @value = '<Synapse username linked to the Immuta user you want to impersonate>';
  2. Run queries.

4 - End User Impersonation

To end user impersonation in Synapse, run EXEC sys.sp_set_session_context @key = N'NULL', @value = '<NULL>'.

5 - Revoke Users' IMPERSONATE_USER Permission

To revoke permission to impersonate users,

As an Immuta user with the permission USER_ADMIN,

  1. Click the People icon in the navigation and select the Users tab.

  2. Select the user you want to edit and select the Settings tab.

  3. Click Remove for the IMPERSONATE_USER permission.

As a Synapse user,

  1. Navigate to your Synapse.

  2. Run EXEC sp_droprolemember N'<Impersonation Role>', N'<Synapse User>'.

Synapse-Specific Caveats

  • User impersonation is specific to the script and session in which it was set. Opening a new script will revert the user back to themselves.

User Impersonation with Databricks Spark

Scala Clusters

Databricks user impersonation allows a Databricks user to impersonate an Immuta user. With this feature,

  • the Immuta user who is being impersonated does not have to have a Databricks account, but they must have an Immuta account.

  • the Databricks user who is impersonating an Immuta user does not have to be associated with Immuta. For example, this could be a service account.

When acting under impersonation, the Databricks user loses their privileged access, so they can only access the tables the Immuta user has access to and only perform DDL commands when that user is acting under an allowed circumstance (such as workspaces, scratch paths, or non-Immuta reads/writes).

1 - Configure User Impersonation

Follow one of these methods to allow specified Databricks users to impersonate Immuta users:

  • "spark_env_vars.IMMUTA_SPARK_DATABRICKS_ALLOWED_IMPERSONATION_USERS": {
      "type": "fixed",
      "value": "edixon@example.com,dakota@example.com"
    }
  • In the Spark environment variables section of the Databricks UI, add IMMUTA_SPARK_DATABRICKS_ALLOWED_IMPERSONATION_USERS followed by a comma-separated list of Databricks users who are allowed to impersonate Immuta users.

    IMMUTA_SPARK_DATABRICKS_ALLOWED_IMPERSONATION_USERS=edixon@example.com,dakota@example.com

Prevent Users from Changing Impersonation User in a Given Session

If your BI tool or other service allows users to submit arbitrary SQL or issue SET commands, set IMMUTA_SPARK_DATABRICKS_SINGLE_IMPERSONATION_USER to true to prevent users from changing their impersonation user once it has been set for a given Spark session.

2 - Impersonate a User

Once the cluster is configured with a list of Databricks users who are allowed to impersonate Immuta users, run the following SQL command to set the user you want to impersonate:

%sql
set immuta.impersonate.user=smwilliams@example.com

3 - Query Data

Run queries as the impersonated Immuta user:

%sql
set immuta.impersonate.user=smwilliams@example.com
select * from demo.hr_data limit 10;

Example Queries

Once impersonation is active, any query issued in the session will have the appropriate data and subscription policies applied for the impersonated user. Consider the example queries in the tabs below.

Without User Impersonation

Policies on this data source mask sensitive values unless users possess a specified attribute.

If the user querying the data possesses that attribute, they can see the unmasked values.

With User Impersonation

Policies on this data source mask sensitive values unless users possess a specified attribute.

If the user queries the data source impersonating an Immuta user (smwilliams@example.com) who does not possess that attribute, the sensitive data is masked.

Audited Queries

Audited queries include an impersonationUser field, which identifies the Databricks user impersonating the Immuta user:

{
  "id": "query-a20e-493e-id-c1ada0a23a26",
  "dateTime": "1639684812845",
  "month": 1463,
  "profileId": 4,
  "userId": "smwilliams@example.com",
  "dataSourceId": 1,
  "dataSourceName": "Hr Data",
  "count": 1,
  "recordType": "spark",
  "success": true,
  "component": "dataSource",
  "accessType": "query",
  "query": "Relation[id#2644,first_name#2645,last_name#2646,email#2647,gender#2648,race#2649,ssn#2650,dept#2651,job#2652,skills#2653,salary#2654,type#2655] parquet\n",
  "extra": {
    "databricksWorkspaceID": "0",
    "maskedColumns": {},
    "metastoreTables": [
      "demo.hr_data"
    ],
    "clusterName": "your-cluster-name",
    "pathUris": [
      "dbfs:/user/hive/warehouse/demo.db/hr_data"
    ],
    "queryText": "select * from demo.hr_data limit 10;",
    "queryLanguage": "sql",
    "clusterID": "your-171358-cluster-id",
    "impersonationUser": "edixon@example.com"
  },
  "dataSourceTableName": "demo_hr_data",
  "createdAt": "2021-12-16T20:00:12.850Z",
  "updatedAt": "2021-12-16T20:00:12.850Z"
}

4 - End User Impersonation

To end user impersonation for the session, run

%sql
set immuta.impersonate.user=

Databricks-Specific Caveat

The only way to enable this feature is through cluster configuration. The IMPERSONATE_USER permission in Immuta will not allow a user to perform impersonation in Databricks.

User Impersonation with Starburst (Trino)

1 - Grant Users the IMPERSONATE_USER Permission

To grant the user IMPERSONATE_USER permission, as an Immuta user with the permission USER_ADMIN,

  1. Navigate to your Immuta homepage.

  2. Click the People icon and select Users in the left sidebar. Then select the user.

  3. Click Add Permissions.

  4. Click the Select Permission dropdown, and select the IMPERSONATE_USER permission.

  5. Click Close.

2 - Impersonate a User

The Starburst (Trino) integration supports the native Starburst or Trino impersonation approaches:

3 - Check User Impersonation

To view the user you are impersonating, run SHOW SESSION like 'immuta.immuta_user'.

4 - End User Impersonation

To end user impersonation, run RESET SESSION immuta.immuta_user.

5 - Revoke Users' IMPERSONATE_USER Permission

To revoke permission to impersonate users, as an Immuta user with the permission USER_ADMIN,

  1. Click the People icon in the navigation and select the Users tab.

  2. Select the user you want to edit and select the Settings tab.

  3. Click Remove for the IMPERSONATE_USER permission.

Caveat

The user's permissions to impersonate users are not checked until the query is run. If the user does not have the IMPERSONATE_USER permission in Immuta, they will be able to run the command to impersonate a role, but will not be able to query as that role.

User Impersonation with Snowflake

1 - Enable User Impersonation

2 - Grant Users the IMPERSONATE_USER Permission

After enabling user impersonation with your Snowflake integration, there are two ways to give a user permission to use the feature: in the Immuta UI or in Snowflake. Use the tabs below to select one method.

As an Immuta user with the permission USER_ADMIN,

  1. Click the People icon in the navigation and select the Users tab.

  2. Select the user you want to edit and select the Settings tab.

  3. Click Add Permissions.

  4. Click the Select Permission dropdown, and select the IMPERSONATE_USER permission.

As a Snowflake user with the ACCOUNTADMIN role,

  1. Navigate to your Snowflake instance.

  2. In a worksheet run GRANT ROLE <<Impersonation_Role>> TO USER "<<Snowflake User>>".

    In this example, the Impersonation Role is the name entered on the Immuta App Settings page when the feature was enabled. The default is IMMUTA_IMPERSONATION, but the admin may have customized it. The Snowflake User is the username of the Snowflake user that will now have permission to impersonate other users.

3 - Impersonate a User

To impersonate another user in Snowflake,

  1. Open a New Worksheet and set your role to the impersonation role specific to your organization.

  2. Run SET immuta_user = '<<Immuta username of the user to impersonate>>'.

  3. Run queries within that worksheet.

4 - Revoke Users' IMPERSONATE_USER Permission

To revoke permission to impersonate users,

As an Immuta user with the permission USER_ADMIN,

  1. Click the People icon in the navigation and select the Users tab.

  2. Select the user you want to edit and select the Settings tab.

  3. Click Remove for the IMPERSONATE_USER permission.

As a Snowflake user with the ACCOUNTADMIN role,

  1. Navigate to your Snowflake instance.

  2. In a worksheet run REVOKE ROLE <<Impersonation Role>> FROM USER "<<Snowflake User>>".

    In this example, the Impersonation Role is the name entered on the Immuta App Settings page when the feature was enabled. The default is IMMUTA_IMPERSONATION, but the admin may have customized it. The Snowflake User is the username of the Snowflake user that will now have permission to impersonate other users.

Snowflake-Specific Caveats

  • Impersonation is specific to the workspace and session in which it was set. Opening a new worksheet will revert the user back to themselves.

  • Snowflake auditing will show the user running the queries as the user logged in to Snowflake not as the user they are impersonating.

Select Enable Impersonation when configuring the Synapse Analytics integration on the .

Immuta discourages use of this feature with Scala clusters, as the proper security mechanisms were not built to account for . Instead, this feature was developed for the BI tool use case in which service accounts connecting to the Databricks cluster need to impersonate Immuta users so that policies can be enforced.

In the , add a comma-separated list of Databricks users who are allowed to impersonate Immuta users for the IMMUTA_SPARK_DATABRICKS_ALLOWED_IMPERSONATION_USERS Spark environment variable.

This command generates an API token for the specified user that queries Immuta for metadata pertinent to that user. When generating the token, the impersonated username is matched with the corresponding IAM user. The IAM used by default is the built-in IAM in Immuta, but can be set using the environment variable.

User impersonation is automatically enabled with your Starburst (Trino) integration, but the authenticated user must be given the IMPERSONATE_USER permission in Immuta or match the Starburst (Trino) .

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.

Select Enable Impersonation when configuring the Snowflake integration on the .

App Settings page
user isolation limitations in Scala clusters
IMMUTA_USER_MAPPING_IAMID
Starburst JDBC driver documentation
Trino CLI
Starburst release notes
App Settings page
App Settings page
Amazon Redshift
Azure Synapse Analytics
Databricks Spark
Starburst (Trino)
Snowflake
cluster policy JSON in the Immuta UI
immuta.user.admin regex configuration property
project contexts