Starburst (Trino) Query Audit Logs
Starburst (Trino) query audit logs is a feature that audits queries that users run natively in Starburst (Trino) and presents them in a universal format as Immuta audit logs. Users can view audit records for queries made in Starburst (Trino) against Immuta data sources on the audit page. Immuta audits the activity of Immuta users on Immuta data sources.
Requirements
Starburst (Trino) integration with the Starburst or Trino plugin version 443 or newer, or Trino 435 with the Immuta Trino 435.1 plugin
Starburst (Trino) users registered as Immuta users: Note that the users' Starburst (Trino) usernames must be mapped to Immuta. Without this, Immuta will not know the users are Immuta users and will not collect audit events for their data access activity.
Store audit logs
By default Starburst (Trino) audit logs expire after 90 days. Export the universal audit model (UAM) logs to S3 or ADLS Gen 2, and store audit logs outside of Immuta in order to retain the audit logs long-term.
Audit schema
Each audit message from the Immuta platform will be a one-line JSON object containing the properties listed below.
Property | Description | Example |
---|---|---|
action | The action associated with the audit log. |
|
actor.type | The Immuta user type of the actor who made the query. |
|
actor.id | The Immuta user ID of the actor who made the query. |
|
actor.name | The Immuta name of the user who made the query. |
|
actor.identityProvider | The IAM the user is registered in. |
|
actor.profileId | The profile ID of the user who made the query. |
|
actionStatus | Indicates whether or not the user was granted access to the data. Possible values are |
|
eventTimestamp | The time the query occurred. |
|
id | The unique Immuta ID of the audit record. This will match the Trino query ID. |
|
tenantId | The Immuta SaaS tenant ID. |
|
targetType | The type of targets affected by the query; this value will always be |
|
targets | A list of the targets affected by the query. | See the example below |
auditPayload.type | The type of audit record; this value will always be: |
|
auditPayload.queryId | The unique Starburst (Trino) ID of the query. |
|
auditPayload.query | The command text of the query that was run in the integration. Immuta truncates the query text to the first 2048 characters. |
|
auditPayload.startTime | The date and time the query started in UTC. |
|
auditPayload.duration | The time the query took in seconds. |
|
auditPayload.objectsAccessed | An array of the data sources accessed in the query. | See example below. |
auditPayload.objectsAccessed.name | The name of the data source accessed in the query. |
|
auditPayload.objectsAccessed.datasourceId | The Immuta data source ID. |
|
auditPayload.objectsAccessed.databaseName | The name of the Starburst (Trino) catalog. |
|
auditPayload.objectsAccessed.schemaName | The name of the Starburst (Trino) schema. |
|
auditPayload.objectsAccessed.type | Specifies if the queried data source is a table or view. Starburst (Trino) queries are always |
|
auditPayload.objectsAccessed.columns | An array of the columns accessed in the query. | See example below. |
auditPayload.objectsAccessed.columns.name | The name of the column. |
|
auditPayload.objectsAccessed.columns.tags | An array of the tags on the column. | See example below. |
auditPayload.objectsAccessed.columns.securityProfile | Details about the sensitivity of the column. Available when classification frameworks are configured. | See example below. |
auditPayload.objectsAccessed.columns.inferred | If |
|
auditPayload.objectsAccessed.securityProfile | A classification for all the columns accessed together. Available when classification frameworks are configured. | See example below. |
auditPayload.technologyContext.type | The technology the query was made in. |
|
auditPayload.technologyContext.trinoUsername | The Starburst (Trino) user ID for the user who made the query. |
|
auditPayload.technologyContext.immutaPluginVersion | The version of the Immuta plugin in Starburst (Trino). |
|
auditPayload.technologyContext.rowsProduced | The number of rows returned in the query. |
|
auditPayload.version | The version of the audit event schema. |
|
receivedTimestamp | The timestamp of when the audit event was received and stored by Immuta. |
|
Example audit record
Limitations
objectsAccessed
is not available with Hive or Iceberg views.columnsAccessed
will include columns related to the query that were not actually accessed in some cases:For row access policies that rely on a column in the queried table, even if that column was not a part of the query, it will be included in the
columnsAccessed
.For conditional masking, if the policy protects a column accessed, then the conditional column will be included in the
columnsAccessed
.
Last updated