執行個體審計功能允許您在ACR服務中跟蹤和分析執行個體使用,以提高安全性和可控性。本文介紹了開啟執行個體審計的操作步驟以及日誌欄位的詳細說明。
前提條件
已開通SLSLog Service雲產品。首次使用,需登入Log Service控制台,根據頁面提示開通Log Service。關於Log Service的計費詳情,請參見按使用功能付費模式計費項目。
開啟並查看執行個體審計
開啟執行個體審計後,您可以根據時間周期選擇相應的推送或拉取日誌,從而便於對使用者活動進行即時監控和分析,以提高安全性、支援合規管理,並在發生問題時進行快速故障排查。
在頂部功能表列,選擇所需地區。
在左側導覽列,選擇執行個體列表。
在執行個體列表頁面單擊目標企業版執行個體。
在執行個體管理頁面的左側導覽列中選擇,然後單擊執行個體審計頁簽,再單擊開啟使用。
說明控制台將在Log Service中建立名為aliyun-product-data-<UID>-<地區>的Project,並建立名為acr_access_log的日誌庫(Logstore)。
同地區下多個執行個體啟用投遞後會存放在同一個日誌庫中,可以使用執行個體ID進行日誌過濾。
預設資料儲存周期為365天,可以按需在Log Service中進行修改。詳情請參見管理Logstore。

審計欄位詳情
以下是執行個體審計欄位的詳細說明。
欄位名稱 | 樣本 | 詳細說明 |
access_credential_type | Password | 憑證類型。
|
action | GetImageManifest | 操作類型。
|
blob_digest | sha256:4f4fxxxx | 根據Blob內容的雜湊產生的一個唯一識別碼。 |
http_request_host | demo-registry.cn-hangzhou.cr.aliyuncs.com | 請求訪問網域名稱。 |
http_request_id | 718e09d1-aab5-xxxxx | 請求ID。 |
http_request_method | GET | HTTP要求方法。 |
http_request_remote_vpc_id | vpc-xxxxxx | 用戶端VPC地址。 |
http_request_remoteaddr | 140.xx.xx.xx | 用戶端IP地址。 |
http_request_useragent | docker/24.0.2 | HTTP的User-Agent頭。 |
http_response_status | 200 | HTTP請求返回的狀態。 |
instance_id | cri-xxx | 執行個體ID。 |
namespace | test-ns | 鏡像命名空間。 |
repo | test-repo | 鏡像倉庫名。 |
namespace_repo | test-ns/test-repo | 鏡像倉庫完整名稱。 |
network_type | Internet | 訪問網路類型。
|
tag | v1 | 鏡像版本。 |
time | 2024-04-12T16:58:30.855892463+08:00 | 服務端收到請求的時間。 |
user_identity_account_id | 135668xxxxxxx | 當前請求身份所屬的阿里雲帳號ID。 |
user_identity_player_account_id | 149134xxxxxxx | 扮演者帳號ID。 |
user_identity_principal_id | 300786xxxxxxx:Alice | 當前要求者的ID,需結合user_identity_user_type來唯一確認要求者身份。
|
user_identity_role_id | 300786xxxxxxx | 角色 ID。 |
user_identity_role_name | teststs | 角色名稱。 |
user_identity_user_type | assumed-role | 身份類型。
|
user_name | sub_user@xxxx | 執行個體登入名稱。 |