Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Container Image Signature Verification

Updated on 2025-02-18 GMT+08:00

Introduction

The Container Image Signature Verification add-on (formerly swr-cosign) is used to sign image files and verify their integrity and authenticity. This prevents image files from being tampered with or implanted with malicious code.

Notes and Constraints

  • An SWR Enterprise instance has been created before you use the image signature verification function.

Installing the Add-on

  1. Log in to the CCE console and click a cluster name to access the cluster. In the navigation pane, choose Add-ons, locate Container Image Signature Verification on the right, and click Install.
  2. On the Install Add-on page, configure the specifications as needed.

    • If you selected Preset, you can choose between Small or Large based on the cluster scale. The system will automatically set the number of add-on pods and resource quotas according to the preset specifications. You can see the configurations on the console.

      The small specification specifies that the add-on runs in one pod, which is ideal for clusters with fewer than 50 concurrent image downloads. The large specification specifies that the add-on runs in two pods, which are more appropriate for clusters with fewer than 300 concurrent image downloads.

    • If you selected Custom, you can adjust the number of pods and resource quotas as needed. High availability is not possible with a single pod. If an error occurs on the node where the add-on instance runs, the add-on will fail.

  3. Configure the add-on parameters.

    Table 1 swr-cosign parameters

    Parameter

    Description

    KMS key

    Select a key. Only EC_P256, EC_P384, and SM2 are supported.

    You can add a key using KMS.

    Signature Verification Image

    Enter a regular expression for the path to a signature verification image. For example, if you enter docker.io/**, the signature of the image in the docker.io image repository will be verified. To verify the signatures of all images, enter **.

  4. Click Install.

    After the add-on is installed, select the cluster and choose Add-ons in the navigation pane. On the displayed page, view the add-on in the Add-ons Installed area.

Components

Table 2 Add-on components

Component

Description

Resource Type

swr-cosign

swr-cosign verifies digital signatures of image files to ensure that the image files are not tampered with.

Deployment

How to Use

  1. Install swr-cosign and configure the KMS key and image address as instructed in Installing the Add-on.
  2. Add the policy.sigstore.dev/include:true label to the namespace that requires signature verification.

    1. In the navigation pane of the cluster console, click Namespaces.
    2. Locate the namespace to be verified. In the Operation column, choose More > Manage Label.
    3. Add a label.
      • Key: policy.sigstore.dev/include
      • Value: true
    4. Click OK.

  3. Check whether image signature verification is enabled.

    1. In the navigation pane of the cluster console, click Workloads.
    2. Click Create Workload in the upper right corner.
    3. Select the namespace where the label was added, enter the unsigned image path, and set other parameters as instructed in Creating a Deployment.
    4. Click Create Workload.
      Unsigned images will be blocked. The following information is displayed:
      admission webhook "policy.sigstore.dev" denied the request: validation failed: failed policy: cip-key-secret-match: spec.template.spec.containers[0].image ...

  4. Sign an image.

    1. Log in to the SWR enterprise repository and access an existing repository.
    2. In the navigation pane, choose Security > Image Signature and create a signature rule.
      • Name: Name the signature rule.
      • Organization: Select a container image organization.
      • Application Scope:
        • Image: Select the image to be signed. You can also use a regular expression to match multiple images.
        • Version: Select an image version. If this parameter is left blank or set to **, all versions of the image are matched.
      • Signing Method: Select KMS.
      • Signature Key: Select a KMS key. The key must be the same as that used during add-on installation.
      • Trigger Mode:
        • Manual: After a signature rule is created, manually execute the rule to sign the image.
        • Event + manual: The image can be signed by events or manually.
      • Description: Enter the description of the rule.
    3. After the signature rule is created, click Execute to sign the selected image.
    4. After the image is signed, in the navigation pane, choose Artifact Repositories > Image Repositories and click the image name to view the image details. The image already has a signature attachment.

  5. Go back to the CCE console, and check whether the signed image can be used to create a workload successfully.

Change History

Table 3 Release history

Add-on Version

Supported Cluster Version

New Feature

1.0.26

v1.23

v1.25

v1.27

v1.28

v1.29

v1.30

v1.31

Clusters 1.31 are supported.

1.0.2

v1.23

v1.25

v1.27

Clusters 1.27 are supported.

1.0.1

v1.23

v1.25

Supports verification of container image signatures.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback