Databricks Unity Catalog Audit Logs
Public Preview
This feature is currently in public preview and available to all accounts.
Native query audit for Unity Catalog captures user data access activity within Unity Catalog as Immuta audit logs. Immuta audits the activity of all Unity Catalog users and tables. Multiple access options are supported for audit:
Cluster queries with the following supported languages: SQL, Scala, Python, and R.
SQL Warehouse queries
Deprecation notice
Support for the audit endpoint and UI has been deprecated. Instead, pull audit logs from Kubernetes and push them to your SIEM.
Requirements
Databricks Unity Catalog integration with native query audit enabled
A Databricks deployment with system tables capabilities
Best practices: Store audit logs
By default most Immuta audit logs expire after 60 days, so store audit logs outside of Immuta in order to retain the audits long term.
The following audit record types do not expire after 60 days: blobFetch
, dataSourceSubscription
, globalPolicyApproved
, globalPolicyApprovalRescinded
, globalPolicyChangeRequested
, globalPolicyConflictResolved
, globalPolicyCreate
, globalPolicyDelete
, globalPolicyDisabled
, globalPolicyUpdate
, policyExemption
, policyHandlerCreate
, policyHandlerUpdate
, prestoQuery
, spark
, and sqlQuery
.
Audit frequency
Immuta collects audit records at the frequency configured when enabling the integration, which is between 1 and 24 hours. The frequency is a global setting based on integration type, so organizations with multiple Unity Catalog integrations will have the same audit frequency for all of them. The more frequent the audit records are ingested, the more current the audit records; however, there could be performance and cost impacts from the frequent jobs.
To manually request native query audit ingestion, click Load Audit Events on the Immuta audit page.
Audit messages
Each audit message from the Immuta platform will be a one-line JSON object containing the properties listed below. These audit logs are stored with the recordType
: nativeQuery
.
Property | Description | Example |
---|---|---|
id | The unique ID of the audit record. |
|
dateTime | The timestamp for when the record was created. This may be an ISO-8601 timestamp string or an epoch timestamp. |
|
profileId | When available, the profile ID of the user who made the query. If the user is not registered with Immuta, the |
|
userId | When available, the Immuta user ID of the user who made the query. If the user is not registered with Immuta, |
|
dataSourceId | When available, the Immuta ID of the data source that was queried. If the data source is not registered with Immuta, |
|
dataSourceName | When available, the Immuta name of the data source that was queried. If the data source is not registered with Immuta, |
|
recordType | The type of record captured based on query type. Databricks Unity Catalog query audit logs will always be |
|
success | If |
|
component | The Immuta component that generated the record. |
|
accessType | Unity Catalog audit logs will always be |
|
query | The command text of the query. |
|
queryId | The unique ID of the query. If the query joins multiple tables, each table will appear as a separate log with a matching query ID. |
|
extra.handler | The integration technology. Databricks Unity Catalog query audit logs will always be |
|
extra.startTime | The date and time the query started in UTC. |
|
extra.endTime | The date and time the query ended in UTC. |
|
extra.duration | The time the query took in milliseconds. |
|
extra.nativeObject | When available, the name of the Unity Catalog object that was queried. |
|
extra.nativeObjectFullName | When available, the fully qualified Unity Catalog object that was queried. |
|
extra.host | The host that the integration is connected to. |
|
extra.actionStatus | Indicates whether or not the user was granted access to the data. Options are |
|
extra.actionStatusReason | When available and a user's query is denied, this property contains the Unity Catalog system's reason for failure. When a query is successful, this value is |
|
extra.errorCode | When available, the error code for the unauthorized query. For unauthorized queries options are |
|
extra.actionName | The environment data was accessed in. If |
|
extra.service | The environment data was accessed in. Options include |
|
extra.accountId | The Unity Catalog account ID. |
|
extra.notebookId | For cluster queries, the ID of the Unity Catalog notebook the query was made in, otherwise |
|
extra.clusterId | For cluster queries, the ID of the Unity Catalog cluster the query was made in, otherwise |
|
extra.requestedId | The Unity Catalog request ID. |
|
extra.sessionId | For warehouse queries, the ID of the Unity Catalog session the query was made in, otherwise |
|
extra.warehouseId | For warehouse queries, the ID of the Unity Catalog warehouse the query was made in, otherwise |
|
extra.queryLanguage | For cluster queries, the programming language used: SQL, Python, Scala, or R. |
|
extra.actorIp | When available, the IP address of the Spark cluster the request is coming from. |
|
extra.actorEmail | The Unity Catalog email of the user making the query. |
|
extra.userAgent | When available, the Unity Catalog client information of the user who made the query. |
|
extra.workspaceId | The ID of the Unity Catalog workspace the query was made in. |
|
Example audit record
Limitations
Enrichment of audit logs with Immuta entitlements information is not supported. While you will see these entitlements in the Databricks Spark audit logs, the following will not be in the native query audit for Unity Catalog:
Immuta policies information
User attributes
Groups
Immuta determines unauthorized events based on error messages within Unity Catalog records. When the error messages contain expected language, unauthorized events will be available for native query audit for Unity Catalog. In other cases, it is not possible to determine the cause of an error.
Audit for cluster queries do not support
UNAUTHORIZED
status. If a cluster query is unauthorized, it will showFAILURE
.Data source information will be provided when available:
For some queries, Databricks Unity Catalog does not report the target data source for the data access operation. In these cases the activity is audited, yet the audit record in Immuta will not include the target data source information.
Data source information is not available for unauthorized queries and events.
Column information from the query is not currently supported.
The cluster for the Unity Catalog integration must always be running for Immuta to audit activity.
Immuta audit records include unregistered data sources and users; however, activity from them will not appear in any governance reports.
Last updated