Mirror image deployment method and device based on cloud technology

By using signature information in the Enclave image file to obtain the decryption key and set constraints, the problem that the confidentiality of the Enclave image file in the prior art is solved, and efficient and secure transmission and storage of mirror data is achieved.

CN119071001APending Publication Date: 2024-12-03HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310586851.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The prior art cannot effectively ensure the security of confidential data of Enclave image files during transmission and storage, and can only ensure integrity but not confidentiality.

Method used

By receiving a mirror file request containing signature information and encrypted data, using the signature information to obtain a decryption key to decrypt and encrypt the mirror file, set constraints to limit decryption permissions, and ensure that only authorized roles can access the key, thereby protecting the mirror data. Security.

Benefits of technology

It effectively improves the security and confidentiality of mirrored data during transmission and storage, prevents malicious theft, ensures that only authorized roles can obtain the decryption key, and enhances the security of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071001A_ABST
    Figure CN119071001A_ABST
Patent Text Reader

Abstract

The invention provides a mirror image deployment method and device based on a cloud technology. The method comprises the following steps: acquiring signature information and a first key in a to-be-deployed mirror image file; wherein the to-be-deployed mirror image file further comprises mirror image data encrypted by using a second secret key, and the first secret key and the second secret key are encryption and decryption secret key pairs. And based on the signature information and the first key, triggering a preset decryption permission, thereby obtaining a second key after the first key is decrypted. And decrypting the to-be-deployed mirror image file based on the second key to obtain decrypted mirror image data. According to the method and the device, the mirror image data in the mirror image file is encrypted, so that the security of the mirror image file in scenes such as storage and transmission is improved, and the mirror image data is prevented from being maliciously stolen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of cloud technology, and in particular to a cloud technology-based image deployment method and device. Background Art

[0002] In the field of cloud technology, an enclave is a completely isolated virtual machine whose memory and processor come from the resources that are pre-isolated from its parent virtual machine. Enclave has neither external network nor persistent storage. Processes, applications, kernels or users in the parent virtual machine cannot access the resources in the enclave. Accordingly, a cloud server can build an enclave and execute sensitive application code and data in the enclave. Exemplarily, an administrator can build an enclave image file and sign the enclave image file with a private key. Operation and maintenance personnel can deploy the enclave image file in the cloud system. During the deployment of the enclave image file, the cloud platform performs integrity verification on the enclave image file based on the private key. However, the signature method in the existing technology can only ensure the integrity of the enclave image file, but cannot ensure the confidentiality of the enclave image file. For example, in the case where the enclave image file includes confidential data (or sensitive data), the security of the confidential data in the enclave image file cannot be guaranteed during the transmission process of the enclave image file and in the scenario where the enclave image file is stored on an external server. Summary of the invention

[0003] The embodiments of the present application provide a cloud-based image deployment method and device, which can effectively ensure the security of user data in the image file.

[0004] In the first aspect, an embodiment of the present application provides an image deployment method based on cloud technology. The method includes: receiving a first request message sent by a first client, the first request message includes an image file to be deployed, the first request message is used to indicate decryption of the image file to be deployed, the image file to be deployed includes signature information, a first key, and image data encrypted using a second key; wherein the signature information is used to uniquely identify the image data, and the first key and the second key are an encryption and decryption key pair. Obtain the signature information and the first key. Based on the signature information and the first key, obtain the second key. wherein the second key is obtained by decrypting the first key after identifying that it has decryption authority based on the signature information. Based on the second key, decrypt the image file to be deployed to obtain the decrypted image data. In this way,

[0005] By encrypting the image data, the image data can be protected from malicious theft during the storage and transmission of the image file, effectively improving the security and confidentiality of the image data. In addition, the application imposes conditional constraints on the decryption authority, so that the decryption authority of the key is subject to the constraints, so that other illegal roles cannot obtain the decryption key and cannot decrypt the image data if the constraints cannot be met, thereby effectively ensuring the security of the image data.

[0006] In a possible implementation, before receiving the first request information sent by the first client, the method also includes: receiving the second request information sent by the second client, the second request information includes the image file to be compiled, the image file to be compiled includes signature information and image data, and the second request information is used to indicate the compilation of the image file to be compiled. Based on the signature information, the first key and the second key are obtained; wherein the first key is generated after the signature information identifies that the user has the authority to generate the key, and the second key is obtained after the first key is decrypted after the signature information determines that the user has the decryption authority. Based on the second key, the image data is encrypted. Based on the encrypted image data, the first key and the signature information, the image file to be deployed is obtained. The image file to be deployed is sent to the second client. In this way, during the compilation process, by setting constraints, the KMS can constrain the use rights of the key. In this application, only the operation and maintenance management service carrying the signature information can obtain the corresponding permissions, which can ensure the security of the key and prevent it from being maliciously stolen by other illegal roles.

[0007] In a possible implementation, the image file to be deployed of the first client is obtained from the second client. In this way, after the second client obtains the generated image file, it can be published to any client. The image file obtained by other clients is generated after encryption, and any client will not obtain the encrypted data in the image file, thereby protecting the security of the data.

[0008] In a possible implementation, all or part of the data in the mirror data is encrypted using the second key. In this way, in the embodiment of the present application, the Hypervisor can encrypt all or part of the data based on the user's instructions to ensure the security of the sensitive data indicated by the user.

[0009] In a possible implementation, the image file to be deployed is an enclave image file.

[0010] In a possible implementation, the image file to be deployed includes any one of a public image, a private image, a shared image, and a market image.

[0011] In the second aspect, the embodiment of the present application provides an image deployment device based on cloud technology, including: a receiving module, used to receive a first request message sent by a first client, the first request message includes an image file to be deployed, the first request message is used to instruct to decrypt the image file to be deployed, the image file to be deployed includes signature information, a first key, and image data encrypted with a second key; wherein the signature information is used to uniquely identify the image data, and the first key and the second key are an encryption and decryption key pair. An operation and maintenance management module, used to obtain the signature information and the first key; the operation and maintenance management module, used to obtain the second key based on the signature information and the first key; wherein the second key is obtained by decrypting the first key after identifying the decryption authority based on the signature information; a virtual machine monitoring module, used to decrypt the image file to be deployed based on the second key to obtain the decrypted image data.

[0012] In a possible implementation, the receiving module is further used to receive a second request information sent by a second client, the second request information includes an image file to be compiled, the image file to be compiled includes signature information and image data, and the second request information is used to instruct to compile the image file to be compiled; the operation and maintenance management module is further used to obtain a first key and a second key based on the signature information; wherein the first key is generated after identifying the user with the key generation authority based on the signature information, and the second key is obtained after decrypting the first key after determining the user with the decryption authority based on the signature information; the virtual machine monitoring module is further used to encrypt the image data based on the second key; the virtual machine monitoring module is further used to obtain the image file to be deployed based on the encrypted image data, the first key and the signature information; the virtual machine monitoring module is further used to send the image file to be deployed to the second client.

[0013] In a possible implementation manner, the image file to be deployed of the first client is obtained from the second client.

[0014] In a possible implementation, all or part of the mirrored data is encrypted using the second key.

[0015] In a possible implementation, the image file to be deployed is an enclave image file.

[0016] In a possible implementation, the image file to be deployed includes any one of a public image, a private image, a shared image, and a market image.

[0017] In a third aspect, an embodiment of the present application provides an image deployment system based on cloud technology, the system comprising: a cloud management platform, for: receiving a deployment request message sent by a first client, the deployment request message including an image file to be deployed, the first request message being used to instruct to decrypt the image file to be deployed, the image file to be deployed including signature information, a first key, and image data encrypted using a second key; wherein the signature information is used to uniquely identify the image data, the first key and the second key being an encryption and decryption key pair; sending the deployment request message to an operation and maintenance management service; the operation and maintenance management service being used to: in response to the deployment request message, send a request to a key management service (Key Management Service); The first request information includes signature information and a first key, and the first request information is used to request a second key from the KMS; the KMS is used to: after recognizing that the operation and maintenance management service has the decryption authority based on the signature information, decrypt the first key to obtain the second key; send the second key to the operation and maintenance management service; the operation and maintenance management service is used to: receive the second key; send the second key to the virtual monitoring service (Hypervisor, HV); the HV is used to: decrypt the image file to be deployed based on the second key to obtain the decrypted image data.

[0018] In a possible implementation, the cloud management platform is further used to: receive compilation request information sent by the second client, the compilation request information includes the image file to be compiled, the image file to be compiled includes signature information and image data, and the second request information is used to instruct to compile the image file to be compiled; send the compilation request information to the operation and maintenance management module; the operation and maintenance management module is further used to: send second request information to the KMS in response to the compilation request information, the second request information includes signature information, and the second request information is used to request the first key and the second key from the KMS; the KMS is further used to: in response to the second request information, identify based on the signature information that the operation and maintenance management service has the key generation authority, and generate the first key; after determining based on the signature information that the operation and maintenance management service has the decryption authority, decrypt the first key to obtain the second key; send the first key and the second key to the operation and maintenance management module; the operation and maintenance management service is further used to: output the received first key and the second key to the HV; the HV is further used to: encrypt the image data based on the second key; obtain the image file to be deployed based on the encrypted image data, the first key and the signature information; and send the image file to be deployed to the second client.

[0019] In a possible implementation manner, the image file to be deployed of the first client is obtained from the second client.

[0020] In a possible implementation, all or part of the mirrored data is encrypted using the second key.

[0021] In a possible implementation, the image file to be deployed is an enclave image file.

[0022] In a possible implementation, the image file to be deployed includes any one of a public image, a private image, a shared image, and a market image.

[0023] In a fourth aspect, an embodiment of the present application provides a computing device cluster, including at least one computing device, each computing device including a processor and a memory. The processor of at least one computing device is used to execute instructions stored in the memory of at least one computing device, so that the computing device cluster executes the method in the first aspect or any possible implementation of the first aspect.

[0024] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, characterized in that when the instructions are executed by a computing device cluster, the computing device cluster executes the method in the first aspect or any possible implementation of the first aspect.

[0025] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that it includes computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a schematic diagram of an Enclave instance shown as an example;

[0027] Figure 2 The following is a schematic diagram of the structure of an Enclave image file shown as an example;

[0028] Figure 3 A schematic diagram of the structure of a cloud environment is shown as an example;

[0029] Figure 4 A schematic diagram of the stages shown as an example;

[0030] Figure 5 A schematic diagram of the process of the preparation phase and the compilation phase is shown as an example;

[0031] Figure 6 A flowchart of the compilation phase is shown as an example;

[0032] Figure 7 A flowchart of the compilation phase is shown as an example;

[0033] Figure 8 A schematic diagram of an exemplary deployment process is shown;

[0034] Fig. 9 A schematic diagram of an exemplary deployment process is shown;

[0035] Fig.10 It is a structural schematic diagram of an exemplary mirror deployment device;

[0036] Fig.11 The structure diagram of the image deployment system is shown as an example;

[0037] Fig.12 A schematic diagram of the structure of a computing device is shown as an example;

[0038] Fig.13 A schematic diagram of the structure of a computing device is shown as an example;

[0039] Fig.14 The figure is a schematic diagram of the structure of a computing device cluster shown as an example. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0041] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0042] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0043] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0044] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0045] First, some background technologies involved in the embodiments of this application are briefly described:

[0046] Enclave: Enclave is a completely isolated virtual machine whose memory and central processing unit (CPU) come from the pre-isolated resources of its parent virtual machine. Enclave has neither external network nor persistent storage. The parent virtual machine and Enclave communicate through a secure local channel. Even the root user on the parent virtual machine cannot access the Enclave or connect to the Enclave through SSH (Secure Shell). In other words, processes, applications, kernels or users in the parent virtual machine cannot access the resources in the Enclave.

[0047] Parent VM: A VM that has ownership of an Enclave VM is called a parent VM. A parent VM is an Elastic Cloud Server (ECS) instance that can allocate its CPU and memory resources to an Enclave in isolation. These resources can be used by the Enclave during its life cycle. After the Enclave is successfully started, the Enclave can only communicate securely with its parent VM.

[0048] Enclave image file: The Enclave image file provides the system information required to start the Enclave and run the Enclave application in it, including but not limited to: Linux operating system, other third-party libraries and Enclave applications, etc. For details on image creation, see Enclave application development on Linux system. In the embodiment of the present application, the image file includes any one of a public image, a private image, a shared image and a market image.

[0049] Security administrator: has control over confidential data and Key Management Service (KMS) keys. As the owner of a Huawei Cloud account, the security officer has the highest authority. For example, the security officer can create Identity and Access Management (IAM) users and set minimum permissions for them, create encryption keys, and encrypt sensitive data. In this scenario, we also assume that the security officer is also responsible for building the Enclave image.

[0050] Enclave application developers: Develop applications that run in the enclave.

[0051] Figure 1 This is a schematic diagram of an exemplary Enclave instance. Figure 1, Hypervisor (virtual monitor) is an intermediate layer software running between the physical server and the operating system. In this scenario, the Hypervisor can isolate the CPU and memory of the Enclave from the CPU and memory resources of the parent virtual machine, providing a completely isolated executable environment and significantly reducing the attack surface. Therefore, the Hypervisor-based Enclave can protect sensitive core data and applications, and increase security for services running in the Enclave. Applications (App), libraries (Lib), users (User), and operating systems (Operating System, OS) in the parent virtual machine instance on the Hypervisor can all start the Enclave image through local communication, but they cannot access trusted applications (Trusted Apps) and confidential data (Secret Data) in the Enclave.

[0052] For example, Figure 2 This is a schematic diagram of the structure of an Enclave image file. Figure 2 , wherein the Enclave image file includes but is not limited to: an image header (Header) and an image section (Section), etc. The image header includes but is not limited to some description information and reserved fields, etc., wherein the description information includes but is not limited to version information, identification information, etc., which can be set according to actual needs and is not limited in this application.

[0053] The image part is used to carry image data. The image part includes but is not limited to: the kernel part (Section (Kernel)) for carrying kernel data, the command line part (Section (Cmdline)) for carrying command data (i.e. command line), the user data part (Section (Ramdist (virtual memory disk) [1-N])) for carrying user data, and the signature part (Section (Signature)) for carrying signature information (also called measurement value).

[0054] Exemplarily, Ramdisk[1-N] is user data. Optionally, Ramdisk[0] (ie, Section (Ramdisk-0)) is used to carry manufacturer data, which may be provided by a manufacturer (eg, Huawei).

[0055] Exemplarily, the signature part includes but is not limited to: a section header (also referred to as a signature information section header) (Section Header) and a platform configuration register (Platform configuration registers, PCR) signature list (List), etc.

[0056] The Section Header includes but is not limited to type information, identification information, size information, etc.

[0057] The PCR Signature List includes but is not limited to: Signing Certification and Signature of PCR[0]. Signature of PCR[0] is used to carry the measurement value (i.e., signature information). In an embodiment of the present application, the measurement value of the Enclave is composed of a set of hash values ​​obtained by a standard trusted measurement operation. Among them, when the image is produced, the value of PCR[0] is determined.

[0058] Still refer to Figure 1 , exemplarily, the Hypervisor can deploy (or run) the Enclave image. The parent virtual machine administrator can start the Enclave image through the parent virtual machine instance (which can also be understood as running the Enclave instance). Correspondingly, the user's terminal can obtain the running results of the Enclave instance from the Hypervisor. Different Enclave images provide different functions and their running results are also different.

[0059] However, in the Enclave deployment scenario of the prior art, the security of the Enclave running in the Hypervisor is relatively high, that is, the Hypervisor can provide a secure environment for the Enclave image and its data, so that the parent virtual machine and other users cannot access the Enclave image and its data stored and running in the Hypervisor. However, in the prior art, usually only the integrity of the running environment of the Enclave image and the integrity of the Enclave itself are verified. For example, the integrity of the Enclave image can be verified based on the measurement value, but the prior art does not provide a corresponding protection mechanism for the confidentiality of the Enclave image. For example, during the transmission of the Enclave image, or when it is stored in an external environment (i.e., non-Hypervisor), the user data (especially sensitive data) in the Enclave image may be stolen.

[0060] An embodiment of the present application provides an image deployment method, in which the compiled and constructed Enclave images are encrypted, and only designated objects are allowed to have the authority to obtain the decryption key, thereby ensuring the security of the Enclave image before deployment.

[0061] Figure 3 This is a schematic diagram of the structure of a cloud environment. Figure 3The cloud environment includes but is not limited to: terminals, cloud management platform, cloud, KMS and security token service (Security Token Service), etc.

[0062] Exemplarily, the number of terminals may be one or more. The terminal is installed with a CLI (command-line interface). In an embodiment of the present application, the terminal may be a virtual machine, specifically a parent virtual machine. In other words, the user may install the CLI on the parent virtual machine. The virtual machine may be deployed on a device that supports virtualization, such as a computer, a notebook, a server, etc., which is not limited in the present application.

[0063] Exemplarily, CLI is used to provide user interaction functions, and the user interface it provides allows users to input corresponding user instructions to instruct the cloud to perform corresponding actions.

[0064] Nova, also known as the operation and maintenance management module, is the core service of OpenStack, responsible for maintaining and managing the computing resources of the cloud environment. It can be used as a platform (or module) responsible for managing computing resources, networks, authentication, and required scalability. Nova provides the nova-api (Application Programming Interface) interface, also known as the user interface, for receiving and responding to user API calls. Managers can use this interface to manage internal infrastructure and provide services to users. In addition, Nova can interact with Hypervisor and other roles in the cloud environment (such as KMS, STS, etc.). In an embodiment of the present application, Nova can call KMS to obtain encryption keys and decryption keys.

[0065] Hypervisor is an intermediate layer software running between a physical server and an operating system. In this scenario, the Hypervisor can isolate the CPU and memory of the Enclave from the CPU and memory resources of the parent virtual machine, providing a completely isolated executable environment and significantly reducing the attack surface. Therefore, the Hypervisor-based Enclave can protect sensitive core data and applications, and increase security for services running in the Enclave. Applications, libraries, users, and operating systems in the parent virtual machine instance on the Hypervisor can all start the Enclave image through local communication, but they cannot access trusted applications and confidential data in the Enclave. In an embodiment of the present application, the Hypervisor can be used to encrypt image files based on the encryption key input by the Nova service, and to decrypt image files based on the decryption key input by the Nova service. It can also be used to deploy decrypted image files in a cloud environment, and to feedback the running results of the image files to the client (or cloud management platform).

[0066] KMS: Key Management Service, KMS is a core service in the cloud data encryption service family. KMS provides high-availability key generation, storage, management, and auditing solutions. KMS keys are protected by hardware security modules HSM and integrated with many cloud data storage services. In an embodiment of the present application, tenant administrators can create and manage customer master keys (CMKs), i.e., keys used to encrypt DataKey (keys for encrypting data), through the KMS service.

[0067] STS: Security Token Service. Applications use STS to apply for security tokens with automatic expiration and limited permissions to access cloud resource APIs, which can meet higher security requirements.

[0068] like Figure 4 As shown, the technical solution in the embodiment of the present application is mainly divided into three stages, the first stage is the preparation stage, the second stage is the compilation stage, and the third stage is the deployment stage.

[0069] The preparation phase is mainly used to set user permissions, set keys, and set constraints. The constraints are the conditions for using the keys. In the embodiment of the present application, the keys can be used if the constraints are met. Using keys includes but is not limited to: generating keys and decrypting keys, that is, obtaining encryption keys and decryption keys. The specific details will be described below.

[0070] The compilation phase mainly compiles the image data input by the user, generates an image file (i.e., Enclave image), and encrypts the image file.

[0071] The deployment phase mainly involves decrypting the image file and deploying the decrypted image file.

[0072] Optionally, the preparation phase and the compilation phase may also be considered as the same phase, which is not limited in this application.

[0073] The above stages are described in detail below.

[0074] The first stage is the preparation stage.

[0075] Figure 5 This is a flowchart showing the preparation phase and the compilation phase. Figure 5 , exemplarily, the preparation stage specifically includes but is not limited to the following steps:

[0076] S501: The security administrator instructs the KMS to create a master key.

[0077] For example, the security administrator may pre-install the CLI on a terminal (e.g., a parent virtual machine). The security administrator may enter relevant instructions in the interface provided by the CLI. The CLI may send the received instructions to the cloud management platform, which in turn sends them to the target object in the cloud environment.

[0078] In this example, the security administrator can create users or roles on the parent virtual machine, for example, including but not limited to user identification information, user type, etc. The specific creation process can refer to the existing technical embodiments, and this application will not go into details. The parent virtual machine can send a user creation instruction to the cloud management platform, which includes user identification information, user type and other information. The cloud management platform can create the corresponding user. In addition, the cloud management platform can send a registration message to other modules or services (such as KMS, Nova, etc.) to indicate that the user has been created. The registration message may include but is not limited to: user identification, user type, etc. Optionally, the user identification information may be a token, etc., which can be set according to actual needs and is not limited in this application. The method of obtaining the token can refer to the existing technology, and this application will not go into details.

[0079] The security administrator enters a master key creation instruction on the interface provided by the CLI to instruct KMS to create a master key. In response to the received master key creation instruction, the CLI generates a corresponding master key creation request and sends the request to the cloud management platform. Exemplarily, the master key creation request includes but is not limited to: user identification information and master key creation request information. The master key creation request information is used to instruct the creation of a master key corresponding to the user (i.e., the user indicated by the user identification information). The user identification information is used to identify the user or role created on the parent virtual machine described above.

[0080] Exemplarily, the cloud management platform sends the master key creation instruction to the KMS. Exemplarily, Figure 7As shown, KMS creates a master key corresponding to the user, namely, a customer master key (CMK), in response to the received master key creation request. When KMS generates the master key, it also generates a key identifier (Key ID) corresponding to the master key. KeyID can be understood as being used to uniquely identify the master key.

[0081] Optionally, KMS can also save other information corresponding to the master key, such as creation time, lease duration, etc., which can be set according to actual needs and is not limited in this application.

[0082] For example, refer to Figure 7 After KMS generates a master key, it can set the permission information corresponding to the master key (which can be called master key permission information). This permission information is used to authorize the CMK to be used by a specified user.

[0083] In the embodiment of the present application, the master key permission information includes but is not limited to: create authorization (Create Grant) permission, release authorization (Retire Grant) permission, and view key (Describe Key) permission, etc., which can be set according to actual needs and are not limited in this application.

[0084] The Create Grant permission is used to indicate that the user (specifically the user authorized by the master key) can create the relevant usage permissions corresponding to the master key in KMS. In other words, only the authorized user can create the constraints corresponding to the master key, and the constraints will be explained below.

[0085] The Retire Grant permission is used to indicate that the user can release the relevant usage permissions of the master key in KMS. For example, after a user creates relevant usage permissions in KMS based on the Create Grant permission, the user can release (i.e., delete or cancel) the created relevant usage permissions based on the Retire Grant permission.

[0086] The Decrypt Key permission indicates that the user can view the master key and related description information of the master key (such as creation time, etc.).

[0087] Exemplarily, KMS can save information such as user identification information, master key, and permission information corresponding to the master key to establish a corresponding relationship between the above information. Exemplarily, user identification information can be used as an index of the above information, that is, KMS can find the corresponding master key and the corresponding master key permission information based on the user identification information in the subsequent process.

[0088] S502, KMS sends Key ID to the terminal.

[0089] Exemplarily, KMS sends a master key creation response message to the cloud management platform, which includes but is not limited to the Key ID and user identification information, indicating that the user's master key has been created. The master key creation completion means that the related usage permissions of the master key have also been created.

[0090] The cloud management platform receives the master key creation response message sent by KMS. The cloud management platform can identify the corresponding user based on the user identification information in the master key creation response message. Accordingly, the cloud management platform sends a master key creation response completion indication to the user (i.e. the user's parent virtual machine), which includes but is not limited to the Key ID, indicating that the master key has been created.

[0091] The Key ID is displayed on the interface (eg, CLI interface) of the terminal (eg, the parent virtual machine), and optionally, a prompt indicating that the master key creation is complete may be displayed so that the security administrator can obtain the Key ID. Optionally, the security administrator may copy the Key ID and save it locally.

[0092] Figure 6 For an exemplary flowchart of the compilation phase, please refer to Figure 6 , including but not limited to the following steps:

[0093] S601, generate an image file.

[0094] Exemplarily, the security administrator inputs image data to the terminal to instruct the terminal to generate an image file.

[0095] Exemplarily, the terminal may generate an image file based on the image data in response to a user instruction. This process may also be referred to as a compilation process, that is, the terminal compiles the image data to generate an image file. The structure of the generated image file may refer to Figure 2 , which will not be described here. The image file includes a signature value, such as PCR[0], which is used to uniquely identify the image data. It can be understood that this value is used to measure the integrity of the image file, and accordingly, the signature value is unique to the image file (i.e., the image data). Of course, if two image files have the same image data, their corresponding signature values ​​may also be the same.

[0096] S602, creating user permissions.

[0097] For example, Figure 7 As shown, after the terminal generates the image file, the image file can be sent to a designated service or module in the cloud to instruct the cloud to continue the compilation process such as encrypting the image file.

[0098] Exemplarily, before the Hypervisor compiles the image file, KMS creates user rights, and user rights belong to the permission information corresponding to the CMK. In the embodiment of the present application, user rights can be understood as constraints set for the authorized use of DataKey. That is, only when the constraints are met can the service or module be authorized to use DataKey. Among them, the use of DataKey includes but is not limited to: generating DataKey and decrypting DataKey, etc., which can be set according to actual needs and are not limited in this application.

[0099] In the embodiment of the present application, the constraints include but are not limited to: Nova service and signature value, etc. That is, only the Nova service carrying the signature value (such as PCR[0]) has the authority to generate and decrypt DataKey.

[0100] In this way, during the compilation process of the embodiment of the present application, by setting constraints, KMS can restrict the use rights of the key. In this application, only the Nova service that carries the signature information can obtain the corresponding permissions, which can ensure the security of the key and prevent it from being maliciously stolen by other illegal roles. For example, if other third-party software disguises itself as a service in the cloud and obtains the signature information in the image file. However, since it is not a Nova service, even if it carries the signature information, it cannot meet the constraints and cannot obtain the DataKey. Furthermore, since it cannot obtain the DataKey, the third-party software cannot decrypt the image file.

[0101] S603, obtaining DataKey, wherein the authorized use of DataKey is subject to user authority constraints.

[0102] For example, refer to Figure 7 After KMS creates user permissions, the Nova service can obtain the signature information from the image file saved by the Hypervisor. The Nova service can send the signature information to KMS to request authorization to generate DataKey. Based on the signature information, KMS can determine that the Nova service has the permission to generate DataKey, and authorize the Nova service to generate DataKey. That is, KMS can generate a ciphertext DataKey and feedback the generated ciphertext DataKey to the Nova service.

[0103] Next, the Nova service can send the ciphertext DataKey and signature information to KMS to request authorization to decrypt the DataKey. Based on the signature information, KMS can determine that the Nova service has the authority to decrypt the DataKey, and then authorize the Nova service to decrypt the DataKey. That is, KMS decrypts the ciphertext DataKey to obtain the plaintext DataKey. KMS feeds back the plaintext DataKey to the Nova service.

[0104] S604, compile the image file based on DataKey.

[0105] For example, please continue to refer to Figure 7 , the Nova service transmits the obtained DataKey (including ciphertext DataKey and plaintext DataKey) to the Hypervisor.

[0106] The Hypervisor can compile the image file based on the DataKey (including the ciphertext DataKey and the plaintext DataKey). The compilation process of the image file by the Hypervisor includes but is not limited to: the Hypervisor encrypts all or part of the image data in the image file based on the plaintext DataKey. The Hypervisor can write the ciphertext DataKey into the image file.

[0107] Please continue to refer to the following Figure 5 ,right Figure 6 The compilation process in the .compilation process is described in detail, including but not limited to:

[0108] S503: The security administrator inputs a compilation instruction.

[0109] Exemplarily, the security administrator can enter compilation instructions in the CLI interface, and the compilation instructions include but are not limited to: build image command, Key ID and image data. Among them, the build image command is used to instruct the running of the image compilation and construction program. All or part of the data in the image data is user data. Among them, the user data also includes all or part of the confidential user data.

[0110] In the embodiment of the present application, the security administrator can specify the confidential user data in the image data in the compilation instruction. For example, if the image data includes data 1 to N, where data 3 to N are confidential data, the security administrator can specify data 3 to N as confidential user data. In the subsequent compilation process, the Hypervisor can encrypt the confidential user data based on the confidential user data specified by the user, and other user data will not be encrypted.

[0111] Optionally, if the security administrator does not indicate confidential user data in the image data, the Hypervisor assumes that all user data in the image data are confidential user data, and all user data will be encrypted during the encryption process.

[0112] It should be noted that the embodiment of the present application is described by taking the example that all the data in the image data is input by the user. In other embodiments, the image data may include the data input by the user (i.e., user data) and part of the image data automatically generated by the Hypervisor during the compilation process, which can be set according to actual needs and is not limited in the present application.

[0113] S504, the terminal executes image file compilation.

[0114] Exemplarily, the CLI receives a compilation instruction. Based on the image building command, the CLI calls the terminal (i.e., the parent virtual machine) to run the image compilation and building program to generate an image file. The generated image file includes but is not limited to image data. The structure of the image file can be referred to Figure 2 The specific generation process of the image file can refer to the existing technical embodiments, and this application will not repeat it.

[0115] For example, Figure 2 As shown, the image file generated by the terminal includes PCR[0]. As mentioned above, this value is a unique identifier generated by the terminal based on the image data in the process of generating the image file. This value can be called a signature value or a measurement value in the embodiment of the present application. This value can be used to uniquely identify the image data, and can also be understood as a unique identifier of the image file. In other words, the PCR[0] value in each image file with different image data is different. Of course, in some instances, if the image data is the same, the corresponding PCR[0]

[0116] In a possible implementation, the steps executed by the terminal are also executed by the cloud management platform. For example, the terminal can send relevant information to the cloud management platform so that the cloud management platform generates an image file, which is not limited in this application and will not be repeated below.

[0117] S505: The terminal sends the image file to the Hypervisor.

[0118] Exemplarily, after the terminal generates the image file, it sends compilation instruction information to the cloud management platform. The compilation instruction information includes but is not limited to the image file and user identification information, and the compilation instruction information is used to instruct to compile the image file.

[0119] The cloud management platform sends the compilation instruction information to the Hypervisor to instruct the Hypervisor to compile the image file.

[0120] In the embodiment of the present application, the process of generating an image file based on the image data by the terminal can be understood as the process of compiling the image data, or the process of compiling the image file. The subsequent steps such as encrypting the image data by the Hypervisor also belong to the process of compiling the image file.

[0121] It should be noted that in an embodiment of the present application, the terminal can send information or instructions to the cloud (such as Hypervisor or Nova service) to the cloud management platform, and the cloud management platform will send the information or instructions to the corresponding module or unit in the cloud. No specific description will be given below. In other embodiments, the terminal (such as the parent virtual machine) can also directly send relevant instructions or information to the corresponding service or module in the cloud, which is not limited in this application.

[0122] S506: The terminal sends a Create Grant request to the KMS.

[0123] For example, Figure 7 As shown, as described above, after KMS creates the master key, it saves the master key permission information corresponding to the master key. The permission information is used to restrict the creation, generation, and viewing of the master key by the specified user.

[0124] Exemplarily, the terminal sends a Create Grant request to the KMS, where the request includes but is not limited to: user identification information, PCR[0] (ie, signature information or measurement information), Nova service identification, and Key ID.

[0125] Optionally, the Nova service identifier can be the Nova service name, such as nova.service.com, which can be set according to actual needs and is not limited in this application.

[0126] Exemplarily, as described above, the designated user has the authority to create relevant permissions corresponding to the master key (which may also be referred to as user permissions or constraints in the embodiments of the present application, and are not limited in the present application). That is, in the embodiments of the present application, the terminal has the authority to create relevant usage permissions corresponding to the master key. In the embodiments of the present application, the relevant usage permissions corresponding to the master key may also be referred to as user permissions or constraints, and the user permissions also belong to one of the permission information corresponding to the master key. That is, the permission information of the master key currently includes master key permission information (including creation permissions and release permissions, etc.) and user permission information (including some encryption and decryption permissions, etc.).

[0127] Accordingly, in an embodiment of the present application, the terminal may send a Create Grant request to the KMS to create the corresponding constraint. In an embodiment of the present application, the Create Grant request sent by the terminal to the KMS is used to request the creation of a constraint: only the Nova service carrying PCR[0] is authorized to have the authority to generate a data key (DataKey) and decrypt the data key. Among them, PCR[0] serves as the encryption context.

[0128] S507, KMS creates user permissions.

[0129] Exemplarily, KMS receives a Create Grant request and creates user permissions. Specifically, KMS finds the corresponding master key based on the Key ID and user identification information. KMS maintains a large number of master keys and corresponding permission information.

[0130] For example, KMS can further create corresponding user permissions based on PCR[0] (i.e., signature information or measurement information) and Nova service identifier. User permissions are as follows:

[0131]

[0132] The user permission can also be understood as a constraint condition for a specified operation. In this example, the authorization subject (i.e., granteePrincipal) is the Nova service, that is, only the Nova service can have the corresponding permission.

[0133] The specified operation optionally includes, but is not limited to: generating a Datakey (ie, GenerateDataKey in the above text) and decrypting (ie, Decrypt in the above text).

[0134] The constraints include, but are not limited to: the encrypted context content, where the encrypted context content is the PCR[0] value. The "Signature:xxx" in the above text is the specific value of PCR[0].

[0135] Exemplarily, "keyId:xxx" is used to indicate the association with the master key, that is, the user authority is associated with the master key with keyId "xxx" (xxx is the specific value of KeyID).

[0136] For example, "retiringPrincipal" is used to indicate the subject that can revoke the above permission information (also called constraint conditions). In other words, only when the Nova service carries the correct PCR[0] can it obtain the corresponding operation permission or revoke the above user permission.

[0137] That is to say, in the embodiment of the present application, the user authority is: only when the Nova service carries the correct PCR[0] can the authority to generate and decrypt DataKey be obtained.

[0138] S508: The terminal instructs Nova to obtain DataKey.

[0139] Exemplarily, the terminal sends an instruction message to Nova, which includes a KeyID for instructing Nova to obtain a DataKey, which can also be understood as instructing the Nova service to execute part of its process when compiling an image file.

[0140] S509, the Nova service obtains a Token from the STS.

[0141] Exemplarily, the Nova service sends a Token request to the STS to obtain a Token. Based on the Token request, the STS feeds back the Token to the Nova service. For specific implementation details, please refer to the existing technical embodiments, and this application does not limit them.

[0142] S510, the Nova service sends a Datakey creation request to the KMS.

[0143] For example, Figure 7 As shown, after the Hypervisor obtains the image file, it saves the image file in the specified memory space. As mentioned above, the image file includes PCR[0] (i.e., signature information or measurement information). The Nova service can obtain the PCR[0] value of the image file from the image file saved by the Hypervisor.

[0144] Exemplarily, the Nova service creates a request to Datakey, which includes but is not limited to: Nova service identifier (for example, nova.service.com), PCR[0] (i.e., signature information or measurement information), Token, KeyID, etc. The request is used to request KMS to generate and feedback the ciphertext DataKey.

[0145] Optionally, the Nova service identifier may also be included in the Token, which is not limited in this application.

[0146] Optionally, as described above, in S508, Nova has obtained the KeyID sent by the terminal.

[0147] S511, KMS creates DataKey.

[0148] Exemplarily, KMS obtains Nova service identifier, PCR[0], Token, and KeyID in response to the received Datakey creation request.

[0149] Exemplarily, KMS verifies the legitimacy of Nova service based on Token. The specific verification method can refer to the existing technology, and this application does not limit it.

[0150] If the token verification is successful, KMS can query the corresponding master key and its permission information (specifically user permissions) based on the KeyID. The permission information can be found above and will not be repeated here.

[0151] KMS finds the corresponding user permission information and can create the Nova service identifier and PCR[0] carried in the request based on Datakey to detect whether the permission information is met, which can also be understood as whether the preset constraints are met.

[0152] Specifically, when KMS detects that both the Nova service identifier and the PCR[0] value satisfy the constraints, it can be determined that the Nova service has the authority to create and decrypt DataKey, that is, the authority to authorize Nova to generate and decrypt DataKey.

[0153] KMS can determine that Nova needs to create DataKey based on the Datakey creation request. Correspondingly, KMS can generate DataKey based on the CMK corresponding to KeyID. The specific generation details can be referred to the existing technical embodiments, and this application will not repeat them.

[0154] Among them, the generated DataKey is ciphertext, which can be called encrypted DataKey or ciphertext DataKey, etc. in the embodiment of the present application, and this application does not limit it.

[0155] S512, KMS sends the encrypted DataKey to the Nova service.

[0156] For example, Figure 7 As shown in the figure, after KMS generates the ciphertext DataKey, it sends the ciphertext DataKey to the Nova service.

[0157] S513, the Nova service sends a DataKey decryption request to the KMS.

[0158] Exemplarily, after the Nova service obtains the ciphertext DataKey, it can continue to request the KMS to obtain the plaintext DataKey (also called decrypted DataKey or decryption key, which is not limited in this application). Exemplarily, the Nova service sends a DataKey decryption request to the KMS, which includes but is not limited to: Nova service identifier (for example, nova.service.com), PCR[0] (i.e., signature information or measurement information), Token, KeyID, and ciphertext DataKey, etc. The request is used to request the KMS to decrypt the ciphertext DataKey and feedback the plaintext DataKey (i.e., the decrypted DataKey).

[0159] Optionally, the Nova service identifier may also be included in the Token, which is not limited in this application.

[0160] Optionally, as described above, in S508, Nova has obtained the KeyID sent by the terminal.

[0161] S514, KMS decrypts the ciphertext DataKey.

[0162] Exemplarily, KMS obtains Nova service identification, PCR[0], Token, KeyID, ciphertext DataKey, etc. in response to the received Datakey decryption request.

[0163] Exemplarily, KMS verifies the legitimacy of Nova service based on Token. The specific verification method can refer to the existing technology, and this application does not limit it.

[0164] If the token verification is successful, KMS can query the corresponding master key and its permission information (specifically user permissions) based on the KeyID. The permission information can be found above and will not be repeated here.

[0165] KMS finds the corresponding user permission information and can create the Nova service identifier and PCR[0] carried in the request based on Datakey to detect whether the permission information is met, which can also be understood as whether the preset constraints are met.

[0166] Specifically, if KMS detects that both the Nova service identifier and the PCR[0] value satisfy the constraint conditions, it can be determined that the Nova service has the authority to create and decrypt DataKey. KMS can determine that Nova needs to decrypt the ciphertext DataKey based on the Datakey decryption request. Correspondingly, KMS can decrypt the ciphertext DataKey based on the CMK to obtain the plaintext DataKey. For specific decryption details, please refer to the existing technical embodiments, which will not be repeated in this application.

[0167] S515, KMS sends the plaintext DataKey to the Nova service.

[0168] For example, Figure 7 As shown in the figure, after KMS obtains the plaintext DataKey, it sends the plaintext DataKey to the Nova service. That is, the Nova service currently obtains the plaintext DataKey and the ciphertext DataKey.

[0169] S516: Nova service sends the encrypted DataKey and the plaintext DataKey to the Hypervisor.

[0170] For example, Figure 7 As shown, after Nova obtains the plaintext DataKey and the ciphertext DataKey, it can send the obtained plaintext DataKey and the ciphertext DataKey to the Hypervisor, so that the Hypervisor continues the subsequent compilation process.

[0171] S517, Hypervisor compiles the image file based on the plaintext DataKey and the ciphertext DataKey.

[0172] Exemplarily, the Hypervisor obtains the plaintext DataKey and the ciphertext DataKey. The Hypervisor may encrypt the image data in the image file based on the plaintext DataKey.

[0173] In the embodiment of the present application, as described above, the terminal can indicate the user data that needs to be encrypted. Optionally, if the terminal does not indicate the user data that needs to be encrypted, the Hypervisor defaults to the Ramdisk[1-N] part (which can also be understood as user data) in the image data as the user data that needs to be encrypted. Optionally, the terminal can indicate the user data that needs to be encrypted in the compilation instruction, which is not limited in the present application.

[0174] Exemplarily, the Hypervisor may encrypt all or part of the image data in the image file according to the default setting or according to the instruction of the terminal. For example, the Hypervisor encrypts the Ramdisk[1-N] part (also understood as user data) in the image data.

[0175] Exemplarily, after the Hypervisor encrypts the image file (specifically user data), it adds the ciphertext DataKey to the image file. For example, the Hypervisor can write the ciphertext DataKey to a specified location in the image file (which can also be understood as a specified field, which is not limited in this application). The specified location is a pre-agreed location so that the Nova service can read the ciphertext DataKey from the specified location. For example, in an embodiment of the present application, the Hypervisor can write the ciphertext DataKey to the image file header (for example Figure 2 In the reserved fields of the EIF Header.

[0176] S518: The Hypervisor sends the image file to the terminal.

[0177] Exemplarily, after the hypervisor obtains the image file, it sends the image file to the terminal. Optionally, the hypervisor sends the image file to the cloud management platform, which then sends it to the terminal.

[0178] The image file includes, but is not limited to: image data, PCR[0] (i.e., signature value or measurement value), ciphertext DataKey, etc. The image data includes user data encrypted with plaintext DataKey.

[0179] For example, the security administrator can transfer the image file to other tenants. The transmission method can be transmitted through the network or a mobile hard disk, etc., which is not limited in this application. Other tenants can save the image file to a terminal, a virtual environment (such as a tenant's parent virtual machine) or the cloud, etc., which is not limited in this application.

[0180] In the embodiment of the present application, since the data in the image file has been encrypted, it will not be maliciously stolen during the transmission process or when the image file is stored in an external environment (i.e., a trusted environment other than the Hypervisor, for example). For example, when a tenant wants to access the image file through the tenant's parent virtual machine, since the user data in the image file has been encrypted, the tenant cannot decrypt the user data without the plaintext DataKey. In the embodiment of the present application, the method of obtaining the plaintext DataKey is only feasible when the Nova service carries the PCR[0] information, and after the user data is decrypted in the Hypervisor, the user data of the Enclave will not be exposed to the outside due to the characteristics of the operation of the Enclave image, thereby ensuring the security of the user data in the Encalve image.

[0181] Figure 8 This is a schematic diagram of the deployment process shown as an example. Figure 8, including but not limited to the following steps:

[0182] S801, obtaining an image file.

[0183] For example, the terminal has obtained Figure 5 The image file generated by the process can be obtained by transmitting it over the network or through a mobile hard disk, etc., which is not limited in this application.

[0184] It should be noted that the operation and maintenance personnel and the security management personnel can be the same or different personnel. Figure 5 The terminals involved may be the same device or different devices, and this application does not limit this.

[0185] The operation and maintenance personnel can input deployment instructions to the terminal to instruct the terminal to execute the deployment process of the image file. The terminal can send the image file to the cloud, for example, to the Hypervisor.

[0186] S802, obtaining DataKey, wherein the authorized use of DataKey is subject to user authority constraints.

[0187] Exemplarily, the Nova service can obtain the signature information (eg, PCR[0]) and ciphertext Datakey in the image file from the Hypervisor.

[0188] The Nova service sends signature information and ciphertext DataKey to KMS to request KMS to feedback the plaintext Datakey.

[0189] For example, based on the signature information, KMS can determine that the Nova service has the authority to decrypt DataKey, and then authorize the Nova service to decrypt DataKey. That is, KMS decrypts the ciphertext DataKey to obtain the plaintext DataKey. KMS feeds back the plaintext DataKey to the Nova service.

[0190] S803, decrypt the image file based on the DataKey.

[0191] Exemplarily, the Nova service can transmit the plaintext DataKey to the Hypervisor, and the Hypervisor decrypts the encrypted user data in the image file based on the plaintext DataKey to obtain the complete, unencrypted user data. In some instances, after the Hypervisor decrypts the image file, it runs the decrypted image file to complete the deployment of the image file. The Hypervisor can feedback the running results of the image file to the terminal.

[0192] Combine the following Fig. 9The deployment process is described in detail in the deployment process diagram shown in the figure. Fig. 9 , including but not limited to the following steps:

[0193] S901, the operation and maintenance personnel instruct the terminal to run the image file.

[0194] For example, the terminal has obtained Figure 5 The image file generated by the process can be obtained by transmitting it over the network or through a mobile hard disk, etc., which is not limited in this application.

[0195] It should be noted that Fig. 9 Operation and maintenance personnel in Figure 5 The security managers in can be the same or different persons. For example, Fig. 9 The terminal in Figure 5 The terminals in the example may be the same device or different devices, which is not limited in this application.

[0196] Exemplarily, the operation and maintenance personnel may enter a running instruction in the CLI to instruct the running of the image file. The running instruction may include, but is not limited to, the storage address and KeyID of the image file.

[0197] For example, the KeyID obtained by the operation and maintenance personnel is Figure 3 The KeyID generated in the process may be obtained by methods including but not limited to manual recording or network transmission, etc. This application does not limit this.

[0198] S902: The terminal sends deployment instruction information to the Hypervisor.

[0199] Exemplarily, the terminal extracts the image file from the storage address of the image file in response to the received running instruction. The terminal sends deployment instruction information to the Hypervisor, the instruction information includes but is not limited to the image file, and the instruction information is used to instruct the deployment of the image file in the Hypervisor.

[0200] S903, the terminal instructs the Nova service to obtain DataKey.

[0201] Exemplarily, the terminal sends an instruction message to the Nova service, the instruction message includes a KeyID, which is used to instruct Nova to obtain a DataKey, which can also be understood as instructing the Nova service to execute part of its process when deploying the image file.

[0202] S904, the Nova service obtains a Token from the STS.

[0203] Exemplarily, the Nova service sends a Token request to the STS to obtain a Token. Based on the Token request, the STS feeds back the Token to the Nova service. For specific implementation details, please refer to the existing technical embodiments, and this application does not limit them.

[0204] S905: Nova service sends a Datakey decryption request to KMS.

[0205] Exemplarily, the Nova service sends a DataKey decryption request to the KMS. The request includes, but is not limited to: the Nova service identifier (for example, nova.service.com), PCR[0] (i.e., signature information or measurement value), Token, KeyID, and ciphertext DataKey, etc. The request is used to request the KMS to decrypt the ciphertext DataKey and feedback the plaintext DataKey.

[0206] As described above, the Hypervisor has obtained the image file. The image file includes PCR[0] and ciphertext DataKey. The Nova service can obtain PCR[0] and ciphertext DataKey from the image file cached by the Hypervisor.

[0207] And, as mentioned above, Nova has obtained the KeyID sent by the terminal.

[0208] S906, KMS decrypts the ciphertext DataKey.

[0209] Exemplarily, KMS obtains Nova service identification, PCR[0], Token, KeyID, ciphertext DataKey, etc. in response to the received Datakey decryption request.

[0210] Exemplarily, KMS verifies the legitimacy of Nova service based on Token. The specific verification method can refer to the existing technology, and this application does not limit it.

[0211] If the token verification is successful, KMS can find the corresponding master key and corresponding permission information (including master key permission information and user permission information) based on KeyID. The permission information can be found above and will not be repeated here.

[0212] KMS finds the corresponding user permission information and can create the Nova service identifier and PCR[0] carried in the request based on Datakey to detect whether the permission information is met, which can also be understood as whether the preset constraints are met.

[0213] Specifically, if KMS detects that both the Nova service identifier and the PCR[0] value satisfy the constraint conditions, it can be determined that the Nova service has the authority to create and decrypt DataKey. KMS can determine that Nova needs to decrypt the ciphertext DataKey based on the Datakey decryption request. Correspondingly, KMS can decrypt the ciphertext DataKey based on the CMK to obtain the plaintext DataKey. For specific decryption details, please refer to the existing technical embodiments, which will not be repeated in this application.

[0214] S907, KMS sends the plaintext DataKey to the Nova service.

[0215] Exemplarily, after obtaining the plaintext DataKey, KMS sends the plaintext DataKey to the Nova service.

[0216] S908: Nova service sends plaintext DataKey to Hypervisor.

[0217] S909, Hypervisor decrypts the image file based on the plaintext DataKey.

[0218] Exemplarily, the Nova service sends the obtained plaintext DataKey to the Hypervisor. The Hypervisor can decrypt the encrypted user data in the image file based on the plaintext DataKey to obtain the decrypted user data.

[0219] Optionally, the step of the Hypervisor decrypting the image file can be considered as the deployment process of the image file. That is, when the decryption is completed, the deployment is completed. Of course, after the Hypervisor decrypts the image file, it can also perform other processing to complete the deployment of the image file, which is not limited in this application.

[0220] Optionally, the Hypervisor may feed back the running result of the Enclave image file to the terminal, and the terminal may display the running result.

[0221] In one possible implementation, in order to further improve the security of the image data in the Enclave image file, the constraints set by KMS can also include more constraints. For example, the identification information of the Qidian card corresponding to the cloud service to which the Nova service belongs can be used as one of the constraints. It can be set according to actual needs and is not limited in this application.

[0222] Exemplarily, the present application also provides a cloud-based image deployment device, such as Fig.10 As shown, the device includes but is not limited to:

[0223] The receiving module 1001 is used to receive a first request message sent by a first client, wherein the first request message includes an image file to be deployed, and the first request message is used to instruct to decrypt the image file to be deployed, wherein the image file to be deployed includes signature information, a first key, and image data encrypted using a second key. The signature information is used to uniquely identify the image data, and the first key and the second key are an encryption and decryption key pair.

[0224] The operation and maintenance management module 1002 is used to obtain the signature information and the first key. Based on the signature information and the first key, a second key is obtained by decrypting the first key after the signature information is identified as having decryption authority.

[0225] The virtual machine monitoring module 1003 is used to decrypt the image file to be deployed based on the second key to obtain decrypted image data.

[0226] Among them, the receiving module 1001, the operation and maintenance management module 1002 and the virtual machine monitoring module 1003 can all be implemented by software, or can be implemented by hardware. Exemplarily, the operation and maintenance management module 1002 is taken as an example to introduce the implementation of the operation and maintenance management module 1002. Similarly, the implementation of the receiving module 1001 and the virtual machine monitoring module 1003 can refer to the implementation of the operation and maintenance management module 1002.

[0227] As an example of a software functional unit, the operation and maintenance management module 1002 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the operation and maintenance management module 1002 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple data centers with close geographical locations. Among them, usually a region may include multiple AZs.

[0228] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0229] As an example of a hardware functional unit, the operation and maintenance management module 1002 may include at least one computing device, such as a server, etc. Alternatively, the operation and maintenance management module 1002 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0230] The multiple computing devices included in the operation and maintenance management module 1002 can be distributed in the same region or in different regions. The multiple computing devices included in the operation and maintenance management module 1002 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the operation and maintenance management module 1002 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0231] It should be noted that, in other embodiments, the operation and maintenance management module 1002 can be used to execute any step in the image file deployment method, the receiving module 1001 can be used to execute any step in the image file deployment method, and the virtual machine monitoring module 1003 can be used to execute any step in the image file deployment method. The steps that the receiving module 1001, the operation and maintenance management module 1002 and the virtual machine monitoring module 1003 are responsible for implementing can be specified as needed. The receiving module 1001, the operation and maintenance management module 1002 and the virtual machine monitoring module 1003 respectively implement different steps in the image file deployment method to realize all the functions of the image file deployment device.

[0232] This application also provides a cloud-based image deployment system, such as Fig.11 As shown, including:

[0233] A cloud management platform is used to: receive deployment request information sent by a first client, the deployment request information includes an image file to be deployed, the first request information is used to instruct to decrypt the image file to be deployed, the image file to be deployed includes signature information, a first key and image data encrypted using a second key; wherein the signature information is used to uniquely identify the image data, and the first key and the second key are an encryption and decryption key pair; and send the deployment request information to an operation and maintenance management service.

[0234] The operation and maintenance management service is used to: in response to the deployment request information, send a first request information to the KMS, the first request information includes signature information and a first key, and the first request information is used to request a second key from the KMS.

[0235] KMS is used to: after identifying that the operation and maintenance management service has the decryption authority based on the signature information, decrypt the first key to obtain the second key; and send the second key to the operation and maintenance management service.

[0236] The operation and maintenance management service is also used to: receive the second key; and send the second key to the HV.

[0237] HV is used to: decrypt the image file to be deployed based on the second key to obtain decrypted image data.

[0238] The cloud management platform, operation and maintenance management service, KMS and HV can all be implemented by software or hardware. As an example, the implementation of the operation and maintenance management service is described below. Similarly, the implementation of other devices can refer to the implementation of the operation and maintenance management service.

[0239] As an example of a software functional unit, the operation and maintenance management service may include code running on a computing instance. Among them, the computing instance may be at least one of the computing devices such as a physical host (computing device), a virtual machine, and a container. Furthermore, the above-mentioned computing device may be one or more. For example, the operation and maintenance management service may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application can be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code can be distributed in the same AZ or in different AZs, and each AZ includes a data center or multiple data centers with close geographical locations. Among them, usually a region can include multiple AZs.

[0240] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same VPC or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway must be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0241] As an example of a hardware functional unit, the operation and maintenance management service may include at least one computing device, such as a server, etc. Alternatively, the operation and maintenance management service may also be a device implemented by ASIC or PLD, etc. The PLD may be implemented by CPLD, FPGA, GAL or any combination thereof.

[0242] The multiple computing devices included in the operation and maintenance management service can be distributed in the same region or in different regions. The multiple computing devices included in the operation and maintenance management service can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the operation and maintenance management service can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0243] The present application also provides a computing device 1200. Fig.12 As shown, the computing device 1200 includes: a bus 1202, a processor 1204, a memory 1206, and a communication interface 1208. The processor 1204, the memory 1206, and the communication interface 1208 communicate through the bus 1202. The computing device 1200 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 1200.

[0244] The bus 1202 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 The bus 1202 may include a path for transmitting information between various components of the computing device 1200 (eg, the memory 1206, the processor 1204, and the communication interface 1208).

[0245] The processor 1204 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0246] The memory 1206 may include a volatile memory, such as a random access memory (RAM). The processor 1204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0247] The memory 1206 stores executable program codes, and the processor 1204 executes the executable program codes to respectively implement the functions of the aforementioned receiving module, operation and maintenance management module, and virtual machine monitoring module, thereby implementing the image deployment method. That is, the memory 1206 stores instructions for executing the image deployment method.

[0248] The communication interface 1208 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1200 and other devices or communication networks.

[0249] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0250] like Fig.13 As shown, the computing device cluster includes at least one computing device 1300. The memory 1306 in one or more computing devices 1300 in the computing device cluster may store the same instructions for executing the image deployment method.

[0251] In some possible implementations, the memory 1306 of one or more computing devices 1300 in the computing device cluster may also store partial instructions for executing the image deployment method. In other words, the combination of one or more computing devices 1300 may jointly execute instructions for executing the image deployment method.

[0252] It should be noted that the memory 1306 in different computing devices 1300 in the computing device cluster can store different instructions, which are respectively used to execute part of the functions of the operation and maintenance management service. That is, the instructions stored in the memory 1306 in different computing devices 1300 can implement the functions of one or more modules among the receiving module, the operation and maintenance management module and the virtual machine monitoring module.

[0253] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.14 A possible implementation is shown. Fig.14 As shown, two computing devices 1400A and 1400B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1406 in the computing device 1400A stores instructions for executing the functions of the operation and maintenance management module. At the same time, the memory 1406 in the computing device 1400B stores instructions for executing the functions of the receiving module and the virtual machine monitoring module.

[0254] It should be understood that Fig.14 The functionality of the computing device 1400A shown in FIG. 1400A may also be implemented by multiple computing devices 1400. Similarly, the functionality of the computing device 1400B may also be implemented by multiple computing devices 1400.

[0255] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to that of Fig.13 and Fig.14 The connection mode of the computing device cluster is different in that the memory 1406 in one or more computing devices 1400 in the computing device cluster may store the same instructions for executing the image deployment method.

[0256] In some possible implementations, the memory 1406 of one or more computing devices 1400 in the computing device cluster may also store partial instructions for executing the image deployment method. In other words, the combination of one or more computing devices 1400 may jointly execute instructions for executing the image deployment method.

[0257] It should be noted that the memory 1406 in different computing devices 1400 in the computing device cluster can store different instructions for executing part of the functions of the image deployment system. That is, the instructions stored in the memory 1406 in different computing devices 1400 can implement the functions of one or more of the cloud management platform, operation and maintenance management service, HV and KMS devices.

[0258] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the image deployment method.

[0259] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the image deployment method.

[0260] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A cloud-based image deployment method, characterized in that: include: Receive first request information sent by a first client, the first request information including an image file to be deployed, the first request information being used to instruct to decrypt the image file to be deployed, the image file to be deployed including signature information, a first key, and image data encrypted using a second key; wherein the signature information is used to uniquely identify the image data, and the first key and the second key are an encryption and decryption key pair; Obtaining the signature information and the first key; Based on the signature information and the first key, a second key is obtained by decrypting the first key after the signature information is identified as having decryption authority; Based on the second key, the image file to be deployed is decrypted to obtain decrypted image data.

2. The method according to claim 1, characterized in that Before receiving the first request information sent by the first client, the method further includes: receiving a second request message sent by a second client, wherein the second request message includes an image file to be compiled, the image file to be compiled includes the signature information and the image data, and the second request message is used to instruct to compile the image file to be compiled; Based on the signature information, the first key and the second key are obtained; wherein the first key is generated after the signature information is identified as having the key generation authority, and the second key is obtained after the first key is decrypted after the signature information is determined as having the decryption authority; Encrypting the mirror data based on the second key; Obtaining the image file to be deployed based on the encrypted image data, the first key and the signature information; Send the image file to be deployed to the second client.

3. The method according to claim 1, characterized in that The image file to be deployed of the first client is obtained from the second client.

4. The method according to any one of claims 1 to 3, characterized in that: All or part of the mirrored data is encrypted using the second key.

5. The method according to any one of claims 1 to 4, characterized in that: The image file to be deployed is an enclave image file.

6. The method according to any one of claims 1 to 5, characterized in that: The image file to be deployed includes any one of a public image, a private image, a shared image, and a market image.

7. A cloud-based image deployment device, characterized in that: include: A receiving module, configured to receive a first request message sent by a first client, wherein the first request message includes an image file to be deployed, and the first request message is used to instruct to decrypt the image file to be deployed, wherein the image file to be deployed includes signature information, a first key, and image data encrypted using a second key; wherein the signature information is used to uniquely identify the image data, and the first key and the second key are an encryption and decryption key pair; An operation and maintenance management module, used to obtain the signature information and the first key; The operation and maintenance management module is used to obtain a second key based on the signature information and the first key; wherein the second key is obtained by decrypting the first key after the signature information is identified as having decryption authority; The virtual machine monitoring module is used to decrypt the image file to be deployed based on the second key to obtain decrypted image data.

8. The device according to claim 7, characterized in that The receiving module is further used to receive a second request information sent by a second client, wherein the second request information includes an image file to be compiled, the image file to be compiled includes the signature information and the image data, and the second request information is used to instruct to compile the image file to be compiled; The operation and maintenance management module is further configured to obtain the first key and the second key based on the signature information; wherein the first key is generated after the signature information identifies the user with the key generation permission, and the second key is obtained by decrypting the first key after the signature information determines the user with the decryption permission; The virtual machine monitoring module is further used to encrypt the image data based on the second key; The virtual machine monitoring module is further used to obtain the image file to be deployed based on the encrypted image data, the first key and the signature information; The virtual machine monitoring module is further used to send the image file to be deployed to the second client.

9. The device according to claim 7, characterized in that The image file to be deployed of the first client is obtained from the second client.

10. The device according to any one of claims 7 to 9, characterized in that All or part of the mirrored data is encrypted using the second key.

11. The device according to any one of claims 7 to 10, characterized in that The image file to be deployed is an enclave image file.

12. The device according to any one of claims 7 to 11, characterized in that The image file to be deployed includes any one of a public image, a private image, a shared image, and a market image.

13. A cloud-based image deployment system, characterized in that: The system comprises: Cloud management platform for: Receive deployment request information sent by a first client, the deployment request information including an image file to be deployed, the first request information is used to instruct to decrypt the image file to be deployed, the image file to be deployed includes signature information, a first key, and image data encrypted using a second key; wherein the signature information is used to uniquely identify the image data, and the first key and the second key are an encryption and decryption key pair; Sending the deployment request information to the operation and maintenance management service; The operation and maintenance management service is used to: In response to the deployment request information, sending a first request information to a key management service (KMS), wherein the first request information includes the signature information and the first key, and the first request information is used to request the second key from the KMS; The KMS is used to: After identifying that the operation and maintenance management service has decryption authority based on the signature information, decrypt the first key to obtain the second key; Sending the second key to the operation and maintenance management service; The operation and maintenance management service is used to: receiving the second key; Sending the second key to a virtual monitoring service (Hypervisor, HV); The HV is used to: Based on the second key, the image file to be deployed is decrypted to obtain decrypted image data.

14. The system according to claim 13, characterized in that The cloud management platform is also used for: receiving a compilation request message sent by a second client, wherein the compilation request message includes an image file to be compiled, the image file to be compiled includes the signature information and the image data, and the second request message is used to instruct to compile the image file to be compiled; Sending the compilation request information to the operation and maintenance management module; The operation and maintenance management module is also used for: In response to the compile request information, send a second request information to the KMS, where the second request information includes the signature information, and the second request information is used to request the first key and the second key from the KMS; The KMS is also used to: In response to the second request information, identifying that the operation and maintenance management service has the authority to generate a key based on the signature information, and generating the first key; After determining that the operation and maintenance management service has decryption authority based on the signature information, decrypt the first key to obtain the second key; Sending the first key and the second key to the operation and maintenance management module; The operation and maintenance management service is also used for: Outputting the received first key and second key to the HV; The HV is also used for: Encrypting the mirror data based on the second key; Obtaining the image file to be deployed based on the encrypted image data, the first key and the signature information; Send the image file to be deployed to the second client.

15. The system according to claim 13, characterized in that The image file to be deployed of the first client is obtained from the second client.

16. The system according to any one of claims 13 to 15, characterized in that All or part of the mirrored data is encrypted using the second key.

17. The system according to any one of claims 13 to 16, characterized in that: The image file to be deployed is an enclave image file.

18. The system according to any one of claims 13 to 17, characterized in that The image file to be deployed includes any one of a public image, a private image, a shared image, and a market image.

19. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 6.

20. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 6.

21. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Deployment method of gateway system and related equipment

    CN121262079A