All Products
Search
Document Center

Container Registry:Instance audit

Last Updated:May 26, 2025

The instance audit feature allows you to track and analyze instance usage in Container Registry to improve security and controllability of Container Registry instances. This topic describes how to enable instance audit. This topic also describes the fields of audit logs.

Prerequisites

Enable and view instance audit

After you enable instance audit, you can select push or pull logs based on a cycle. This allows you to monitor and analyze user actions in real time to improve security of Container Registry instances, meet compliance requirements, and troubleshoot issues.

  1. Log on to the Container Registry console.

  2. In the top navigation bar, select a region.

  3. In the left-side navigation pane, click Instances.

  4. On the Instances page, click the Enterprise Edition instance that you want to manage.

  5. In the left-side navigation pane of the instance management page, choose Instances > Audit Center. Then, click the Instance Audit tab and Enable in sequence.

    Note
    • A project named aliyun-product-data-<UID>-<Region> and a logstore named acr_access_log are created in the Simple Log Service console.

    • The push-pull logs of multiple instances in the same region are stored in the same logstore if delivery is enabled for the instances. You can filter the logs by instance ID.

    • By default, the logs are retained for 365 days. You can change the retention period in Simple Log Service. For more information, see Manage a logstore.

    image

Fields of audit logs

The following table describes fields of audit logs.

Field

Example

Description

access_credential_type

Password

The type of your credential. Valid values:

  • Password

  • TemporaryToken

action

GetImageManifest

The operation. Valid values:

  • GetImageManifest: obtains manifest information about the image.

  • GetBlob: obtains blobs of the image.

  • PutImageManifest: the manifest information about image pushes.

  • DeleteTag: deletes an image tag.

blob_digest

sha256:4f4fxxxx

A unique identifier that is generated based on a hash of the blob content.

http_request_host

demo-registry.cn-hangzhou.cr.aliyuncs.com

The domain name that is requested.

http_request_id

718e09d1-aab5-xxxxx

The request ID.

http_request_method

GET

The HTTP request method.

http_request_remote_vpc_id

vpc-xxxxxx

The VPC endpoint of the client.

http_request_remoteaddr

140.xx.xx.xx

The IP address of the client.

http_request_useragent

docker/24.0.2

The User-Agent header in the HTTP request.

http_response_status

200

The HTTP status code.

instance_id

cri-xxx

The ID of the instance.

namespace

test-ns

The namespace to which the image repository belongs.

repo

test-repo

The name of the image repository.

namespace_repo

test-ns/test-repo

The full name of the image repository.

network_type

Internet

The network type of the access.

  • Internet

  • VPC

tag

v1

The version of the image.

time

2024-04-12T16:58:30.855892463+08:00

The time when the server receives the request.

user_identity_account_id

135668xxxxxxx

The ID of the Alibaba Cloud account of the requester.

user_identity_player_account_id

149134xxxxxxx

The account ID of the player.

user_identity_principal_id

300786xxxxxxx:Alice

The ID of the requester. The identity of the requester is determined based on the values of this field and the user_identity_user_type field.

  • If the value of user_identity_user_type is root-account, set this field to the ID of the Alibaba Cloud account.

  • If the value of user_identity_user_type is ram-user, set this field to the ID of the Resource Access Management (RAM) user.

  • If the value of user_identity_user_type is assumed-role, set this field to a string in the RoleID:RoleSessionName format.

user_identity_role_id

300786xxxxxxx

The ID of the RAM role.

user_identity_role_name

teststs

The name of the RAM role.

user_identity_user_type

assumed-role

The type of the identity. Valid values:

  • root-account: an Alibaba Cloud account.

  • ram-user: a RAM user.

  • assumed-role: a RAM role.

  • system: Container Registry initiates the call.

user_name

sub_user@xxxx

The instance logon name.