WO2014127668A1 - 虚拟机安全组的配置方法及装置 - Google Patents

虚拟机安全组的配置方法及装置 Download PDF

Info

Publication number
WO2014127668A1
WO2014127668A1 PCT/CN2013/089864 CN2013089864W WO2014127668A1 WO 2014127668 A1 WO2014127668 A1 WO 2014127668A1 CN 2013089864 W CN2013089864 W CN 2013089864W WO 2014127668 A1 WO2014127668 A1 WO 2014127668A1
Authority
WO
WIPO (PCT)
Prior art keywords
security group
virtual machine
security
group
specified
Prior art date
Application number
PCT/CN2013/089864
Other languages
English (en)
French (fr)
Inventor
楚俊生
顾忠禹
陶源
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2014127668A1 publication Critical patent/WO2014127668A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Definitions

  • BACKGROUND Virtualization technology is the foundation of cloud service platform construction. Virtualization technology refers to dividing a physical resource into multiple logical partitions on a physical server through a virtualization management software Hypervisor. Each logical partition is isolated from each other and becomes an independent virtual machine. For operating systems and applications, virtual machines are no different from physical servers, and they can share the resources of the same physical server.
  • a security group is an access control rule that controls the flow of data into and out of a group of virtual machines. It also refers to virtual machines that meet these rules.
  • the virtual machines that the user applies for are grouped, and each group of virtual machines has their own data flow access control rules, and only the access control configured by the virtual unit is met.
  • the regular data stream is allowed to enter the virtual machine group, and other data streams will be prohibited from being transferred to the virtual machine group.
  • the data flow sent by the virtual machine is also controlled according to the configured access rules, that is, only the outgoing access control rules configured by the virtual machine are met in the data flow sent by the virtual machine in the virtual machine group.
  • the data stream is allowed to forward out the virtual unit, and other data streams will be prohibited from being forwarded out of the virtual unit.
  • FIG. 1 is a schematic diagram of a model of a security group according to the related art.
  • the model of the security group includes a security group manager 101, which is used to manage security groups of users, including operations such as creating, updating, querying, and deleting security groups initiated by users, and managing security group rules.
  • the request information is processed;
  • the configuration information 102 includes the user's security group and its rule configuration information;
  • the physical server 103 provides the virtual machine through the virtualization management software Hypervisor;
  • the virtual switch 104 that is, the physical network card is virtualized and is the virtual machine inside the physical host.
  • the virtual machine 105 is a virtualized resource entity encapsulating a CPU, a memory, a local disk, and a network
  • the security group executor 106 that is, an entity executing a security policy for a virtual machine belonging to the security group in the host
  • the storage device 107 is a location where the user imports the configured security group and its rules.
  • 2 is a schematic structural view of a security group according to the related art. As shown in FIG. 2, the structure of the security group includes: a security group manager 201, whose specific functions are as described by the security group manager 101 in FIG. 1; configuration information 202, whose specific function is as shown in FIG.
  • the virtualization platform 203 is a virtual machine resource service management platform, and the security group function is implemented on the virtualization platform.
  • the security group 210 is a user-created access control for a group of virtual machines of the user. Policy; rule set 211, describing rules in security groups, rule packages The entry rule of the data packet and the issuance rule of the data packet; the virtual machine 212 refers to the virtualization server that the user applies for belonging to a security group.
  • Figure 3 is a network model diagram of a security group according to the related art. As shown in FIG. 3, the network model of the security group includes: an external network 301, which may be an Internet or other private network, the external network may access a virtual machine in the internal network; the internal network 302, that is, in FIG.
  • the network constructed on the basis of the virtualization platform 203; the security group manager 303, that is, the security group manager 101 in FIG. 1; the virtual machine 304, that is, the virtual machine 212 in FIG. 2, the virtual machine may belong to multiple security groups
  • the configuration information 305 has a specific function as described in the configuration information 102 in FIG. 1 ; the security group 306 has a specific function, that is, the description of the security group 210 in FIG. 2, and the security group may include multiple virtual machines.
  • 4 is a flow chart of configuring a default security group when creating a virtual machine according to the related art. As shown in Figure 4, the process includes the following steps:
  • the virtualization platform creates a default security group for the user when the user manages.
  • the default security group does not contain any rules, that is, the default security group allows all outgoing network flows, blocks all incoming network flows, and allows virtual machines within the security group to access each other.
  • S402. The user initiates a virtual machine creation request to the virtualization platform, where the creation request does not specify any security group for the virtual machine.
  • the security group manager of the virtualization platform specifies a default security group for the virtual machine.
  • the virtualization platform returns a virtual machine creation completion response to the user, where the ID of the created virtual machine and the default security group identifier are carried.
  • the user can modify the rules in the default security group. If the user adds an egress rule, the network flow except the egress rule is prohibited.
  • the security group executor controls the network flow of the default security group according to the rules of the security group.
  • FIG. 5 is a flow chart of configuring a specified security group when creating a virtual machine according to the related art. As shown in Figure 5, the process includes the following steps:
  • S501 Before creating a virtual machine, the user first creates a security group to which the virtual machine belongs and its rules.
  • S502 The user initiates a virtual machine creation request to the virtualization platform, where the security group identifier (which is assumed to be security group 1 in this embodiment) is carried.
  • the security group manager of the virtualization platform updates the configuration information of the security group 1, that is, adds the virtual machine belonging to the security group.
  • S504. Load the security group rule to the security group executor of the host where the virtual machine is located.
  • the virtualization platform returns a virtual machine creation completion response to the user, where the ID of the created virtual machine and the security group 1 are carried.
  • the user can modify the rules in security group 1.
  • the security group executor controls the network flow of the security group according to the rules of the security group. S508.
  • the security group executor distributes the network flow that meets the security group rule.
  • the current virtualization platform provides security group functions for virtual units that users apply for, but current virtualization platforms require users to configure security groups first, then bind to security groups when creating virtual machines, and throughout the virtual machine. During the lifetime, the relationship between the virtual machine and the security group cannot be modified. Moreover, the current security group can generally support up to hundreds of rules. If the user creates a similar security group, it is necessary to input one input to the security group rule. This is obviously inconvenient. The rapid creation of security groups causes these problems because the currently configured security groups are weak.
  • the following functions are lacking: (1) binding and unbinding functions between security groups and virtual machines; (2) security groups and The update function of the virtual machine; (3) the import and export functions of the security group, etc., and these reasons also make the current virtualization platform unable to provide users with flexible security group operations, resulting in users not being able to flexibly virtualize according to the needs of the application service.
  • the machine and the security group are processed accordingly.
  • the process of creating a security group for a user in the related art is complicated, the relationship between the virtual machine and the security group cannot be modified, and the problem that the user cannot flexibly handle the virtual machine and the security group according to the requirements of the application service has not been effectively solved. Program.
  • the present invention provides a method and apparatus for configuring a virtual machine security group to address at least the above problems.
  • a method for configuring a virtual machine security group including: when receiving an operation request for binding, updating, or unbinding a virtual machine and a security group, the virtualization platform pairs the virtual machine And The entire group is bound, updated, or unbound.
  • the virtualization platform imports and exports the specified security group.
  • binding the virtual machine to the security group refers to adding the virtual machine to the security group.
  • updating the virtual machine and the security group refers to migrating the virtual machine from one security group that has been added to another security group.
  • unbinding the virtual machine and the security group means removing the virtual machine from the security group that has been added to the security group.
  • the method further includes: unbinding the virtualized platform if the unbound virtual machine is no longer associated with another security group. The subsequent virtual machine is placed in the default security group.
  • the binding, updating or unbinding of the virtual machine and the security group is performed in a state where the virtual machine has been created and is not running, or in a state where the virtual machine has been created and has been running.
  • the virtual machine can belong to multiple security groups at the same time, and the security group can include multiple virtual machines at the same time.
  • the virtual machine and the security group are bound, updated, or unbound
  • the virtual machine can be simultaneously performed for one or more security groups to which the virtual machine belongs.
  • the virtual machine and the security group are bound, updated, or unbound
  • the virtual machine can be simultaneously performed for one or more virtual machines to which the security group belongs.
  • the creation time of the security group and the creation time of the virtual machine are not in order.
  • the virtual machine is in a stopped, running or suspended state.
  • the security group rule corresponding to the virtual machine takes effect immediately.
  • the ingress traffic of the virtual machine can enter only when the ingress rules of all security groups are met.
  • the egress traffic of the virtual machine can only be sent when the egress rules of all security groups are met.
  • the virtualization platform stores the rules of the specified security group and the specified security group in the specified path.
  • a device for configuring a virtual machine security group including: a first processing module, configured to receive an operation request for binding, updating, or unbinding a virtual machine and a security group
  • the second processing module is configured to import and export the specified security group when receiving an operation request for importing and exporting the specified security group.
  • binding the virtual machine to the security group refers to adding the virtual machine to the security group.
  • updating the virtual machine and the security group refers to migrating the virtual machine from one security group that has been added to another security group.
  • unbinding the virtual machine and the security group means removing the virtual machine from the security group that has been added to the security group.
  • the apparatus further includes: placing the module, configured to put the unbound virtual machine into the default security group if the unbound virtual machine is no longer associated with another security group .
  • the binding, updating or unbinding of the virtual machine and the security group is performed in a state where the virtual machine has been created and is not running, or in a state where the virtual machine has been created and has been running.
  • the virtual machine can belong to multiple security groups at the same time, and the security group can include multiple virtual machines at the same time.
  • the ingress traffic of the virtual machine can enter only when the ingress rules of all security groups are met.
  • the egress traffic of the virtual machine can only be sent when the egress rules of all security groups are met.
  • the second processing module comprises: a storage unit, configured to store the rules of the specified security group and the specified security group in the specified path.
  • the second processing module comprises: a creating unit, configured to create a new security group according to the specified path according to the name and description information of the specified security group; and the allocation unit, configured to assign a security group identifier to the new security group ( ID).
  • the invention adopts the method of increasing the binding, updating and unbinding functions of the security group and the virtual machine, and increasing the import and export functions of the security group, thereby solving the complicated process of creating a security group by the user, and the virtual machine and the security group.
  • the relationship cannot be modified and the user cannot flexibly handle the virtual machine and the security group according to the requirements of the application service, thereby achieving the effect that the user can flexibly configure the virtual machine and the security group according to the requirements of the application service.
  • FIG. 1 is a schematic diagram of a security group according to the related art
  • FIG. 2 is a schematic diagram of a security group according to the related art
  • FIG. 3 is a network model diagram of a security group according to the related art
  • FIG. 5 is a flowchart of configuring a specified security group when creating a virtual machine according to the related art
  • FIG. 11 is a diagram of a virtual machine after creation according to a preferred embodiment of the present invention A flowchart for unbinding a last user-created security group;
  • FIG. 12 is a flowchart of a security group export according to a preferred embodiment of the present invention;
  • Security group introduced diagram of a preferred embodiment of the invention;
  • 14 is a structural block diagram of a configuration apparatus of a virtual machine security group according to an embodiment of the present invention;
  • FIG. 15 is a structural block diagram of a configuration apparatus of a virtual machine security group according to a preferred embodiment of the present invention.
  • FIG. 6 is a flowchart of a method for configuring a virtual machine security group according to an embodiment of the present invention.
  • the method mainly includes the following steps (step S602-step S604): Step S602, when receiving a virtual machine and security When a group makes an operation request for binding, updating, or unbinding, the virtualization platform binds, updates, or unbinds the virtual machine and the security group.
  • Step S604 When receiving an operation request for importing and exporting the specified security group, the virtualization platform imports and exports the specified security group.
  • binding a virtual machine to a security group means adding the virtual machine to the security group.
  • both virtual machines and security groups can be created.
  • updating the virtual machine and the security group means that the virtual machine (for example, the virtual machine that has been created) is migrated from one security group that has been added to another security group.
  • debinding the virtual machine and the security group means that the virtual machine (for example, the virtual machine that has been created) is removed from the security group that has been added.
  • the method further includes: if the unbound virtual machine is no longer associated with another security group, the virtualization platform will The unbound virtual machine is placed in the default security group (which can be the current user).
  • the binding, updating, or unbinding of the virtual machine and the security group is performed in a state where the virtual machine has been created and is not running, or in a state where the virtual machine has been created and has been running.
  • the virtual machine can belong to multiple security groups at the same time, and the security group can include multiple virtual machines at the same time.
  • the virtual machine and the security group when the virtual machine and the security group are bound, updated, or unbound, the virtual machine can be simultaneously performed for one or more security groups to which the virtual machine belongs. In this embodiment, when the virtual machine and the security group are bound, updated, or unbound, the virtual machine can be simultaneously performed for one or more virtual machines to which the security group belongs. In this embodiment, the creation time of the security group and the creation time of the virtual machine are not in sequential order. In this embodiment, during the process of binding, updating, or unbinding the virtual machine and the security group by the virtualization platform, the virtual machine is in a stopped, running, or suspended state. In this embodiment, after the virtualization platform completes binding, updating, or unbinding the virtual machine and the security group, the security group rule corresponding to the virtual machine takes effect immediately.
  • the ingress traffic of the virtual machine can enter only when the ingress rules of all security groups are met.
  • the egress flow of the virtual machine only meets the egress rules of all security groups. Can be issued.
  • the virtualization platform when exporting the specified security group, stores the rules of the specified security group and the specified security group in the specified path.
  • the virtualization platform when importing the specified security group, creates a new security group according to the specified path, according to the name and description information of the specified security group, and assigns a security group identifier to the new security group. (ID).
  • FIG. 7 is a flowchart of creating a virtual machine security group according to a preferred embodiment of the present invention.
  • the process includes the following steps (step S702-step S706): Step S702, the user creates a virtual machine and creates from the virtual machine. Select the security group to which the virtual machine belongs in the security group; if not, the created virtual machine belongs to the user's default security group.
  • Step S704 After the virtual machine is created, the user can bind, unbind, or unbind the virtual machine to another security group according to the requirements of the application service.
  • FIG. 7 is a flowchart of creating a virtual machine security group according to a preferred embodiment of the present invention.
  • the process includes the following steps (step S702-step S706): Step S702, the user creates a virtual machine and creates from the virtual machine. Select the security group to which the virtual
  • Step S802 the user creates a virtual machine, and the virtualization platform creates a default security group for the user.
  • Step S804 the user creates a security group and its rules (the user creates a security group and creates a virtual machine without a sequence relationship requirement).
  • Step S806 The user initiates a security group and virtual machine binding request, where the created security group ID and the created virtual machine ID are carried.
  • Step S808 The security group manager determines the validity of the security group binding request, for example, determining whether the security group exists according to the security group ID, determining whether the virtual machine exists according to the virtual machine ID, and whether the virtual machine and the security group are bound. If the condition is met, the Security Group Manager updates the security group configuration information. Step S810, the security group manager notifies the security group executor responsible for the virtual machine network flow access control, and loads the rules of the security group. Step S812, the security group manager returns a security group and the virtual machine binding success response to the user. Step S814, the security group executor controls the network flow of the security group according to the rules of the security group. Step S816, the security group executor distributes the network flow that satisfies the security group rule.
  • Step S902 a user creates a security group and its rules.
  • Step S904 the user creates a virtual machine, and sets the virtual machine to belong to security group 1.
  • Step S906 the security group executor controls the network flow of the security group according to the rules of the security group.
  • Step S908 the security group executor distributes the network flow that satisfies the security group rule.
  • step S902 and step S908 are preset steps, that is, the virtual machine first belongs to security group 1, and under the security group 1, the network flow can be normally controlled, and then updated to the security group 2.
  • Step S910 The user initiates a security group and virtual machine update request, where the virtual machine ID, the source security group 1, and the security group 2 to be migrated are carried.
  • Step S912 The security group manager determines the validity of the security group update request, for example, whether the source security group and the target security group exist, whether the virtual machine to be migrated exists, and whether the virtual machine and the source security group are bound.
  • the security group manager updates the security group configuration information, that is, the relationship between the unbound virtual machine and the source security group, and the relationship with the target security group.
  • Step S914 the security group manager notifies the security group executor responsible for the virtual machine network flow access control, and updates the security group rule.
  • Step S916 the security group manager returns a virtual machine security group update success response to the user.
  • Step S918, the security group executor controls the network flow of the security group according to the rules of the security group.
  • Step S920, the security group executor distributes the network flow that satisfies the security group rule.
  • FIG. 10 is a flowchart of unbinding a user-created security group after a virtual machine is created according to a preferred embodiment of the present invention.
  • the process includes the following steps (step S1002 - step S1020): Step S1002, user Create Security Group 1 and Security Group 2 and their entry and/or exit rules.
  • step S1004 the user creates a virtual machine, and the virtual machine is bound to security group 1 and security group 2 (the user creates a security group and creates a virtual machine without a sequence relationship requirement).
  • step S1006 The security group executor controls the network flow of the security group according to the rules of the security group 1 and the security group 2.
  • Step S1008 the security group executor distributes the network flow that satisfies the security group rule.
  • step S1002 and step S1008 are preset steps, that is, the virtual machine first belongs to security group 1 and security, and the network flow is controlled by security group 1 and security, and then the security group 2 is unbound.
  • Step S1010 The user initiates a debinding request between the security group and the virtual machine, where the created virtual machine ID and the security group 2 to be unbound are carried.
  • the security group manager determines the validity of the security group binding request, for example, whether the security group 2 exists, whether the virtual machine exists, and whether the virtual machine and the security group 2 are bound. If the condition is met, the Security Group Manager updates the security group configuration information.
  • Step S1014 the security group manager notifies the security group executor responsible for the virtual machine network flow access control, and updates the rules of the security group.
  • step S1016 the security group manager returns a security group and the virtual machine unbinding success response to the user.
  • Step S1018 The security group executor controls the network flow of the security group according to the rules of the security group.
  • Step S1020 The security group executor distributes the network flow that satisfies the security group rule.
  • FIG. 11 is a flowchart of unbinding the security group created by the last user after the virtual machine is created according to a preferred embodiment of the present invention. As shown in FIG. 11, the process includes the following steps (step S1102-step S1104): Step S1102, The user creates security group 1 and its rules.
  • Step S1104 The user creates a virtual machine, and the virtual machine is bound to the security group 1 (the user creates a security group and creates a virtual machine without a sequence relationship requirement).
  • Step S1106 The security group executor controls the network flow of the security group according to the rules of the security group 1.
  • Step S1108 The security group executor distributes the network flow that satisfies the security group rule. It should be noted that step S1102 and step S1108 are preset steps, that is, the virtual machine is currently only associated with the last user-defined security group, and then the security group is unbound.
  • Step S1110 The user initiates a debinding request between the security group and the virtual machine, where the created virtual machine ID and the security group 1 to be unbound are carried.
  • the security group manager determines the validity of the security group binding request, for example, whether the security group 1 exists, whether the virtual machine exists, and whether the virtual machine and the security group 1 are bound. If the condition is met, the security group manager updates the security group configuration information, that is, unbinds security group 1, and then joins the virtual machine to the user's default security group.
  • Step S1114 The security group manager notifies the security group executor responsible for the virtual machine network flow access control, and the rule for updating the security group is the rule of the user default security group.
  • Step S1116 The security group manager returns a security group and the virtual machine unbinding success response to the user.
  • Step S1118 The security group executor controls the network flow of the security group according to the rules of the default security group.
  • Step S1120 The security group executor distributes the network flow that meets the default security group rule.
  • FIG. 12 is a flowchart of a security group export according to a preferred embodiment of the present invention. As shown in FIG. 12, the flow includes the following steps (step S1202-step S1212): Step S1202, the user creates a security group and its rules. In step S1204, the user creates a virtual machine and a security group to which it belongs. It should be noted that step S1202 and step S1204 are preset steps, similar to steps S1102 to S1108, the creation of the virtual machine and the security group, and the control of the network flow according to the security group rule.
  • Step S1206 The user initiates a security group export request, where the security group ID and the storage path of the security group and its rules are carried.
  • Step S1208 The security group manager determines the validity of the security group export request, for example, determining whether the security group ID exists. If the condition is met, the Security Group Manager reads the security group configuration information.
  • step S1210 the security group manager stores the security group and its rules in a specified storage location.
  • step S1212 the security group manager returns a security group export success response to the user.
  • FIG. 13 is a flowchart of a security group import according to a preferred embodiment of the present invention. As shown in FIG.
  • Step S1302 the user creates a security group and its rules.
  • Step S1304 the user creates a virtual machine and a security group to which it belongs.
  • step S1302 and step S1304 are preset steps, similar to steps S1102 to S1108, the creation of the virtual machine and the security group, and the control of the network flow according to the security group rule.
  • step S1306 The user initiates a security group import request, where the security group name and the stored security group and the path of the rule are carried.
  • Step S1308 The security group manager determines the validity of the security group import request, for example, determining the validity of the storage path, the read permission of the user, and the like.
  • FIG. 14 is a structural block diagram of a configuration apparatus of a virtual machine security group according to an embodiment of the present invention.
  • the device is configured to implement the configuration of a virtual machine security group provided by the foregoing method embodiment.
  • the device mainly includes: A processing module 10 and a second processing module 20.
  • the first processing module 10 is configured to bind, update, or unbind the virtual machine and the security group when receiving an operation request for binding, updating, or unbinding the virtual machine and the security group;
  • the second processing module 20 is configured to import and export the specified security group when receiving an operation request for importing and exporting the specified security group.
  • binding a virtual machine to a security group means adding the virtual machine to the security group. In practical applications, both virtual machines and security groups can be created.
  • updating the virtual machine and the security group means that the virtual machine (which may be created) is migrated from one security group that has been added to another security group.
  • debinding the virtual machine and the security group means that the virtual machine (which may be created) is removed from the security group that has been added.
  • the binding, updating, or unbinding of the virtual machine and the security group is performed in a state where the virtual machine has been created and is not running, or in a state where the virtual machine has been created and has been running.
  • the virtual machine can belong to multiple security groups at the same time, and the security group can include multiple virtual machines at the same time.
  • FIG. 15 is a structural block diagram of a configuration apparatus of a virtual machine security group according to a preferred embodiment of the present invention.
  • the configuration device of the virtual machine security group provided by the preferred embodiment further includes: a loading module 30. And connecting to the first processing module 10, configured to put the unbound virtual machine into a default security group (which may be the current user) if the unbound virtual machine is no longer associated with another security group. in.
  • the second processing module 20 includes: a storage unit 22 configured to store the rules of the specified security group and the specified security group in the specified path.
  • the second processing module 20 includes: a creating unit 24 configured to create a new security group according to the specified path according to the name and description information of the specified security group; the assigning unit 26, connected to the creating unit 24, set to be new
  • the security group is assigned a security group ID (ID).
  • ID security group ID
  • the configuration device of the virtual machine security group provided by the foregoing embodiment can increase the binding, updating, and debinding functions of the security group and the virtual machine, and increase the import and export functions of the security group, thereby facilitating the user's demand according to the application service. The flexibility to configure virtual machines and security groups.
  • the present invention achieves the following technical effects: adding binding, updating, and debinding functions to security groups and virtual machines, and adding import and export functions for security groups, thereby solving
  • the process of creating a security group is complicated, the relationship between the virtual machine and the security group cannot be modified, and the user cannot flexibly handle the virtual machine and the security group according to the requirements of the application service, thereby achieving convenience for the user according to the application service.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the computing device may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种虚拟机安全组的配置方法及装置。其中,该方法包括:当接收到对虚拟机与安全组进行绑定、更新或解绑定的操作请求时,虚拟化平台对虚拟机与安全组进行绑定、更新或解绑定;当接收到对指定安全组进行导入和导出的操作请求时,虚拟化平台对指定安全组进行导入和导出。通过本发明,达到了方便用户根据应用服务的需求灵活地对虚拟机与安全组进行配置的效果。

Description

虚拟机安全组的配置方法及装置
技术领域 本发明涉及通信领域, 具体而言, 涉及一种虚拟机安全组的配置方法及装置。 背景技术 虚拟化技术是云服务平台构建的基础。 虚拟化技术是指在物理服务器上, 通过虚 拟化管理软件 Hypervisor将物理资源分割为多个逻辑分区, 每个逻辑分区相互隔离, 各自成为独立的虚拟机。对操作系统和应用程序来说,虚拟机与物理服务器没有区别, 它们可以共享同一台物理服务器的资源。 安全组是用于控制数据流进入和外发一组虚拟机的访问控制规则, 也指满足这些 规则的虚拟机组。 即在虚拟化平台中, 为了满足用户的应用部署的需求, 即将用户申 请的虚拟机进行分组, 每组虚拟机都有各自的数据流访问控制规则, 只有满足该虚拟 机组所配置的进入访问控制规则的数据流才允许进入该虚拟机组, 其他的数据流将被 禁止转入该虚拟机组。 同时, 对于一些虚拟化平台也支持对虚拟机组发出的数据流按 配置的访问规则进行控制, 即该虚拟机组内虚拟机所外发的数据流中只有满足该虚拟 机组所配置的外出访问控制规则的数据流才允许转发出该虚拟机组, 其他的数据流将 被禁止转发出该虚拟机组。 图 1根据相关技术的安全组的模型示意图。 如图 1所示, 该安全组的模型包括- 安全组管理器 101, 用于管理用户的安全组, 包括对用户发起的安全组创建、 更新、 查询和删除等操作, 以及安全组规则等管理请求进行处理; 配置信息 102, 包含用户 的安全组及其规则配置信息; 物理服务器 103, 通过虚拟化管理软件 Hypervisor提供 虚拟机; 虚拟交换机 104, 即物理网卡虚拟化后为物理主机内部的虚拟机提供虚拟交 换功能; 虚拟机 105是封装了 CPU、 内存、 本地磁盘和网络等虚拟化的资源实体; 安 全组执行器 106, 即主机内为属于安全组的虚拟机执行安全策略的实体; 安全组存放 设备 107即用户将配置的安全组及其规则进行导入所存放的位置。 图 2根据相关技术的安全组的结构示意图。 如图 2所示, 该安全组的结构包括: 安全组管理器 201, 其具体功能如图 1中的安全组管理器 101所描述; 配置信息 202, 其具体功能如图 1中的配置信息 102所描述; 虚拟化平台 203, 是虚拟机资源服务管 理平台, 安全组功能是在虚拟化平台上实现的; 安全组 210, 即为用户所创建的管理 用于该用户一组虚拟机的访问控制策略; 规则集 211, 描述安全组中的规则, 规则包 括数据包的进入规则和数据包的发出规则; 虚拟机 212, 指用户申请的属于某安全组 的虚拟化服务器。 图 3根据相关技术的安全组的网络模型图。 如图 3所示, 该安全组的网络模型包 括: 外部网络 301, 该外部网络可以是 Internet或其他私有网络, 该外部网络可以访问 内部网络中的虚拟机; 内部网络 302, 即在图 2中虚拟化平台 203的基础上构建的网 络; 安全组管理器 303, 即图 1中的安全组管理器 101 ; 虚拟机 304, 即图 2中的虚拟 机 212, 该虚拟机可以属于多个安全组; 配置信息 305, 其具体功能如图 1中的配置信 息 102所描述; 安全组 306, 具体功能即图 2中的安全组 210的描述, 安全组可以包 含多个虚拟机。 图 4根据相关技术的创建虚拟机时配置默认安全组的流程图。 如图 4所示, 该流 程包括以下步骤:
S401 , 虚拟化平台在用户管理时为该用户创建默认安全组。 默认安全组不包含任 何规则, 即默认安全组允许所有外出的网络流, 禁止所有进入的网络流, 并允许安全 组内的虚拟机互相访问。 S402, 用户向虚拟化平台发起虚拟机创建请求, 该创建请求没有为该虚拟机指定 任何安全组。
5403, 虚拟化平台的安全组管理器为该虚拟机指定用户的默认安全组。
5404, 加载安全组规则到虚拟机所在主机的安全组执行器。
5405, 虚拟化平台向用户返回虚拟机创建完成响应, 其中携带已创建虚拟机的 ID 和默认安全组标识。
5406, 可选的, 用户可以修改默认安全组中的规则, 如果用户增加了出口规则, 则将禁止除满足出口规则外的网络流。
5407, 安全组执行器根据安全组的规则对默认安全组的网络流进行控制。
5408, 安全组执行器分发满足安全组规则的网络流。 图 5根据相关技术的创建虚拟机时配置指定安全组的流程图。 如图 5所示, 该流 程包括以下步骤:
S501 , 用户在创建虚拟机之前, 先创建完成该虚拟机所属的安全组及其规则。 5502, 用户向虚拟化平台发起虚拟机创建请求, 其中携带该虚拟机所属的安全组 标识 (本实施例假定为安全组 1 )。
5503, 虚拟化平台的安全组管理器更新安全组 1的配置信息, 即增加属于该安全 组的虚拟机。 S504, 加载安全组规则到虚拟机所在主机的安全组执行器。
5505, 虚拟化平台向用户返回虚拟机创建完成响应, 其中携带已创建虚拟机的 ID 和安全组 1。
5506, 可选的, 用户可以修改安全组 1中的规则。
5507, 安全组执行器根据安全组的规则对安全组的网络流进行控制。 S508, 安全组执行器分发满足安全组规则的网络流。 目前的虚拟化平台为用户申请的虚拟机组提供安全组功能, 但是目前的虚拟化平 台都要求用户先配置安全组, 然后在创建虚拟机时进行与安全组的绑定, 并且在虚拟 机的整个生命期无法修改虚拟机与安全组的关系; 而且, 目前的安全组一般能够最大 支持上百条规则, 如果用户创建一个类似的安全组, 则需要对安全组规则一个一个输 入, 这显然不方便安全组的快速创建, 造成这些问题的原因在于当前配置的安全组的 功能较弱, 例如, 缺乏以下功能: (1 ) 安全组与虚拟机的绑定和解绑定功能; (2) 安 全组与虚拟机的更新功能; (3 ) 安全组的导入和导出功能等, 同时这些原因也使得当 前的虚拟化平台无法为用户提供灵活的安全组操作, 导致用户不能根据应用服务的需 求灵活地对虚拟机与安全组进行相应处理。 针对相关技术中用户创建安全组的过程较为繁杂、 虚拟机与安全组的关系无法修 改以及用户不能根据应用服务的需求灵活地对虚拟机与安全组进行相应处理的问题, 目前尚未提出有效的解决方案。 发明内容 本发明提供了一种虚拟机安全组的配置方法及装置, 以至少解决上述问题。 根据本发明的一个方面, 提供了一种虚拟机安全组的配置方法, 包括: 当接收到 对虚拟机与安全组进行绑定、 更新或解绑定的操作请求时, 虚拟化平台对虚拟机与安 全组进行绑定、更新或解绑定; 当接收到对指定安全组进行导入和导出的操作请求时, 虚拟化平台对指定安全组进行导入和导出。 优选地, 对虚拟机与安全组进行绑定是指将虚拟机加入到安全组中。 优选地, 对虚拟机与安全组进行更新是指将虚拟机从当前已经加入到的一个安全 组中迁移到另外一个安全组中。 优选地, 对虚拟机与安全组进行解绑定是指将虚拟机从当前已经加入到的安全组 中移除。 优选地, 在虚拟化平台完成对虚拟机与安全组的解绑定之后, 该方法还包括: 在 解绑定后的虚拟机不再关联其他安全组的情况下, 虚拟化平台将解绑定后的虚拟机放 入到缺省安全组中。 优选地, 对虚拟机与安全组进行的绑定、 更新或解绑定是在虚拟机已经创建完成 且未运行的状态下或者在虚拟机已经创建完成且已经运行的状态下进行的。 优选地, 虚拟机能够同时属于多个安全组, 安全组能够同时包含多个虚拟机。 优选地, 对虚拟机与安全组进行绑定、 更新或解绑定时, 能够同时针对一个虚拟 机所属的一个或多个安全组进行。 优选地, 对虚拟机与安全组进行绑定、 更新或解绑定时, 能够同时针对一个安全 组所属的一个或多个虚拟机进行。 优选地, 安全组的创建时间与虚拟机的创建时间没有先后顺序。 优选地, 在虚拟化平台对虚拟机与安全组进行绑定、 更新或解绑定的过程中, 虚 拟机处于停止、 运行或挂起状态。 优选地, 在虚拟化平台完成对虚拟机与安全组的绑定、 更新或解绑定之后, 虚拟 机对应的安全组规则立即生效。 优选地, 当虚拟机属于多个安全组时, 虚拟机的入口流量只有在满足全部安全组 的入口规则时才能进人, 虚拟机的出口流量只有在满足全部安全组的出口规则时才能 发出。 优选地, 在对指定安全组进行导出时, 虚拟化平台将指定安全组及指定安全组的 规则存放在指定的路径。 优选地, 在对指定安全组进行导入时, 虚拟化平台按照指定的路径, 根据指定安 全组的名称和描述信息创建一个新的安全组, 并为新的安全组分配一个安全组标识 (ID)。 根据本发明的另一方面, 提供了一种虚拟机安全组的配置装置, 包括: 第一处理 模块, 设置为当接收到对虚拟机与安全组进行绑定、 更新或解绑定的操作请求时, 对 虚拟机与安全组进行绑定、 更新或解绑定; 第二处理模块, 设置为当接收到对指定安 全组进行导入和导出的操作请求时, 对指定安全组进行导入和导出。 优选地, 对虚拟机与安全组进行绑定是指将虚拟机加入到安全组中。 优选地, 对虚拟机与安全组进行更新是指将虚拟机从当前已经加入到的一个安全 组中迁移到另外一个安全组中。 优选地, 对虚拟机与安全组进行解绑定是指将虚拟机从当前已经加入到的安全组 中移除。 优选地, 该装置还包括: 放入模块, 设置为在所述解绑定后的虚拟机不再关联其 他安全组的情况下, 将解绑定后的虚拟机放入到缺省安全组中。 优选地, 对虚拟机与安全组进行的绑定、 更新或解绑定是在虚拟机已经创建完成 且未运行的状态下或者在虚拟机已经创建完成且已经运行的状态下进行的。 优选地, 虚拟机能够同时属于多个安全组, 安全组能够同时包含多个虚拟机。 优选地, 当虚拟机属于多个安全组时, 虚拟机的入口流量只有在满足全部安全组 的入口规则时才能进人, 虚拟机的出口流量只有在满足全部安全组的出口规则时才能 发出。 优选地, 第二处理模块包括: 存放单元, 设置为将指定安全组及指定安全组的规 则存放在指定的路径。 优选地, 第二处理模块包括: 创建单元, 设置为按照指定的路径根据指定安全组 的名称和描述信息创建一个新的安全组; 分配单元, 设置为为新的安全组分配一个安 全组标识 (ID)。 通过本发明, 采用增加安全组与虚拟机的绑定、 更新以及解绑定功能, 增加安全 组的导入和导出功能的方式, 解决了用户创建安全组的过程较为繁杂、 虚拟机与安全 组的关系无法修改以及用户不能根据应用服务的需求灵活地对虚拟机与安全组进行相 应处理的问题, 进而达到了方便用户根据应用服务的需求灵活地对虚拟机与安全组进 行配置的效果。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中- 图 1根据相关技术的安全组的模型示意图; 图 2根据相关技术的安全组的结构示意图; 图 3根据相关技术的安全组的网络模型图; 图 4根据相关技术的创建虚拟机时配置默认安全组的流程图; 图 5根据相关技术的创建虚拟机时配置指定安全组的流程图; 图 6是根据本发明实施例的虚拟机安全组的配置方法流程图; 图 7是根据本发明优选实施例的虚拟机安全组的创建流程图; 图 8是根据本发明优选实施例的虚拟机创建后绑定安全组的流程图; 图 9是根据本发明优选实施例的虚拟机创建后更新安全组的流程图; 图 10 是根据本发明优选实施例的虚拟机创建后解绑定部分用户创建的安全组的 流程图; 图 11 是根据本发明优选实施例的虚拟机创建后解绑定最后一个用户创建的安全 组的流程图; 图 12是根据本发明优选实施例的安全组导出流程图; 图 13是根据本发明优选实施例的安全组导入流程图; 图 14是根据本发明实施例的虚拟机安全组的配置装置的结构框图; 以及 图 15是根据本发明优选实施例的虚拟机安全组的配置装置的结构框图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 图 6是根据本发明实施例的虚拟机安全组的配置方法流程图, 如图 6所示, 该方 法主要包括以下步骤 (步骤 S602-步骤 S604): 步骤 S602, 当接收到对虚拟机与安全组进行绑定、 更新或解绑定的操作请求时, 虚拟化平台对虚拟机与安全组进行绑定、 更新或解绑定。 步骤 S604, 当接收到对指定安全组进行导入和导出的操作请求时, 虚拟化平台对 指定安全组进行导入和导出。 在本实施例中, 对虚拟机与安全组进行绑定是指将虚拟机加入到安全组中。 在实 际应用中, 虚拟机和安全组都可以是已经创建完成的。 在本实施例中, 对虚拟机与安全组进行更新是指将虚拟机 (例如, 可以是已创建 完成的虚拟机) 从当前已经加入到的一个安全组中迁移到另外一个安全组中。 在本实施例中, 对虚拟机与安全组进行解绑定是指将虚拟机 (例如, 可以是已创 建完成的虚拟机) 从当前已经加入到的安全组中移除。 在本实施例中, 在虚拟化平台完成对虚拟机与安全组的解绑定之后, 该方法还包 括: 在解绑定后的虚拟机不再关联其他安全组的情况下, 虚拟化平台将解绑定后的虚 拟机放入到缺省安全组 (可以是当前用户的) 中。 在本实施例中, 对虚拟机与安全组进行的绑定、 更新或解绑定是在虚拟机已经创 建完成且未运行的状态下或者在虚拟机已经创建完成且已经运行的状态下进行的。 在本实施例中, 虚拟机能够同时属于多个安全组, 安全组能够同时包含多个虚拟 机。 在本实施例中, 对虚拟机与安全组进行绑定、 更新或解绑定时, 能够同时针对一 个虚拟机所属的一个或多个安全组进行。 在本实施例中, 对虚拟机与安全组进行绑定、 更新或解绑定时, 能够同时针对一 个安全组所属的一个或多个虚拟机进行。 在本实施例中, 安全组的创建时间与虚拟机的创建时间没有先后顺序。 在本实施例中, 在虚拟化平台对虚拟机与安全组进行绑定、 更新或解绑定的过程 中, 虚拟机处于停止、 运行或挂起状态。 在本实施例中,在虚拟化平台完成对虚拟机与安全组的绑定、更新或解绑定之后, 虚拟机对应的安全组规则立即生效。 在本实施例中, 当虚拟机属于多个安全组时, 虚拟机的入口流量只有在满足全部 安全组的入口规则时才能进人, 虚拟机的出口流量只有在满足全部安全组的出口规则 时才能发出。 在本实施例中, 在对指定安全组进行导出时, 虚拟化平台将指定安全组及指定安 全组的规则存放在指定的路径。 在本实施例中, 在对指定安全组进行导入时, 虚拟化平台按照指定的路径, 根据 指定安全组的名称和描述信息创建一个新的安全组, 并为新的安全组分配一个安全组 标识 (ID)。 下面结合图 7至图 13以及优选实施例对上述实施例提供的虚拟机安全组的配置方 法进行更加详细的描述。 图 7是根据本发明优选实施例的虚拟机安全组的创建流程图, 如图 7所示, 该流 程包括以下步骤 (步骤 S702-步骤 S706): 步骤 S702,用户创建虚拟机,并从已创建的安全组中选择该虚拟机所属的安全组; 如果没有选择, 则创建的虚拟机属于用户的缺省安全组。 步骤 S704, 虚拟机创建后, 用户可以根据应用服务的需求, 绑定、 解绑定虚拟机 与其安全组, 或迁移该虚拟机到其他安全组中。 步骤 S706, 用户将安全组及其规则导入到某个位置进行保存, 并通过导出操作快 速创建一个类似的新的安全组。 图 8是根据本发明优选实施例的虚拟机创建后绑定安全组的流程图,如图 8所示, 该流程包括以下步骤 (步骤 S802-步骤 S816): 步骤 S802, 用户创建虚拟机, 虚拟化平台为用户已创建缺省安全组。 步骤 S804, 用户创建安全组及其规则(用户创建安全组和创建虚拟机没有顺序关 系要求)。 步骤 S806, 用户发起安全组与虚拟机绑定请求, 其中, 携带已创建的安全组 ID 和已创建的虚拟机 ID。 步骤 S808, 安全组管理器判断安全组绑定请求的合法性, 例如根据安全组 ID判 断该安全组是否存在,根据虚拟机 ID判断虚拟机是否存在,该虚拟机与安全组是否已 绑定。 如果满足条件, 则安全组管理器更新安全组配置信息。 步骤 S810, 安全组管理器通知负责该虚拟机网络流接入控制的安全组执行器, 加 载该安全组的规则。 步骤 S812, 安全组管理器向用户返回安全组与虚拟机绑定成功响应。 步骤 S814, 安全组执行器根据安全组的规则对安全组的网络流进行控制。 步骤 S816, 安全组执行器分发满足安全组规则的网络流。 图 9是根据本发明优选实施例的虚拟机创建后更新安全组的流程图,如图 9所示, 该流程包括以下步骤 (步骤 S902-步骤 S920): 步骤 S902, 用户创建安全组及其规则, 假定用户创建了安全组 1和安全组 2。 步骤 S904, 用户创建虚拟机, 并设置该虚拟机属于安全组 1。 步骤 S906, 安全组执行器根据安全组的规则对安全组的网络流进行控制。 步骤 S908, 安全组执行器分发满足安全组规则的网络流。 需要说明的是, 步骤 S902和步骤 S908是预置步骤, 即虚拟机首先属于安全组 1, 并且在安全组 1下网络流能够正常控制, 然后更新到安全组 2下。 步骤 S910, 用户发起安全组与虚拟机更新请求, 其中携带虚拟机 ID、 源安全组 1 和要迁移到的安全组 2。 步骤 S912, 安全组管理器判断安全组更新请求的合法性, 比如源安全组和目标安 全组是否存在, 要迁移的虚拟机是否存在, 该虚拟机与源安全组是否已绑定。 如果满 足条件, 则安全组管理器更新安全组配置信息, 即解绑定虚拟机与源安全组的关系, 绑定与目标安全组的关系。 步骤 S914, 安全组管理器通知负责该虚拟机网络流接入控制的安全组执行器, 更 新安全组规则。 步骤 S916, 安全组管理器向用户返回虚拟机安全组更新成功响应。 步骤 S918, 安全组执行器根据安全组的规则对安全组的网络流进行控制。 步骤 S920, 安全组执行器分发满足安全组规则的网络流。 图 10 是根据本发明优选实施例的虚拟机创建后解绑定部分用户创建的安全组的 流程图, 如图 10所示, 该流程包括以下步骤 (步骤 S1002-步骤 S1020): 步骤 S1002, 用户创建安全组 1和安全组 2及其入口和 /或出口规则。 步骤 S1004, 用户创建虚拟机, 该虚拟机绑定安全组 1和安全组 2 (用户创建安全 组和创建虚拟机没有顺序关系要求)。 步骤 S1006, 安全组执行器根据安全组 1和安全组 2的规则对安全组的网络流进 行控制。 步骤 S1008, 安全组执行器分发满足安全组规则的网络流。 需要说明的是, 步骤 S1002和步骤 S1008是预置步骤, 即虚拟机首先属于安全组 1和安全中, 并且网络流受控于安全组 1和安全中, 然后解绑定安全组 2。 步骤 S1010, 用户发起安全组与虚拟机解绑定请求, 其中携带已创建的虚拟机 ID 和要解绑定的安全组 2。 步骤 S1012, 安全组管理器判断安全组绑定请求的合法性, 比如判断安全组 2是 否存在, 虚拟机是否存在, 该虚拟机与安全组 2是否已绑定。 如果满足条件, 则安全 组管理器更新安全组配置信息。 步骤 S1014, 安全组管理器通知负责该虚拟机网络流接入控制的安全组执行器, 更新安全组的规则。 步骤 S1016, 安全组管理器向用户返回安全组与虚拟机解绑定成功响应。 步骤 S1018, 安全组执行器根据安全组的规则对安全组的网络流进行控制。 步骤 S1020, 安全组执行器分发满足安全组规则的网络流。 图 11 是根据本发明优选实施例的虚拟机创建后解绑定最后一个用户创建的安全 组的流程图, 如图 11所示, 该流程包括以下步骤 (步骤 S1102-步骤 S1104): 步骤 S1102, 用户创建安全组 1及其规则。 步骤 S1104, 用户创建虚拟机, 该虚拟机绑定安全组 1 (用户创建安全组和创建虚 拟机没有顺序关系要求)。 步骤 S1106, 安全组执行器根据安全组 1的规则对安全组的网络流进行控制。 步骤 S1108, 安全组执行器分发满足安全组规则的网络流。 需要说明的是, 步骤 S1102和步骤 S1108是预置步骤, 即虚拟机当前只关联最后 一个用户定义的安全组中, 然后解绑定该安全组。 步骤 S1110, 用户发起安全组与虚拟机解绑定请求, 其中携带已创建的虚拟机 ID 和要解绑定的安全组 1。 步骤 S1112, 安全组管理器判断安全组绑定请求的合法性, 比如判断安全组 1是 否存在, 虚拟机是否存在, 该虚拟机与安全组 1是否已绑定。 如果满足条件, 则安全 组管理器更新安全组配置信息, 即解绑定安全组 1, 然后将虚拟机加入到用户的缺省 安全组中。 步骤 S1114, 安全组管理器通知负责该虚拟机网络流接入控制的安全组执行器, 更新安全组的规则为用户缺省安全组的规则。 步骤 S1116, 安全组管理器向用户返回安全组与虚拟机解绑定成功响应。 步骤 S1118, 安全组执行器根据缺省安全组的规则对安全组的网络流进行控制。 步骤 S1120, 安全组执行器分发满足缺省安全组规则的网络流。 图 12是根据本发明优选实施例的安全组导出流程图, 如图 12所示, 该流程包括 以下步骤 (步骤 S1202-步骤 S1212): 步骤 S1202, 用户创建安全组及其规则。 步骤 S1204, 用户创建虚拟机及其所属的安全组。 需要说明的是,步骤 S 1202和步骤 S 1204是预置步骤,类似步骤 S1102到步骤 S 1108 执行虚拟机和安全组的创建, 以及根据安全组规则进行网络流的控制。 步骤 S1206, 用户发起安全组导出请求, 其中携带安全组 ID和安全组及其规则的 存放路径等信息。 步骤 S1208, 安全组管理器判断安全组导出请求的合法性, 比如判断安全组 ID是 否存在。 如果满足条件, 则安全组管理器读取安全组配置信息。 步骤 S1210, 安全组管理器将该安全组及其规则存放在指定的存储位置。 步骤 S1212, 安全组管理器向用户返回安全组导出成功响应。 图 13是根据本发明优选实施例的安全组导入流程图, 如图 13所示, 该流程包括 以下步骤 (步骤 S1302-步骤 S1312): 步骤 S1302, 用户创建安全组及其规则。 步骤 S1304, 用户创建虚拟机及其所属的安全组。 需要说明的是,步骤 S 1302和步骤 S 1304是预置步骤,类似步骤 S1102到步骤 S 1108 执行虚拟机和安全组的创建, 以及根据安全组规则进行网络流的控制。 步骤 S1306, 用户发起安全组导入请求, 其中携带安全组名称和已存放的安全组 及其规则的路径等信息。 步骤 S1308, 安全组管理器判断安全组导入请求的合法性, 比如判断该存放路径 的有效性, 用户的读取权限等。 如果满足条件, 则安全组管理器从存储器读取已存储 的安全组配置信息。 步骤 S1310, 安全组管理器根据存储的安全组及其规则创建一个新的安全组。 步骤 S1312, 安全组管理器向用户返回安全组导入成功响应, 并携带新创建的安 全组 ID。 采用上述实施例提供的虚拟机安全组的配置方法, 可以增加安全组与虚拟机的绑 定、 更新以及解绑定功能, 增加安全组的导入和导出功能, 达到了方便用户根据应用 服务的需求灵活地对虚拟机与安全组进行配置的效果。 图 14是根据本发明实施例的虚拟机安全组的配置装置的结构框图,该装置用以实 现上述方法实施例提供的虚拟机安全组的配置, 如图 14所示, 该装置主要包括: 第一 处理模块 10和第二处理模块 20。 其中, 第一处理模块 10, 设置为当接收到对虚拟机 与安全组进行绑定、 更新或解绑定的操作请求时, 对虚拟机与安全组进行绑定、 更新 或解绑定; 第二处理模块 20, 设置为当接收到对指定安全组进行导入和导出的操作请 求时, 对指定安全组进行导入和导出。 在本实施例中, 对虚拟机与安全组进行绑定是指将虚拟机加入到安全组中。 在实 际应用中, 虚拟机和安全组都可以是已经创建完成的。 在本实施例中,对虚拟机与安全组进行更新是指将虚拟机(可以是已创建完成的) 从当前已经加入到的一个安全组中迁移到另外一个安全组中。 在本实施例中, 对虚拟机与安全组进行解绑定是指将虚拟机 (可以是已创建完成 的) 从当前已经加入到的安全组中移除。 在本实施例中, 对虚拟机与安全组进行的绑定、 更新或解绑定是在虚拟机已经创 建完成且未运行的状态下或者在虚拟机已经创建完成且已经运行的状态下进行的。 在本实施例中, 虚拟机能够同时属于多个安全组, 安全组能够同时包含多个虚拟 机。 在本实施例中, 当虚拟机属于多个安全组时, 虚拟机的入口流量只有在满足全部 安全组的入口规则时才能进人, 虚拟机的出口流量只有在满足全部安全组的出口规则 时才能发出。 图 15是根据本发明优选实施例的虚拟机安全组的配置装置的结构框图, 如图 15 所示, 在该优选实施例提供的虚拟机安全组的配置装置中, 还包括: 放入模块 30, 连 接至第一处理模块 10, 设置为在解绑定后的虚拟机不再关联其他安全组的情况下, 将 解绑定后的虚拟机放入缺省安全组 (可以是当前用户的) 中。 优选地, 第二处理模块 20包括: 存放单元 22, 设置为将指定安全组及指定安全 组的规则存放在指定的路径。 优选地, 第二处理模块 20包括: 创建单元 24, 设置为按照指定的路径根据指定 安全组的名称和描述信息创建一个新的安全组; 分配单元 26, 连接至创建单元 24, 设 置为为新的安全组分配一个安全组标识 (ID)。 采用上述实施例提供的虚拟机安全组的配置装置, 可以增加安全组与虚拟机的绑 定、 更新以及解绑定功能, 增加安全组的导入和导出功能, 达到了方便用户根据应用 服务的需求灵活地对虚拟机与安全组进行配置的效果。 从以上的描述中, 可以看出, 本发明实现了如下技术效果: 为安全组与虚拟机增 加绑定、 更新以及解绑定功能, 为安全组增加导入和导出功能, 通过这种方式, 解决 了用户创建安全组的过程较为繁杂、 虚拟机与安全组的关系无法修改以及用户不能根 据应用服务的需求灵活地对虚拟机与安全组进行相应处理的问题, 进而达到了方便用 户根据应用服务的需求灵活地对虚拟机与安全组进行配置的效果。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种虚拟机安全组的配置方法, 包括:
当接收到对虚拟机与安全组进行绑定、 更新或解绑定的操作请求时, 虚拟 化平台对所述虚拟机与所述安全组进行绑定、 更新或解绑定;
当接收到对指定安全组进行导入和导出的操作请求时, 所述虚拟化平台对 指定安全组进行导入和导出。
2. 根据权利要求 1所述的方法, 其中, 对所述虚拟机与所述安全组进行绑定是指 将虚拟机加入到安全组中。
3. 根据权利要求 1所述的方法, 其中, 对所述虚拟机与安全组进行更新是指将虚 拟机从当前已经加入到的一个安全组中迁移到另外一个安全组中。
4. 根据权利要求 1所述的方法, 其中, 对所述虚拟机与安全组进行解绑定是指将 虚拟机从当前已经加入到的安全组中移除。
5. 根据权利要求 1所述的方法, 其中, 在所述虚拟化平台完成对所述虚拟机与所 述安全组的解绑定之后, 所述方法还包括:
在所述解绑定后的虚拟机不再关联其他安全组的情况下, 所述虚拟化平台 将所述解绑定后的虚拟机放入到缺省安全组中。
6. 根据权利要求 1至 5中任一项所述的方法, 其中, 对所述虚拟机与所述安全组 进行的绑定、 更新或解绑定是在所述虚拟机已经创建完成且未运行的状态下或 者在所述虚拟机已经创建完成且已经运行的状态下进行的。
7. 根据权利要求 1至 5中任一项所述的方法, 其中, 所述虚拟机能够同时属于多 个所述安全组, 所述安全组能够同时包含多个所述虚拟机。
8. 根据权利要求 1至 5中任一项所述的方法, 其中, 对所述虚拟机与所述安全组 进行绑定、 更新或解绑定时, 能够同时针对一个所述虚拟机所属的一个或多个 所述安全组进行。
9. 根据权利要求 1至 5中任一项所述的方法, 其中, 对所述虚拟机与所述安全组 进行绑定、 更新或解绑定时, 能够同时针对一个所述安全组所属的一个或多个 所述虚拟机进行。
10. 根据权利要求 1至 5中任一项所述的方法, 其中, 所述安全组的创建时间与所 述虚拟机的创建时间没有先后顺序。
11. 根据权利要求 1至 5中任一项所述的方法, 其中, 在所述虚拟化平台对所述虚 拟机与所述安全组进行绑定、 更新或解绑定的过程中, 所述虚拟机处于停止、 运行或挂起状态。
12. 根据权利要求 1至 5中任一项所述的方法, 其中, 在所述虚拟化平台完成对所 述虚拟机与所述安全组的绑定、 更新或解绑定之后, 所述虚拟机对应的安全组 规则立即生效。
13. 根据权利要求 1至 5中任一项所述的方法, 其中, 当所述虚拟机属于多个所述 安全组时, 所述虚拟机的入口流量只有在满足全部安全组的入口规则时才能进 人, 所述虚拟机的出口流量只有在满足全部安全组的出口规则时才能发出。
14. 根据权利要求 1所述的方法, 其中, 在对所述指定安全组进行导出时, 所述虚 拟化平台将所述指定安全组及所述指定安全组的规则存放在指定的路径。
15. 根据权利要求 1所述的方法, 其中, 在对所述指定安全组进行导入时, 所述虚 拟化平台按照指定的路径, 根据所述指定安全组的名称和描述信息创建一个新 的安全组, 并为所述新的安全组分配一个安全组标识 ID。
16. 一种虚拟机安全组的配置装置, 包括:
第一处理模块, 设置为当接收到对虚拟机与安全组进行绑定、 更新或解绑 定的操作请求时, 对所述虚拟机与所述安全组进行绑定、 更新或解绑定; 第二处理模块, 设置为当接收到对指定安全组进行导入和导出的操作请求 时, 对指定安全组进行导入和导出。
17. 根据权利要求 16所述的装置,其中,对所述虚拟机与所述安全组进行绑定是指 将虚拟机加入到安全组中。
18. 根据权利要求 16所述的装置,其中,对所述虚拟机与所述安全组进行更新是指 将虚拟机从当前已经加入到的一个安全组中迁移到另外一个安全组中。
19 根据权利要求 16所述的装置,其中,对所述虚拟机与所述安全组进行解绑定是 指将虚拟机从当前已经加入到的安全组中移除。 根据权利要求 16所述的装置, 其中, 所述装置还包括: 放入模块,设置为在所述解绑定后的虚拟机不再关联其他安全组的情况下, 将所述解绑定后的虚拟机放入到缺省安全组中。
21. 根据权利要求 16至 20中任一项所述的装置, 其中, 对所述虚拟机与所述安全 组进行的绑定、 更新或解绑定是在所述虚拟机已经创建完成且未运行的状态下 或者在所述虚拟机已经创建完成且已经运行的状态下进行的。
22. 根据权利要求 16至 20中任一项所述的装置, 其中, 所述虚拟机能够同时属于 多个所述安全组, 所述安全组能够同时包含多个所述虚拟机。
23. 根据权利要求 16至 20中任一项所述的装置, 其中, 当所述虚拟机属于多个所 述安全组时, 所述虚拟机的入口流量只有在满足全部安全组的入口规则时才能 进人, 所述虚拟机的出口流量只有在满足全部安全组的出口规则时才能发出。
24. 根据权利要求 16至 20中任一项所述的装置, 其中, 所述第二处理模块包括: 存放单元, 设置为将所述指定安全组及所述指定安全组的规则存放在指定 的路径。
25. 根据权利要求 16至 20中任一项所述的装置, 其中, 所述第二处理模块包括: 创建单元, 设置为按照指定的路径根据所述指定安全组的名称和描述信息 创建一个新的安全组;
分配单元, 设置为为所述新的安全组分配一个安全组标识 ID。
PCT/CN2013/089864 2013-02-22 2013-12-18 虚拟机安全组的配置方法及装置 WO2014127668A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310057680.6 2013-02-22
CN201310057680.6A CN104007997A (zh) 2013-02-22 2013-02-22 虚拟机安全组的配置方法及装置

Publications (1)

Publication Number Publication Date
WO2014127668A1 true WO2014127668A1 (zh) 2014-08-28

Family

ID=51368664

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/089864 WO2014127668A1 (zh) 2013-02-22 2013-12-18 虚拟机安全组的配置方法及装置

Country Status (2)

Country Link
CN (1) CN104007997A (zh)
WO (1) WO2014127668A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107113280A (zh) * 2014-12-31 2017-08-29 华为技术有限公司 一种网络控制方法与虚拟交换机
CN108293019B (zh) * 2016-03-09 2020-06-02 华为技术有限公司 流表处理方法及装置
CN107995144B (zh) * 2016-10-26 2020-11-06 北京金山云网络技术有限公司 一种基于安全组的访问控制方法及装置
CN111224922A (zh) * 2018-11-26 2020-06-02 顺丰科技有限公司 分布式安全组模块访问控制方法、系统
CN110516431B (zh) * 2019-08-29 2022-02-18 北京浪潮数据技术有限公司 动态配置虚拟机操作权限的方法、系统、设备及存储介质
CN112688913B (zh) * 2020-11-25 2023-03-24 紫光云技术有限公司 一种OpenStack安全组优化方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100306772A1 (en) * 2009-06-01 2010-12-02 International Business Machines Corporation Virtual solution composition and deployment system and method
US20110247047A1 (en) * 2010-04-02 2011-10-06 Sergio Loureiro Method for securing data and/or applications in a cloud computing architecture

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739282B (zh) * 2008-11-18 2013-06-12 华为技术有限公司 一种虚拟机的管理方法、装置和系统
CN102214117B (zh) * 2010-04-07 2014-06-18 中兴通讯股份有限公司南京分公司 虚拟机管理方法、系统及虚拟机管理服务器
CN102571689B (zh) * 2010-12-10 2014-12-31 中兴通讯股份有限公司 一种数据传输方法及装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100306772A1 (en) * 2009-06-01 2010-12-02 International Business Machines Corporation Virtual solution composition and deployment system and method
US20110247047A1 (en) * 2010-04-02 2011-10-06 Sergio Loureiro Method for securing data and/or applications in a cloud computing architecture

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Amazon Virtual Private Cloud: User Guide", 14 September 2012 (2012-09-14), Retrieved from the Internet <URL:https://github.com/eucalyptus/architecture/blob/master/features/vpc/docs/vpc-ug-2012-08-15.pdf> *

Also Published As

Publication number Publication date
CN104007997A (zh) 2014-08-27

Similar Documents

Publication Publication Date Title
US11960915B2 (en) Method and apparatus for creating virtual machine based on parameter information of a virtual network interface card
JP7085565B2 (ja) 分離されたネットワークスタックにわたるインテリジェントなスレッド管理
WO2014127668A1 (zh) 虚拟机安全组的配置方法及装置
CN101128807B (zh) 用于扩充中断控制器和合成中断来源的系统和方法
US11411885B2 (en) Network-accessible data volume modification
US10972542B2 (en) Data storage method and apparatus
US10523714B2 (en) Device policy composition and management system
US10095536B2 (en) Migration of virtual machines with shared memory
US10037298B2 (en) Network-accessible data volume modification
WO2015176636A1 (zh) 分布式数据库服务管理系统
TW200915084A (en) Allocating network adapter resources among logical partitions
US10866814B2 (en) Efficient instantiation of encrypted guests
KR20190007043A (ko) 재구성가능한 분산 처리
CN112822060B (zh) 主机网络的构建方法、装置、系统、介质和主机
WO2013139037A1 (zh) 用于调度资源的方法及装置
JP6543219B2 (ja) 仮想マシン配置装置およびリソース管理方法
WO2017041650A1 (zh) 用于扩展分布式一致性服务的方法和设备
JP7056555B2 (ja) ネットワークシステム、その管理方法および装置ならびにサーバ
CN112181278B (zh) 在云计算系统中创建系统盘的方法、装置、设备及存储介质
AU2017290693B2 (en) Network-accessible data volume modification
CN110347473B (zh) 一种跨数据中心分布的虚拟化网元虚拟机分配方法及装置
JP6304493B2 (ja) 仮想マシンのマイグレーション方法、マイグレーション装置及びプログラム
WO2022057698A1 (en) Efficient bulk loading multiple rows or partitions for single target table

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13875767

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13875767

Country of ref document: EP

Kind code of ref document: A1