All Products
Search
Document Center

Container Service for Kubernetes:Notation and Ratify: Sign and verify OCI artifacts

Last Updated:Jun 25, 2026

Use the notation-alibabacloud-secret-manager plugin with Alibaba Cloud Key Management Service (KMS) to sign OCI artifacts in Container Registry (ACR). Then, install and configure Ratify in your cluster to enforce signature verification. This setup prevents images that fail signature verification from being deployed, which enhances the security of your cluster.

Key concepts

notation-alibabacloud-secret-manager: A Notation plug-in that complies with the Notation project specification. It uses keys from Alibaba Cloud Key Management Service (KMS) to sign OCI artifacts in ACR.

Ratify: A binary executable verification engine that runs in a Kubernetes cluster. It validates security metadata for cloud-native artifacts, such as image signatures and SBOMs, and allows only artifacts that meet policy requirements to be deployed in the cluster.

Prerequisites

Step 1: Obtain a key from a KMS instance

Key Management Service (KMS) is a one-stop platform for key management and data encryption that provides simple, reliable, secure, and compliant data encryption and credential management. You can use the notation-alibabacloud-secret-manager plug-in to sign artifacts with keys created and managed by a KMS instance or with self-signed keys imported into a KMS instance.

KMS-managed key

  1. Log on to the Key Management Service console. In the top navigation bar, select a region. In the left-side navigation pane, choose Resource > Keys.

  2. On the Keys page, click the Customer Master Keys tab. From the Instance ID drop-down list, select a software key management instance. Then, click Create Key.

  3. In the Create Key panel, configure the parameters and click OK.

    The following table describes the key parameters. For more information, see Manage keys.

    Parameter

    Description

    Example

    KMS Instance

    Select the KMS instance in which you want to create the key.

    kst-l*

    Key Type

    Select asymmetric key.

    Asymmetric key

    Key Specifications

    The following asymmetric key specifications are supported:

    • RSA_2048

    • RSA_3072

    • EC_P256

    RSA_2048

    Key Usage

    Select SIGN/VERIFY to generate and verify digital signatures.

    SIGN/VERIFY

    Key Alias

    The alias for the key. Supported characters include letters, digits, underscores (_), hyphens (-), and forward slashes (/).

    test-key

    Tags

    Tags to classify and manage the key. Each tag is a key-value pair.

    None

  4. Create an application access point.

    1. In the left-side navigation pane, choose Application Access > Access Point.

    2. On the Application Access tab, click Create AAP. In the Create AAP panel, configure the parameters.

      Parameter

      Description

      Mode

      Select Quick Creation.

      Scope (KMS Instance)

      Select the KMS instance that your application needs to access.

      Application Access Point Name

      Enter a name for the application access point.

      Authentication Method

      This is set to ClientKey and cannot be changed.

      Default Permission Policy

      The value is key/* secret/* and cannot be changed. This means the application can access all keys and secrets in the specified KMS instance.

    3. Click OK. The browser automatically downloads the ClientKey. The ClientKey includes the following files:

      • Credential (ClientKeyContent): The default filename is clientKey_****.json.

      • Credential password (ClientKeyPassword): The default filename is clientKey_****_Password.txt.

Imported self-signed key

In addition to using keys created and managed by KMS for signing, you can also use a self-signed key by importing its key material into a KMS instance. This section provides an example of generating a private key and certificate with OpenSSL.

1. Create an asymmetric key

  1. Log on to the Key Management Service console. In the top navigation bar, select a region. In the left-side navigation pane, choose Resource > Keys.

  2. On the Keys page, click the Customer Master Keys tab. From the Instance ID drop-down list, select a software key management instance. Then, click Create Key.

  3. In the Create Key panel, configure the parameters and click OK.

    The following table describes the key parameters. For more information, see Step 1: Create an asymmetric key with external key material.

    Parameter

    Description

    Example

    Key Type

    Select asymmetric key.

    Asymmetric key

    Key Specifications

    The following asymmetric key specifications are supported:

    • RSA_2048

    • RSA_3072

    • EC_P256

    RSA_2048

    Key Usage

    Select SIGN/VERIFY to generate and verify digital signatures.

    SIGN/VERIFY

    Key Alias

    The alias for the key. Supported characters include letters, digits, underscores (_), hyphens (-), and forward slashes (/).

    test-key

    Tags

    Tags to classify and manage the key. Each tag is a key-value pair.

    None

2. Download wrapping public key and import token

The parameters for importing key material include a wrapping public key and an import token. The wrapping public key is used to encrypt the key material and protect it during the import process. The import token is used to import the key material.

  1. Find the target key and click Details in the Actions column. In the Key Material section of the key details page, click Obtain Parameters to Import Key Material.

  2. In the Obtain Parameters to Import Key Material dialog box, select a Public Key Type and an Encryption Algorithm, and then click Next.

    Key Management Type

    KMS key spec

    Wrapping key type

    Encryption Algorithm

    Software Key

    • RSA_2048

    • RSA_3072

    • EC_P256

    • EC_P256K

    RSA_2048

    RSAES_OAEP_SHA_256_AES_256_ECB_PKCS7_PAD

    RSAES_OAEP_SHA_256_AES_256_ECB_PKCS7_PAD: For more information about the encryption process, see Import key material for an asymmetric key.

  3. Download the wrapping public key and import token, and keep them safe.

    • Public Key Format:

      • DER format: The default file name is WrappingPublicKey**bin.

      • PEM format: The default file name is WrappingPublicKey**.pem.

    • Import Token: The default file name is ImportToken***.txt.

      Important
      • The import token is valid for 24 hours and can be reused within the validity period. After it expires, you must obtain a new import token and public key.

      • The wrapping public key and import token must be used as a pair. You cannot download the wrapping public key and import token twice and use the public key from one download with the import token from another.

3. Encrypt key material with the wrapping public key

Generate and encrypt the key material in your local environment. The following keys are used in this process. For more information, see the following table.

Key

Purpose

Provider

Notation

Target Asymmetric Key (TAK)

The target asymmetric key to be imported.

Your local environment or tools (such as an on-premises Key Management Infrastructure (KMI) or Hardware Security Module (HSM)).

  • TAKpub: Public key

  • TAKpriv: Private key

Import Wrapping Key (IWK)

The encryption key used to import TAK.

Alibaba Cloud KMS.

  • IWKpub: Public key

    Note

    This is the wrapping public key that you download from the KMS console.

  • IWKpriv: Private key

Ephemeral Symmetric Key (ESK)

An ephemeral symmetric key that is used to directly encrypt TAKpriv.

Your local environment or tools. Destroy this key immediately after completing the TAK export operation.

N/A

  1. Create a target asymmetric key private key (TAKpriv). The key specification must be the same as the one you selected when creating the asymmetric key. If you already have a TAKpriv, skip this step.

    Note

    TAKpriv must follow this format: RSA private keys are encoded per RFC 3447, ECC private keys are encoded per RFC 5915, and then wrapped in PKCS#8 format per RFC 5208.

  2. Create an ephemeral symmetric key (ESK).

  3. Use the import wrapping key public key (IWKpub) to encrypt the ephemeral symmetric key (ESK) and obtain the ESK ciphertext (Cipher(ESK)).

  4. Use the ephemeral symmetric key (ESK) to encrypt the target asymmetric key private key (TAKpriv) and obtain the TAK private key ciphertext (Cipher(TAKpriv)).

  5. Assemble the result data in the Cipher(ESK)||Cipher(TAKpriv) format to obtain the encrypted key material.

Example: Generate RSA_2048 key material using OpenSSL

  1. Create an RSA_2048 target asymmetric key private key and convert it to PKCS#8 format.

    openssl genrsa -out TakPrivPkcs1.pem 2048
    openssl pkcs8 -topk8 -inform PEM -in TakPrivPkcs1.pem -outform der -nocrypt -out TakPrivPkcs8.bin
  2. Create an AES_256 ephemeral symmetric key (ESK).

    openssl rand -out EskAes256.bin 32
  3. Use the import wrapping key public key (IWKpub) to encrypt the ephemeral symmetric key (ESK) and obtain the ESK ciphertext (Cipher(ESK)). The RSAES OAEP encryption standard is used with SHA-256 for both MGF1 and hashing.

    openssl pkeyutl -encrypt -pubin -inkey PublicKey.pem  -in EskAes256.bin  -pkeyopt \
    rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha256 -pkeyopt rsa_mgf1_md:sha256 -out \
    CipherEsk.bin
    Note

    Replace PublicKey.pem with the name of the public key file that you downloaded from the KMS console.

  4. Use the ephemeral symmetric key (ESK) to encrypt the target asymmetric key private key (TAKpriv) and generate the TAK private key ciphertext (Cipher(TAKpriv)). The encryption mode is ECB with PKCS#7 padding.

    xxd -l 32  -c 32 -ps EskAes256.bin | xargs -I {} openssl enc  -aes-256-ecb -e  -K {} -in \ 
    TakPrivPkcs8.bin -nosalt -out CipherTakPriv.bin
  5. Assemble the result data in the Cipher(ESK) || Cipher(TAKpriv) format and then perform Base64 encoding.

    cat CipherEsk.bin CipherTakPriv.bin > EncryptedKeyMaterial.bin
    openssl enc -e -base64 -A -in EncryptedKeyMaterial.bin -out EncryptedKeyMaterial_base64.txt
    Note

    EncryptedKeyMaterial_base64.txt is the key material file that can be imported into KMS.

4. Import key material

On the key details page, click Import Key Material. In the Import Wrapped Key Material dialog box, complete the configuration and click OK.

After the key material is imported, the key status changes from Pending Import to Enabled.

kms.png

  • Wrapped Key Material: Upload the key material file that you generated in Step 3. Encrypt key material with the wrapping public key.

  • Import Token: Upload the token file that you downloaded in Step 2. Download wrapping public key and import token.

  • Key Material Expired On: You can select Never Expire or specify a custom expiration time.

    Important

    If you set an expiration time for the key material, KMS deletes the expired key material after the specified time, and you can no longer use the key material. To resume use, you can import the same key material into the key again.

Step 2: Install notation-alibabacloud-secret-manager

The notation-alibabacloud-secret-manager plugin uses Alibaba Cloud KMS keys to sign ACR images in accordance with the Notation community's plugin specification.

Note

Ensure that the notation-alibabacloud-secret-manager plugin runs in the same region and VPC as the dedicated KMS instance. For multi-VPC access, see Configure multi-VPC access to KMS instances within the same region.

  1. Download the plugin for your platform. For other versions, see notation-alibabacloud-secret-manager.

    • Linux_arm64

      wget  https://notation-alibabacloud-secret-manager.oss-cn-hangzhou.aliyuncs.com/dist/v0.1.2/notation-alibabacloud-secret-manager_Linux_arm64.tar.gz      
    • Linux_x86_64

      wget https://notation-alibabacloud-secret-manager.oss-cn-hangzhou.aliyuncs.com/dist/v0.1.2/notation-alibabacloud-secret-manager_Linux_x86_64.tar.gz
  2. Create the plugin directory.

    mkdir -p  /root/.config/notation/plugins/alibabacloud.secretmanager.plugin/
  3. Extract the archive to the plugin directory.

    tar -xvf notation-alibabacloud-secret-manager_Linux_<architecture>.tar.gz  -C /root/.config/notation/plugins/alibabacloud.secretmanager.plugin/
  4. Configure the environment variables.

    export ALIBABA_CLOUD_ACCESS_KEY_ID=<your-access-key-id>
    export ALIBABA_CLOUD_ACCESS_KEY_SECRET=<your-access-key-secret>
    export ALIBABA_CLOUD_KMS_INSTANCE_ENDPOINT=<your-kms-endpoint>
    export ALIBABA_CLOUD_KMS_CLIENTKEY_FILEPATH=<your-clientkey-filepath>
    export ALIBABA_CLOUD_KMS_PASSWORD=<your-password>
    export ALIBABA_CLOUD_KMS_CA_FILEPATH=<your-ca-filepath>
    Note

    The notation-alibabacloud-secret-manager plugin supports multiple credential configuration methods. For more methods, see credentials.

    Parameter

    Description

    Example

    ALIBABA_CLOUD_ACCESS_KEY_ID

    AccessKey ID of your Alibaba Cloud account.

    XXXXXX

    ALIBABA_CLOUD_ACCESS_KEY_SECRET

    AccessKey secret of your Alibaba Cloud account.

    XXXXXX

    ALIBABA_CLOUD_KMS_INSTANCE_ENDPOINT

    VPC endpoint of the dedicated KMS instance.

    kst-hzxxxxxxxxxx.cryptoservice.kms.aliyuncs.com

    ALIBABA_CLOUD_KMS_CLIENTKEY_FILEPATH

    The local path to the client key file for the Application Access Point (AAP) of the dedicated KMS instance. This file should contain the content from the clientKey_KAAP.****.json file, which is downloaded in a previous step when you create the AAP.

    /root/clientkey

    ALIBABA_CLOUD_KMS_PASSWORD

    Password for the Application Access Point (AAP) of the dedicated KMS instance. This password is in the clientKey_KAAP.594c78e6-7244-4187-XXX-8d59dca2ceb4_Password.txt file, downloaded in a previous step when you created the AAP.

    XXXXXX

    ALIBABA_CLOUD_KMS_CA_FILEPATH

    The local path to the CA certificate file for the dedicated KMS instance. This file contains the content from the PrivateKmsCA_xxxxx.pem file that you downloaded in Step 4: Download the CA certificate of the KMS instance.

    /root/privatekmsca

Step 3: Prepare and sign an image

1. Prepare an image in Container Registry

  1. Use an Enterprise Edition instance to build an image or build and push a multi-arch image to Container Registry.

    Note

    Container Registry Enterprise Edition instances support the OCI Image and Distribution Specification v1.1.0, which allows you to use client tools such as ORAS to manage and distribute OCI artifacts that are not container images. For more information, see Use the OCI v1.1.0 specification to manage and associate container images and their derivative artifacts.

  2. Configure access control for your Enterprise Edition instance to connect via a VPC or the internet. For more information, see Network access control.

  3. Obtain the password to log in to your Container Registry Enterprise Edition instance. If you forget or lose the password, you can reset it by configuring access credentials. For more information, see Configure access credentials.

2. Sign an image with Notation and KMS

You can use the notation-alibabacloud-secret-manager plugin to sign a specified image in Container Registry with a KMS-managed private key and certificate.notation-alibabacloud-secret-manager plugin to sign a specified image in Container Registry with a private key and certificate from Secrets Manager in Key Management Service (KMS).

To use the notation-alibabacloud-secret-manager plugin with the KMS Instance SDK (Go), you must meet specific conditions and configure custom environment variables.

  1. Run the following command to log in to the image repository.

    ./notation login --username=tsh_ram@11380257155*** test-for-doc-registry.cn-hangzhou.cr.aliyuncs.com
  2. Run the following command to sign the specified image and generate a certificate. In the command, <dirPath> specifies the path to store the generated certificate, for example, /root.

    ./notation sign  --id <keyId> --plugin alibabacloud.secretmanager.plugin test-for-doc-registry.cn-hangzhou.cr.aliyuncs.com/test/nginx:2.11 --plugin-config output_cert_dir=<dirPath>

    Expected output:

    Successfully signed test-for-doc-registry.cn-hangzhou.cr.aliyuncs.com/test/nginx@sha256:f57e1908e63538ad5159fa99443d0492d23b9d34ba7******
  3. You can use the following Notation CLI command to sign an artifact.

    notation sign --id <keyId> --plugin alibabacloud.secretmanager.plugin  <myRegistry>/<myRepo>@<digest> --plugin-config output_cert_dir=<dirPath>

    Parameter

    Description

    id

    The ID of the Key Management Service (KMS) key.

    plugin-config

    Custom plugin parameters. The following options are supported:

    • output_cert_dir: Specifies the directory to export the X.509 certificate that is generated from the KMS key during signing.

    • ca_certs: Specifies the file path to the self-signed certificate. Use this parameter when signing with a self-signed key that is imported into a KMS instance and also used to issue an X.509 certificate.

Step 4: Verify signatures with Ratify and Gatekeeper

1. Install Ratify and Gatekeeper

  1. Enable Gatekeeper-based policy governance. For more information, see Enable security policy management.

  2. Install Ratify.

    1. Create the ratify namespace.

      kubectl create ns ratify
    2. Log on to the ACK console. In the left navigation pane, click Clusters.

    3. On the Clusters page, click the name of your cluster. In the left navigation pane, click Applications > Helm.

    4. On the Helm page, click Deploy. In the Basic Information section, set the following parameters, select the ratify chart, and then click Next.

      Parameter

      Example value

      Application name

      ratify

      Namespace

      Select ratify.

      Source

      The default value is Marketplace.

      Chart

      • For Use scenarios, select All.

      • For Supported architecture, select amd64.

      • In the Search box, enter ratify.

    5. On the Parameters page, select a Chart Version. To pull images by using RAM Roles for Service Accounts (RRSA), modify the parameters as shown in the Configuration example column. Then, click OK.

      Parameter

      Description

      Default

      Configuration example

      ServiceAccount.create

      Determines whether to create a dedicated service account for Ratify. Valid values:

      • true (default): A service account named ratify-admin is automatically created.

      • false: A service account is not automatically created. If you use RRSA to pull images, you must create a service account manually before you install Ratify.

      true

      Keep the default value.

      ServiceAccount.name

      The name of the Ratify service account.

      ratify-admin

      Keep the default value.

      ServiceAccount.annotations

      Custom annotations for the service account.

      {}

      Add the pod-identity.alibabacloud.com/role-name: <Your-RRSA-role> annotation to enable automatic injection.

      Note

      Replace <Your-RRSA-role> with the name of your RRSA role.

      oras.authProviders.k8secretsEnabled

      Enables the Kubernetes Secrets Provider for image repository authentication.

      false

      Keep the default value.

      Note

      For more information about ORAS configurations, see ORAS Store configuration example.

      oras.authProviders.alibabacloudAcrBasicEnabled

      Enables the Alibaba Cloud ACR Provider for RRSA authentication with Container Registry instances.

      false

      true

      oras.cache.enabled

      Enables ORAS store caching for ListReferrers and GetSubjectDescriptor.

      Important

      TTL-based caching might cause inconsistencies between the cache and the data source. If you require strong consistency, disable this parameter.

      true

      Keep the default value.

      oras.cache.ttl

      Sets the time-to-live (TTL) for the ORAS Store cache.

      10

      Keep the default value.

      alibabacloudAcrConfig.defaultInstanceId

      The default instance ID of the Container Registry instance that stores the target artifact.

      Required.

      Enter the ID of your Container Registry Enterprise Edition instance.

      alibabacloudAcrConfig.acrInstancesConfig

      To pull images from different Container Registry instances, define the instanceName and instanceId for each instance in this list.

      []

      Configure this parameter as shown in the following example to connect to a private Container Registry repository.

      image

      upgradeCRDs.enabled

      Enables or disables the pre-install chart hook for upgrading Ratify CRDs.

      true

      Set this to false to skip upgrading the Ratify CRDs.

      Note

      Setting this to true triggers a pre-install hook, which may cause the installation to time out.

      featureFlags.RATIFY_CERT_ROTATION

      Enables or disables automatic TLS certificate rotation. When enabled, Ratify automatically generates and rotates certificates.

      false

      Set to true to enable automatic certificate generation and rotation by the Ratify backend.

      notationCert

      Deprecated.

      Use notationCerts instead to specify an array of verification certificates for the Notation verifier. The Notation verifier uses the specified certificates and certificate chain public keys to create its built-in certstore.

      None

      Keep the default value.

      notationCerts

      An array of public key certificates and certificate chains for the Notation verifier's built-in certstore.

      Enter the KMS verification certificate that was returned when you signed the artifact with the Notation plugin. For example:

      image

  3. In the left-side navigation pane, choose Security > Policy Governance. Click the My Policies tab and verify that the RatifyVerification policy exists.image

2. Configure RRSA for private image signatures

Ratify supports authenticating with private Container Registry repositories by using RAM Roles for Service Accounts (RRSA) to pull signature data. For more information, see Use RRSA to grant RAM permissions to service accounts for pod-level access control.

  1. Install the ack-pod-identity-webhook component from the Add-ons page of your cluster.

  2. Create a RAM role named ratify-role. Set its trusted entity type to Identity Provider (IdP) and configure the condition fields in the trust policy. You can also use the ack-ram-tool CLI to automate the configuration.

    In the oidc:sub value, replace <namespace> and <service_account> with the namespace and service account used for the Ratify installation.
    {
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": {
          "oidc:aud": "sts.aliyuncs.com",
          "oidc:iss": "<oidc_issuer_url>",
          "oidc:sub": "system:serviceaccount:<namespace>:<service_account>"
        }
      },
      "Effect": "Allow",
      "Principal": {
        "Federated": [
          "<oidc_provider_arn>"
        ]
      }
    }
  3. Attach the AliyunContainerRegistryFullAccess policy to the ratify-role RAM role.

  4. When you deploy Ratify, create a service account and add the following annotations to both the service account and its namespace. After Ratify is deployed, the ALIBABA_CLOUD_ROLE_ARN, ALIBABA_CLOUD_OIDC_PROVIDER_ARN, and ALIBABA_CLOUD_OIDC_TOKEN_FILE environment variables are automatically injected into the Ratify pod template.

    Note

    If the service account already exists, add the pod-identity.alibabacloud.com/role-name: ratify-role annotation to it.

    ---
    apiVersion: v1
    kind: Namespace
    metadata:
      name: ratify  # The name of the namespace.
      labels:
        pod-identity.alibabacloud.com/injection: 'on'
    
    ---
    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: ratify-admin    # The name of the service account.
      namespace: ratify     # The name of the namespace.
      annotations:
        pod-identity.alibabacloud.com/role-name: ratify-role # The name of the RAM role created earlier.
    
    ---

Step 5: Verify signing and verification

Deploy an application with a specific image in your ACK cluster to verify that the signing and verification feature works.

  • When you deploy a workload that uses an image with a valid signature, verify that the workload is successfully deployed to the target cluster.

  • When you deploy a workload that uses an unsigned image, verify that Ratify blocks the deployment. Check the workload status with kubectl to view the blocking message. For more details, review the Ratify pod logs.

    kubectl get deploy ${unsigned_deploy_name} -n ${namespace} -o yaml # Replace with your deployment name and namespace.

    The verification log is similar to the following:

    image

Ratify configuration

Ratify provides multiple built-in and external verifiers to process specific artifact types. To meet various signature verification needs, you can customize KeyManagementProvider (KMP) instances to define the keys or certificates used by verifiers. Ratify also provides a store to discover and retrieve metadata associated with an artifact's subject field, as defined in the OCI v1.1 specification. The following sections provide configuration examples.

Notation verifier configuration

In a verifier, you can define the name and artifactType fields to specify the artifact types it handles. Verifiers can be defined at the cluster scope or at the namespace scope by using the NamespacedVerifier kind. For more information, see the official Ratify documentation.

After you install Ratify with the default settings, a Notation verifier instance is automatically created in the cluster. You can configure the trustPolicyDoc policy as needed. The following is a sample configuration.

Notation verifier configuration

apiVersion: config.ratify.deislabs.io/v1beta1
kind: Verifier
metadata:
  name: verifier-notation
spec:
  artifactTypes: application/vnd.cncf.notary.signature
  name: notation
  parameters:
    trustPolicyDoc:
      trustPolicies:
      - name: default
        registryScopes:
        - '*'
        signatureVerification:
          level: strict
        trustStores:
        - ca:certs
        trustedIdentities:
        - '*'
      version: "1.0"
    verificationCertStores:
      certs:
      - ratify-notation-inline-cert
  version: 1.0.0
status:
  issuccess: true

KMP configuration

You can define custom KeyManagementProvider (KMP) instances with inline public keys or X.509 certificates to meet various signature verification needs. During signature verification, verifiers like Notation and Cosign use an associated KMP resource. KMP resources can be defined at the cluster or namespace scope. For more information, see the official Ratify documentation. The following is a sample configuration.

KMP configuration

apiVersion: config.ratify.deislabs.io/v1beta1
kind: KeyManagementProvider
metadata:
  name: ratify-notation-inline-cert
spec:
  parameters:
    contentType: certificate
    value: |
      -----BEGIN CERTIFICATE-----
      XXXXXX
      XXXXXX
      XXXXXX
      -----END CERTIFICATE-----
  type: inline

ORAS store configuration

After you install Ratify, you can configure the authProvider parameter in the default ORAS store instance to connect to your private repositories in Alibaba Cloud Container Registry (ACR). The following is a sample configuration.

ORAS store configuration

apiVersion: config.ratify.deislabs.io/v1beta1
kind: Store
metadata:
  name: store-oras
spec:
  name: oras
  parameters:
    authProvider:
      acrInstancesConfig:
      - instanceName: name1
        instanceId: cri-aaaaaaaaaaaa
      - instanceName: name2
        instanceId: cri-bbbbbbbbbbbb
      defaultInstanceId: cri-ccccccccc
      name: alibabacloudAcrBasic

Parameter

Required

Description

name

No

For Alibaba Cloud Container Registry (ACR), the authProvider.name parameter must be set to alibabacloudAcrBasic.

acrInstancesConfig

No

Defines a mapping between multiple ACR instances and their instance IDs. Ratify uses this mapping to retrieve the corresponding instance ID based on the image repository name specified in the workload.

defaultInstanceId

Yes

Specifies the default instance ID.

Note

If Ratify cannot find a matching instance ID in acrInstancesConfig, it falls back to the ID specified in the defaultInstanceId field. It then uses the environment's configured Alibaba Cloud Credentials to retrieve temporary credentials for logging in to the ACR instance.