審計Unity Catalog事件
本文包含Unity Catalog事件的審計日誌信息。Unity Catalog捕獲針對metastore執行的操作的審計日誌。這使管理員能夠訪問有關誰訪問了給定數據集以及他們執行了哪些操作的細粒度詳細信息。
配置審計日誌
要訪問Unity Catalog事件的審計日誌,必須開啟並配置審計日誌為你著想。
重要的
在帳戶級別記錄Unity Catalog活動。不輸入值workspace_ids_filter
.
每個工作空間和帳戶級別活動的審計日誌將被傳遞到您的帳戶。日誌下發到您配置的S3桶中。
審計日誌格式
在Databricks中,審計日誌以JSON格式輸出事件。下麵以a為例createMetastoreAssignment
事件。
{“版本”:“2.0”,“auditLevel”:“ACCOUNT_LEVEL”,“時間戳”:1629775584891,“orgId”:“3049056262456431186970”,“shardName”:“test-shard”,“accountId”:“77636 e6d ac57 - 484 f - 9302 f7922285b9a5”,“sourceIPAddress”:“10.2.91.100”,“userAgent”:“旋度/ 7.64.1”,“sessionId”:“短暫的- f836a03a d360 - 4792 - b081 baba525324312”,“userIdentity”: {“電子郵件”:“crampton.rods.com”,“subjectName”:零},“名”:“unityCatalog”,“actionName”:“createMetastoreAssignment”,“requestId”:“ServiceMain-da7fa5878f40002”,“requestParams”: {“workspace_id”:“30490590956351435170”,“metastore_id”:這件“abc123456 - 8398 - 4 - 25 - 91 - bb - b000b08739c7”,“default_catalog_name”:“主要”},“響應”: {“statusCode”:200,“errorMessage”:零,“結果”:零},“MAX_LOG_MESSAGE_LENGTH”:16384}
審計日誌分析示例
以下步驟和筆記本創建一個儀表板,可用於分析帳戶的審計日誌數據。
創建數據科學與工程集群單用戶集群安全模式.看到創建一個可以訪問Unity Catalog的集群.
將下麵的示例筆記本導入您的工作區,並將其附加到剛才創建的集群。看到導入筆記本電腦.
一係列小部件出現在頁麵頂部。為輸入值檢查點並可選地為其餘字段輸入值。
檢查點:流檢查點存儲的路徑,可以是DBFS,也可以是S3。
目錄:希望存儲審計表的目錄的名稱(目錄必須已經存在)。確保你有
使用目錄
而且創建
它的特權。數據庫:希望存儲審計表的數據庫(模式)的名稱(如果不存在,將創建)。如果它已經存在,請確保您已經擁有
使用模式
而且創建
它的特權。log_bucket:審計日誌所在的路徑。這應該是以下格式:
<桶-的名字>/<交付-路徑-前綴>/workspaceId=0/
有關配置審計日誌的信息,請參見配置審計日誌記錄.附加
workspaceId = 0
到路徑以獲取帳戶級別的審計日誌,包括Unity Catalog事件。start_date:按開始日期過濾事件。
值
< bucket名>
而且< delivery-path >
從筆記本小部件自動填充。
運行筆記本,創建審計報告。
要修改報告或返回給定用戶的活動,請參閱筆記本中的命令23和24。
Unity Catalog審計日誌事件
下表包含了Unity Catalog中的可審計事件。的actionName
屬性在審計日誌記錄中標識審計事件。動作的請求參數列在下麵requestParams
.
actionName |
requestParams |
---|---|
createMetastore |
(“名字”,“storage_root”) |
getMetastore |
[" id "] |
getMetastoreSummary |
|
listMetastores |
|
updateMetastores |
[" id ", " name ", " storage_root ", " default_data_access_config_id ", " delta_sharing_enabled ", " owner "] |
deleteMetastore |
[" id ",“力量”) |
createMetastore |
[" workspace_id ", " metastore_id ", " default_catalog_name "] |
updateMetastoreAssignment |
[" workspace_id ", " metastore_id ", " default_catalog_name "] |
createExternalLocation |
|
getExternalLocation |
|
listExternalLocations |
|
updateExternalLocation |
|
deleteExternalLocation |
|
createCatalog |
["名稱") |
deleteCatalog |
[" name_arg "] |
getCatalog |
[" name_arg "] |
updateCatalog |
[" name_arg ", " name ", " owner ", " comment "] |
listCatalog |
|
createSchema |
(“名字”,“catalog_name”) |
deleteSchema |
[" full_name_arg "] |
getSchema |
[" full_name_arg "] |
listSchema |
[" catalog_name "] |
updateSchema |
[" full_name_arg ", " name ", " owner ", " comment "] |
createStagingTable |
[" name ", " catalog_name ", " schema_name "] |
不知道 |
[" name ", " catalog_name ", " schema_name ", " table_type ", " data_source_format ", " column_infos ", " storage_location ", " sql_path ", " view_definition ", " comment "] |
deleteTable |
[" full_name_arg "] |
可以獲得的 |
[" full_name_arg "] |
privilegedGetTable |
[" full_name_arg "] |
listTables |
[" catalog_name”、“schema_name”) |
listTablesSummaries |
|
updateTables |
[" name ", " table_type ", " data_source_format ", " column_infos ", " storage_location ", " sql_path ", " view_definition ", " owner ", " comment "] |
createStorageCredentials |
|
listStorageCredentials |
|
getStorageCredentials |
|
updateStorageCredentials |
|
deleteStorageCredentials |
|
createCredentials |
[" data_access_configuration_id ", " table_id ", " operation "] |
generateTemporaryTableCredential |
|
generateTemporaryPathCredential |
|
getPermissions |
[" securable_type ", " securable_full_name ", " principal "] |
updatePermissions |
[" securable_type ", " securable_full_name ", " changes "] |
createRecipient |
(“名字”、“評論”) |
deleteRecipient |
["名稱") |
getRecipient |
["名稱") |
listRecipient |
|
createShare |
(“名字”、“評論”) |
deleteShare |
["名稱") |
getShare |
["名稱") |
updateShare |
(“名字”,“更新”) |
listShares |
|
getSharesPermissions |
["名稱") |
updateSharePermissions |
(“名字”,“變化”) |
getRecipientSharePermissions |
["名稱") |
createProvider |
|
updateProvider |
|
deleteProvider |
|
getProvider |
|
listProvider |
|
listProviderShares |
|
rotateRecipientToken |
|
privilagedGetAllPermissions |
(“可獲得的”) |
getActivationUrInfo |
[" recipient_name "] |
retrieveRecipientToken |
[" recipient_name "] |
metadataSnapshot |
|
metadataAndPermissionsSnapshot |
|
getInformationSchema |