Security service access method and system

Through the collaborative work of domain name servers and network security equipment, the mapping relationship between pan-domain names and public network addresses is used to solve the problem of inaccessibility and management of security service virtual machines in the cloud platform, and reduce the security risks and operation and maintenance of public network port exposure. complexity, improving the management convenience and security of security services.

CN118573441APending Publication Date: 2024-08-30NEW H3C NETWORK INFORMATION SECURITY SOFTWARE CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410692659.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the cloud platform, the security services provided by virtual machines cannot be directly connected to the public network, making it impossible for tenants to access and manage security services. The exposure of public network ports leads to security risks and high operation and maintenance complexity.

Method used

Through the collaborative work of domain name servers and network security devices, the mapping relationship between pan-domain names and public network addresses is used to achieve access to security service virtual machines, reduce public network port exposure, reduce the burden of operation and maintenance configuration, and improve security.

Benefits of technology

It effectively reduces security risks caused by public network port exposure, simplifies operation and maintenance configuration, reduces the cost for tenants to access security services, and improves the management convenience and security of security services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118573441A
    Figure CN118573441A
Patent Text Reader

Abstract

The invention provides a security service access method and system, and relates to the technical field of communication. The method comprises: receiving a first access message of a first security service forwarded by a network security device, the first access message being a second access message of a first security service forwarded by a network security device according to a corresponding relationship between a public network address and an access address of an access system after the network security device receives a second access message of which a destination address is a public network address sent by a user equipment; after the domain name server receives a domain name request message sent by the user equipment, if the domain name server identifies that the requested request domain name comprises a main domain name of the extensive domain name, the public network address carried by the second access message is the public network address carried by the extensive domain name, and the public network address carried by the second access message is the public network address carried by the extensive domain name; if yes, feeding back to the user equipment according to a mapping relation between the extensive domain name and the public network address; utilizing the request domain name in the first access message to obtain a configuration file containing the request domain name; and accessing the virtual machine of the first security service by using the management address of the first security service recorded in the configuration file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method and system for accessing a security service. Background Art

[0002] Currently, various cloud platforms are booming, and it is standard for cloud platforms to provide tenant security services. It is a common practice to provide security services in the form of virtual machines in cloud platforms. The security service management system is installed in the virtual machine, and it communicates with the client of the protected tenant side as a server. However, the virtual machine of the security service is inside the cloud platform, and the virtual machine and the external or public network cannot be directly connected. As a result, tenants from the external or public network cannot configure and manage the security service because they cannot access the management interface of the virtual machine of the security service.

[0003] The current methods for tenants to manage security services through the public network are roughly as follows: On the egress firewall, the public network IP address and port are mapped by NAT (Network Address Translation) to the IP address of the virtual machine in the cloud platform, and the port is the management port provided by the virtual machine for providing security services. Based on this, the tenant can manage the security services on the virtual machine based on the NAT mapping. However, in this solution, each time a tenant activates a security service, the operation and maintenance personnel need to allocate a port on the egress firewall and configure a NAT mapping before the tenant can access the corresponding security service. Figure 1 As shown. On the network security device, the IP address 7.7.7.1 and port 3000 are NAT mapped to the 192.168.0.2 and 443 ports of the virtual machine that provides security services in the intranet, and the security services provided by the virtual machine are managed based on this; when accessing another secure virtual machine, the IP address 7.7.7.1 and port 3100 can be NAT mapped to the 192.168.0.3 and 443 ports of the virtual machine that provides security services in the intranet, so as to manage the security services provided by another secure virtual machine.

[0004] In the above method, when the number of virtual machines of the security service is large, it is necessary to perform NAT mapping on many IP addresses and ports of the public network, which is not only inconvenient to manage, but also will lead to a surge in security risks due to too many exposed ports on the public network. In addition, the above NAT mapping is manually configured by the operation and maintenance personnel on the firewall device, which will not only increase the workload of the operation and maintenance personnel, but also easily lead to misoperation problems when there are many ports; moreover, when the number of security services is large, if it is necessary to strengthen the access to the security services, such as configuring two-factor authentication, etc., there will be a huge workload and difficult maintenance problems, that is, in the above method, the access cost of tenants to access the security services is high.

[0005] Therefore, how to solve the security problem of public network port exposure while realizing tenant access security services is one of the technical issues worth considering. Summary of the invention

[0006] In view of this, the present application provides a method and system for accessing a security service, which is used to solve the security problem of public network port exposure while realizing tenant access to security services.

[0007] Specifically, the present application is implemented through the following technical solutions:

[0008] According to a first aspect of the present application, a method for accessing a security service is provided, which is applied to an access system for a security service, wherein the access system includes a virtual machine for the security service, and the method includes:

[0009] Receive a first access message of a first security service forwarded by a network security device, the first access message being obtained and sent by the network security device after receiving a second access message with a destination address being a public network address sent by a user device, by performing NAT conversion on the second access message according to the maintained correspondence between the public network address and the access address of the access system of the security service, the public network address carried by the second access message being fed back to the user device according to the mapping relationship between the wildcard domain name and the public network address by the domain name server after receiving a domain name request message sent by the user device, if it is identified that the requested request domain name includes a primary domain name of a wildcard domain name;

[0010] Using the request domain name in the first access message, obtaining a configuration file containing the request domain name;

[0011] The virtual machine of the first security service is accessed by using the management address of the first security service recorded in the configuration file.

[0012] According to a second aspect of the present application, a security service access system is provided, comprising: a management module, a forwarding module, and virtual machines corresponding to each security service, wherein:

[0013] The management module receives a first access message of a first security service forwarded by a network security device, wherein the first access message is obtained and sent by the network security device after receiving a second access message with a destination address being a public network address sent by a user device, and performing NAT conversion on the second access message according to the maintained correspondence between the public network address and the access address of the access system of the security service, and the public network address carried by the second access message is fed back to the user device according to the mapping relationship between the wildcard domain name and the public network address by the domain name server after receiving a domain name request message sent by the user device, if it is identified that the requested request domain name includes a primary domain name of a wildcard domain name;

[0014] The management module is further configured to forward the first access message to the forwarding module;

[0015] The forwarding module is further used to use the request domain name in the first access message to obtain a configuration file containing the request domain name; and use the management address of the first security service recorded in the configuration file to access the virtual machine of the first security service.

[0016] According to the third aspect of the present application, an electronic device is provided, including a processor and a machine-readable storage medium, the machine-readable storage medium storing a computer program that can be executed by the processor, and the processor is prompted by the computer program to execute the method provided in the first aspect of the embodiment of the present application.

[0017] According to the fourth aspect of the present application, a machine-readable storage medium is provided, which stores a computer program. When called and executed by a processor, the computer program prompts the processor to execute the method provided in the first aspect of the embodiment of the present application.

[0018] Beneficial effects of the embodiments of the present application:

[0019] In the security service access method and system provided in the embodiments of the present application, a first access message of a first security service forwarded by a network security device is received, and a configuration file containing the requested domain name is obtained using the requested domain name in the first access message; and a management address of the first security service recorded in the configuration file is used to access the virtual machine of the first security service.

[0020] Since the above-mentioned first access message is obtained and sent by the network security device after receiving the second access message with the destination address being the public network address sent by the user device, the network security device performs NAT conversion on the second access message according to the maintained correspondence between the public network address and the access address of the access system of the security service, the public network address carried by the second access message is the public network address that the domain name server feeds back to the user device according to the mapping relationship between the wild-card domain name and the public network address after receiving the domain name request message sent by the user device, if it is identified that the requested domain name includes the primary domain name of the wild-card domain name; as a result, each access message including the primary domain name of the wild-card domain name in the request domain name can share a public network address, that is, the network security device only needs to expose a public network address under the request domain name to the outside, thereby solving the problem of greater security risks caused by the network security device exposing too many public network addresses.

[0021] In addition, although the network security device exposes a public network address under the above-mentioned wildcard domain name, the network security device records the correspondence between the public network address and the access address of the access system of the security service. Therefore, based on the correspondence, the access message can smoothly reach the above-mentioned access system. The above-mentioned access system includes a virtual machine of the security service. Therefore, after the access message reaches the above-mentioned access system, the access system can successfully find the management address of the virtual machine of the security service based on the requested domain name, and then realize the access of the virtual machine; furthermore, since the operation and maintenance personnel do not need to frequently configure the mapping relationship between the exposed public network addresses and the addresses of the virtual machines, the access cost is greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is an access logic diagram of an access security service provided by the prior art;

[0023] Figure 2 It is a flowchart of a method for accessing a security service provided by an embodiment of the present application;

[0024] Figure 3 It is a structural diagram of an access system for a security service provided in an embodiment of the present application;

[0025] Figure 4 This is a schematic diagram of an application scenario of a method for accessing a security service provided in an embodiment of the present application;

[0026] Figure 5 It is a hardware structure diagram of an electronic device for implementing a method for accessing a security service provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application.

[0028] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

[0029] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0030] The following is a detailed description of the access method of the security service provided by this application.

[0031] See also Figure 2 , Figure 2 This is a flowchart of a method for accessing a security service provided by the present application, which may include the following steps:

[0032] Step 201: Receive a first access message for a first security service forwarded by a network security device.

[0033] Among them, the first access message is obtained and sent by the network security device after receiving the second access message with the destination address being a public network address sent by the user device, and the second access message is NAT converted according to the maintained correspondence between the public network address and the access address of the access system of the security service. The public network address carried by the second access message is the public network address that the domain name server feeds back to the user device according to the mapping relationship between the wild-card domain name and the public network address after receiving the domain name request message sent by the user device and recognizing that the requested request domain name includes the primary domain name of the wild-card domain name.

[0034] In this step, when the user accesses the first security service through the user terminal, it needs to go through the domain name server and the network security device. In order to solve the problem that the network security device is exposed to too many ports on the public network, which leads to a surge in security risks, this embodiment proposes that the domain name server stores the correspondence between the wildcard domain name constructed based on the primary domain name of the access security service and the public network address exposed to the outside by the network security device. The above public network address includes an IP address and a port. Based on this, before the user device accesses the first security service, it first sends the above domain name request message to the domain name server. The domain name request message carries the requested domain name, which is recorded as the requested domain name. In this way, after receiving the domain name request message sent by the user terminal, the domain name server can perform the following process: the domain name server parses the above request domain name from the domain name request message; then matches the request domain name with the above wildcard domain name. If it is found that the request domain name includes the primary domain name of the wildcard domain name, the domain name server can feedback the public network address corresponding to the above wildcard domain name to the user device according to the correspondence between the above wildcard domain name and the public network address maintained locally.

[0035] On this basis, the user device can construct an access message to access the first security service, that is, the second access message whose destination address is the public network address, and then send the second access message to the network security device corresponding to the public network address. In this way, it can be ensured that the access messages of each request domain name including the primary domain name of the wild-name domain name can be mapped to the public network address corresponding to the same wild-name domain name when sent to the network security device. In other words, the network security device only needs to expose the public network address corresponding to the wild-name domain name, thereby solving the problem of excessive exposure of public network addresses caused by exposing a public network address for the IP address of each message, and thus avoiding the problem of increased network security risks caused by excessive exposure of public network addresses.

[0036] In order to enable users to successfully access the requested security services, the network security device can also maintain the correspondence between the above-mentioned public network address and the access address of the access system of the security service. The access address is the entry address for entering the access system of the security service, and the access system of the security service includes virtual machines of each security service.

[0037] On this basis, after receiving the second access message, the network security device can perform the NAT conversion process. Specifically, when performing NAT conversion, the public network address can be used to perform the NAT conversion process, and the destination address of the second access message can be converted from the public network address to the access address corresponding to the public network address.

[0038] To better understand this step, the requested domain name requested by the domain name request message is abcdefg.test.com, and the wildcard domain name recorded in the domain name server is *.test.com. The corresponding relationship between the wildcard domain name and the public network address is shown in Table 1.

[0039] Table 1

[0040] Wildcard domain name Public network address *.test.com 7.7.7.1:3000 …… ……

[0041] On this basis, it can be identified that the above-mentioned request domain name includes the primary domain name "test.com" of the above-mentioned wildcard domain name, and then based on the corresponding relationship in Table 1, the public network address can be obtained as 7.7.7.1:3000. Based on this, the public network address can be used to perform message forwarding processing, that is, a second access message for accessing the first security service is constructed with the public network address as the destination address, and then the second access message is forwarded to the network security device. In this way, the network security device only needs to expose a public network address to the access message containing the primary domain name of the same wildcard domain name, thereby solving the problem of excessive exposure of public network addresses.

[0042] In addition, in order to enable users to successfully access the requested security services, the present application provides a security service access system, which may include virtual machines for each managed security service. In addition, the security services managed by the system can be dynamically updated. Since the above system manages a large number of security services, in order to ensure the security of each security service, this embodiment does not expose the management address of each security service, but provides the system entry address to the network security device. Based on this, the mapping relationship shown in Table 2 can be recorded in the network security device, which is the correspondence between the public network address and the entry address of the access system of the above security service.

[0043] Table 2

[0044] Public network address Access address (entry address) 7.7.7.1:3000 192.168.0.2.6000

[0045] On this basis, based on the above correspondence, the network security device can perform NAT conversion processing, that is, the destination address of the second access message is NAT converted so that the destination address of the converted first access message is the above entry address 192.168.0.2.6000, and then the first access message can be forwarded, thereby ensuring that the first access message successfully reaches the access system of the above security service and ensuring the security of the security service.

[0046] Step 202: Use the request domain name in the first access message to obtain a configuration file containing the request domain name.

[0047] Specifically, since the address of the virtual machine of the security service is not exposed to the user or the network security device, in order to enable the user to successfully access the security service and then configure the security service, this application proposes to access the virtual machine of the security service based on the domain name. Based on this, this embodiment proposes to pre-record the configuration files of each activated security service locally, and the configuration file of each security service records the request domain name required to access the security service, and different security services correspond to different request domain names.

[0048] On this basis, in this step, the requested domain name is first extracted from the first access message, and then the requested domain name is used to traverse various configuration files to query the configuration file containing the requested domain name.

[0049] In addition, for the convenience of searching, the correspondence between the requested domain name and the location information of the corresponding configuration file can also be recorded. In this way, after obtaining the requested domain name from the first access message, based on the above correspondence, the location information corresponding to the obtained request domain name can be found, and then the corresponding configuration file can be found based on the location information.

[0050] Step 203: Access the virtual machine of the first security service by using the management address of the first security service recorded in the configuration file.

[0051] In this step, after obtaining the above configuration file, the management address of the first security service recorded in the configuration file can be found, and the virtual machine of the first security service can be successfully accessed through the management address. For example, the first access message is sent to the virtual machine corresponding to the above management address, thereby achieving access to the first security service.

[0052] On this basis, after receiving the first access message, the virtual machine of the first security service can respond to the first access message, for example, by feeding back the management page of the first security service to the user through the network security device. Then, the user can manage the first security service based on the management page.

[0053] In implementing the access method for the security service provided in the present application, a first access message for a first security service forwarded by a network security device is received, and a configuration file containing the requested domain name is obtained using the requested domain name in the first access message; and a management address of the first security service recorded in the configuration file is used to access the virtual machine of the first security service.

[0054] Since the above-mentioned first access message is obtained and sent by the network security device after receiving the second access message with the destination address being a public network address sent by the user device, the second access message is NAT-converted according to the maintained correspondence between the public network address and the access address of the access system of the security service, and the public network address carried by the second access message is the domain name server, after receiving the domain name request message sent by the user device, if it is identified that the requested request domain name includes the primary domain name of the wildcard domain name, then the domain name server feeds back to the user device according to the mapping relationship between the wildcard domain name and the public network address; as a result, each access message including the primary domain name of the wildcard domain name in the request domain name can share a public network address, that is, the network security device only needs to expose a public network address under the request domain name to the outside, This also solves the problem of high security risks caused by network security devices exposing too many public network addresses. In addition, although the network security device exposes a public network address under the above-mentioned wildcard domain name, the network security device records the correspondence between the public network address and the access address of the access system of the security service. Therefore, based on the correspondence, the access message can smoothly reach the above-mentioned access system. The above-mentioned access system includes a virtual machine of the security service. Therefore, after the access message reaches the above-mentioned access system, the access system can successfully find the management address of the virtual machine of the security service based on the requested domain name, and then realize access to the virtual machine. Furthermore, since there is no need for operation and maintenance personnel to frequently configure the mapping relationship between the exposed public network addresses and the addresses of the virtual machines, the access cost of the security service is greatly reduced.

[0055] Optionally, based on the above embodiments, in this embodiment, step 203 can be performed according to the following process: identifying and processing the access URL in the first access message; when the access URL is identified as the specified URL in the configuration file, obtaining the management address recorded under the specified URL; and forwarding the first access message to the virtual machine corresponding to the obtained management address.

[0056] Specifically, in actual applications, when a user accesses a security service, there are requirements for the access URL during the user's access process. Only the URL specified in the configuration file can be successfully sent to the virtual machine of the security service. This is especially suitable for users who access the first security service for the first time. Since the user accesses the first security service for the first time, it is impossible to obtain the set key-value pair corresponding to the first security service for maintaining a long connection. Therefore, the user can carry the above-mentioned specified URL in the first access message to access the first security service. Based on this, this embodiment proposes to identify and process the access URL of the first access message. If the access URL is a specified URL, since the management address of the virtual machine of the first security service is configured under the specified URL in the configuration file, the management address can be obtained, and then the first access message is sent to the management address.

[0057] Optionally, the designated URL may be as follows: ... / api / oauth2 / login-url, based on which it can be determined whether the access URL in the first access message includes the set string " / api / oauth2 / login-url", and if so, the access URL is determined to be the designated URL. Otherwise, the access URL is determined not to be the designated URL.

[0058] Specifically, the URL and management address specified in the above configuration file can be displayed in the format shown below, taking the management address as the IP address and port of the virtual machine as an example. Based on this, by querying the location in the configuration file, the IP address and port of the virtual machine can be quickly found.

[0059] location / api / oauth2 / login-url{

[0060] proxy_pass virtual machine's IP address

[0061] The port of the proxy_redirect virtual machine

[0062] }

[0063] Furthermore, this embodiment proposes that if the access URL is not a designated URL and the cookie in the first access message does not carry a set key-value pair, an access page of the access system of the security service is output.

[0064] Specifically, when the above-mentioned first access message is not a specified URL, and the cookie of the first access message does not carry the set key-value pair fed back by the access system, based on this, in order to ensure the security of the virtual machine of the first security service, the access system of the security service can feed back the access page output of the access system of the security service to the user, so that the user can obtain the above-mentioned set string in the above-mentioned specified URL from the access system of the security service, so that the user can reconstruct the access URL based on the set string and continue to execute the access process of the first security access.

[0065] Specifically, when a request is initiated for a specified single sign-on link, a specified cookie (a key-value pair) is added to the http request. When other requests are linked in, the set key-value pair is verified. If the verification fails, the login page of the access system that is adjusted to the security service is displayed. When a single sign-on is initiated from the access system, the specified single sign-on link is assembled, and the set key-value pair can be obtained and accessed normally.

[0066] Furthermore, this embodiment proposes that if the access URL is not a specified URL, then when the cookie in the above-mentioned first access message carries a set key-value pair, the first access message is sent to the virtual machine corresponding to the management address where the set key-value pair is located in the configuration file.

[0067] Specifically, when the above-mentioned first access message is not a specified URL, but the cookie in the first access message carries the set key-value pair corresponding to the first security service, then since the set key-value pair in the cookie is used to ensure the correctness of the access and the long connection, based on this, when the cookie in the above-mentioned first access message carries the above-mentioned set key-value pair, it indicates that the user device may have previously accessed the virtual machine of the first security service, so at this time, the first access message can be directly sent to the virtual machine corresponding to the management address under the set key-value pair in the above-mentioned configuration file.

[0068] Specifically, the above configuration file also provides a configuration format for non-specified URLs, as shown below. Among them, location / indicates that all access URLs can be matched, that is, access URLs other than the specified URL can match the location / string. On this basis, if it is determined that the cookie of the first access message does not carry the set key-value pair, the return line is executed, that is, the access page corresponding to the access address of the access system of the security service is output; if it is determined that the cookie of the first access message carries the set key-value pair, the IP address and port of the virtual machine are obtained from proxy_pass and proxy_redirect, and then the first access message is forwarded to the virtual machine corresponding to the IP address and port, thereby realizing the management of the first security service.

[0069] location / {

[0070] if($http_cookie!~*"Set key-value pair")

[0071] Return 302 The access address of the access system of the security service;

[0072] }

[0073] proxy_pass virtual machine's IP address

[0074] The port of the proxy_redirect virtual machine

[0075] Based on any of the above embodiments, the method for accessing the security service provided in this embodiment may also include the following process: after receiving an indication of activation of a second security service, creating a new virtual machine and associating the new virtual machine with the second security service; obtaining a pre-generated configuration file template; writing the management address of the new virtual machine to the corresponding position under the specified URL in the configuration file template and to the position where the key-value pair is set in the configuration file template; generating a request domain name for the second security service; writing the request domain name for the second security service to the position where the service name is located in the configuration file template to obtain a configuration file for the second security service.

[0076] Specifically, the second security service can be any security service maintained by the access system of the security service. On this basis, when the user expects to activate the second security service, in one embodiment, the user can initiate an activation request for the second security service to the operation and maintenance personnel; after receiving the activation request, the operation and maintenance personnel can initiate an activation instruction to the access system of the security service, and after receiving the activation instruction, the system creates a new virtual machine locally; then the operation and maintenance personnel maintain the virtual machine information of the created virtual machine to the access system of the security service, so as to facilitate the access system to manage the virtual machine of the second security service for subsequent users. The above virtual machine information can include, but is not limited to, the name, specifications, protocol, management address of the virtual machine, user information of the above user, etc. The management address of the virtual machine can include an IP address and port, and the user information can include, but is not limited to, a user name and login password.

[0077] Afterwards, the operation and maintenance personnel create a second security service on the access system, and then associate the created second security service with the created new virtual machine so that the new virtual machine provides service support for the second security service. After the second security service is associated with the new virtual machine, a configuration file for the second security service can be generated to facilitate subsequent access and management of the second security service.

[0078] When generating a configuration file for the second security service, this embodiment proposes to pre-configure a configuration file template, in which a setting location for writing the management address of the virtual machine is included, that is, a setting location under a specified URL; in addition, the setting location may also include a setting location for setting a key-value pair. For example, the location of proxy_pass and proxy_redirect in the structure shown in the location / , and the location of proxy_pass and proxy_redirect in the structure shown in the location / api / oauth2 / login-url.

[0079] On this basis, when generating the configuration file of the second security service, the configuration file template is first copied, and then the following process is performed based on the copied configuration file template: the management address of the above new virtual machine is written to the above set location.

[0080] In addition, in order to facilitate the acquisition of the configuration file of the security service during the access process of the security service, the configuration file template also provides a field for the service name (server_name). On this basis, the request domain name of the second security service is generated. It should be noted that different security services correspond to different request domain names, and the request domain name is used to uniquely identify the corresponding security service. In this way, the request domain name of the second security service can be written to the location of server_name in the configuration file template, as shown below, indicating that the request domain name of the second security service is abcdefg, which further indicates that the configuration file only processes access messages with a request domain name of abcdefg.

[0081] server_name abcdefg

[0082] After the management address of the new virtual machine and the request domain name of the second security service are written into the configuration file template, the configuration file of the second security service can be obtained.

[0083] It should be noted that the user may need to frequently interact with the virtual machine of the second security service, so a key-value pair is set to maintain a long connection between the user's user device and the virtual machine of the second security service. However, when the user accesses the virtual machine of the second security service for the first time, the cookie in the access message does not carry the key-value pair. The reason is that the key-value pair is issued by the server, that is, the access system. Therefore, for the access message for the first access to the second security service, the user is required to carry the specified URL to execute the access process. In this way, when the specified URL is matched, the access message can also be forwarded to the virtual machine corresponding to the management address under the specified URL; in addition, in order to facilitate the user's subsequent access, a set key-value pair for accessing the second security service can also be added to the configuration file, for example, through the following process:

[0084] add_header Set-Cookie "omp_sso_ck=sso;path= / "

[0085] It should be noted that the above-mentioned addition of the setting key-value pair is only an example and does not constitute a specific limitation on the setting key-value pair of the second security service. In addition, the setting key-value pairs in the configuration files of different security services are different to uniquely represent their respective security services.

[0086] In another embodiment, the user may also directly send an activation request to the access system of the security service, that is, the operation of the operation and maintenance personnel in the above embodiment is automatically implemented in the access system, thereby realizing the automated activation process of the security service.

[0087] It should be noted that the activation process of the first security service is consistent with the activation process of the second security service described above, and will not be described in detail here.

[0088] Furthermore, the step of generating a request domain name for a second security service may be performed according to the following process: using a set algorithm to generate a character string of a set bit width; removing separators in the character string to obtain a new character string; concatenating the new character string with the wildcard domain name corresponding to the second security service to obtain the request domain name.

[0089] Specifically, the above setting algorithm can be a UUID (Universally Unique Identifier) ​​algorithm, and the above setting bit width can be but not limited to 32 bits. In addition, since the string is used to construct the request domain name, and the request domain name is used to access the second security service, in order to avoid affecting the normal access of the http link, this embodiment proposes to identify the generated string, and when it is identified that there is a separator "-" in the string, the separator is removed from the string, thereby obtaining a new string. Then the new string is spliced ​​with the wildcard domain name used to implement the second security service, thereby obtaining the request domain name of the second security service. For example, the new string with the separator removed is represented by the string A, and the wildcard domain name is represented by .test.com, then the obtained request domain name can be represented by the string A.test.com. In this way, since the name of the configuration file includes the string A in the request domain name, when searching for the configuration file based on the request domain name, the configuration file can be searched by querying the name of the configuration file first, which can improve the search speed of the configuration file, and then the domain name at the location of server_name in the configuration file is used to uniquely identify the configuration file of the request domain name requested by the user.

[0090] It should be noted that the above configuration file can be a configuration file based on nginx. On this basis, the name of the configuration file of the second security service can be named based on the string A to facilitate the subsequent search for the configuration file. The name of the second configuration file can be the string A and nginx concatenated, such as the string A.nginx. For example, the name of the configuration file template is template.nginx, and the name of the configuration file of the second security service can be the string A replacing the "template" in "template.nginx".

[0091] After generating the configuration file of the second security service, in order to make the configuration file take effect, you can restart the above nginx service.

[0092] Furthermore, the method for accessing the security service provided in this embodiment may also include the following process: sending a login address for logging into the virtual machine of the second security service to the user, wherein the login address includes a request domain name of the second security service.

[0093] Specifically, in order to facilitate the user to subsequently access the second security service, a login address can be generated based on the request domain name of the second security service, and then the login address is sent to the user's user device. In this way, the user device can extract the request domain name according to the login address.

[0094] Optionally, the above login address can be generated according to the following method: send a login request to the virtual machine of the second security service; receive a login token fed back by the virtual machine; concatenate the requested domain name with the specified URL and the login token to obtain the login address.

[0095] Specifically, when a user logs in to the second security service, he can first send a login request to the access system of the security service to log in to the second security service through the system. After receiving the login request, the access system can obtain the user information of the user, and initiate a login request to the virtual machine of the second security service based on the user information. In order to ensure the security of subsequent access, the virtual machine will feedback a login token to the access system, and then build a login request based on the login token, the request domain name of the second security service and the specified URL. For example, the login token is token, the request domain name is the string A.test.com, and the specified URL is / api / oauth2 / login-url, then the generated login address (also called login link) can be expressed as the string A.test.com / api / oauth2 / login-url? token. Based on this, the user can automatically open the login link through the browser of the user device, that is, to achieve single sign-on, and then initiate an access message to achieve access and management of the second security service.

[0096] In addition, when the assembly rules of the single sign-on link and token are not made public, users cannot access the virtual machine of the security service only through the domain name, thereby improving the security of users' access to the security service.

[0097] Based on the same inventive concept, the present application also provides a security service access system, referring to Figure 3 The structure diagram of the access system of the security service shown in FIG. The system may include a management module, a forwarding module and virtual machines corresponding to each security service, wherein:

[0098] The management module receives a first access message of a first security service forwarded by a network security device, wherein the first access message is obtained and sent by the network security device after receiving a second access message with a destination address being a public network address sent by a user device, and performing NAT conversion on the second access message according to the maintained correspondence between the public network address and the access address of the access system of the security service, and the public network address carried by the second access message is fed back to the user device according to the mapping relationship between the wildcard domain name and the public network address by the domain name server after receiving a domain name request message sent by the user device, if it is identified that the requested request domain name includes the primary domain name of the wildcard domain name;

[0099] The management module is further configured to forward the first access message to the forwarding module;

[0100] The forwarding module is further configured to obtain a configuration file containing the requested domain name using the requested domain name in the first access message; and access the virtual machine of the first security service using the management address of the first security service recorded in the configuration file.

[0101] The forwarding module may have, but is not limited to, nginx functions.

[0102] Optionally, the above-mentioned forwarding module is specifically used to identify and process the access URL in the first access message; when the access URL is identified as the specified URL in the configuration file, the management address recorded under the specified URL is obtained; and the first access message is forwarded to the virtual machine corresponding to the obtained management address.

[0103] Furthermore, the forwarding module is further configured to output an access page of the access system of the security service if the access URL is not the specified URL and the cookie in the first access message does not carry a set key-value pair;

[0104] If the access URL is not the designated URL, and the cookie in the first access message carries a set key-value pair, the first access message is sent to the virtual machine corresponding to the management address at the location of the set key-value pair in the configuration file.

[0105] Optionally, in this embodiment, the management module is further used to, after receiving an activation instruction for the second security service, create a new virtual machine and associate the new virtual machine with the second security service; obtain a pre-generated configuration file template; write the management address of the new virtual machine to a corresponding position under a specified URL in the configuration file template and to a position where a key-value pair is set in the configuration file template; generate a request domain name for the second security service; write the request domain name for the second security service to a position where a service name is located in the configuration file template to obtain a configuration file for the second security service;

[0106] The management module is further used to send the configuration file of the second security service to the forwarding module.

[0107] On this basis, the above-mentioned management module is specifically used to generate a character string of a set bit width using a set algorithm; remove the separator in the character string to obtain a new character string; and concatenate the new character string with the wildcard domain name corresponding to the second security service to obtain the requested domain name.

[0108] Optionally, in this embodiment, the management module is further used to send a login address of a virtual machine used to log in to the second security service to the user, where the login address includes a request domain name of the second security service.

[0109] Optionally, in this embodiment, the above-mentioned management module is also used to send a login request to the virtual machine of the second security service; receive a login token fed back by the virtual machine; and concatenate the requested domain name with the specified URL and the login token to obtain the login address.

[0110] It should be noted that the access system of the above security services can be deployed in the cloud.

[0111] In order to better understand this embodiment, Figure 4 The application scenario shown is used as an example for explanation. In this application scenario, the network security device is a firewall device as an example for explanation, and Figure 4 The security service access system in the example includes a management module, a forwarding module, and virtual machines of various security services, and the forwarding module is also described as an example of the nginx module.

[0112] Step 1: When the user activates security service 1 and security service 2 respectively, the management module can receive activation instructions for the two security services respectively, and generate request domain names for security service 1 and security service 2 respectively, for example Figure 4The request domain name of security service 1 shown in the figure is: a0f28c1bc3f34e128b3460e309c8b5b9.test.com, and the request domain name of security service 2 is 9b4d865aa76d439a95e8082dbb6cbadb.test.com. The management module feeds back the request domain names of security service 1 and security service 2 to the user device in the form of login addresses.

[0113] Step 2: When the user needs to manage security service 1, he can first initiate a domain name access message to the domain name server, and the domain name access message carries the requested request domain name.

[0114] Step 3. After receiving the above domain name access message, the domain name server can extract the requested domain name, and then match the requested domain name with the wildcard domain name. If it is found that the requested domain name includes the primary domain name "test.com" of the wildcard domain name "*.test.com", based on the mapping relationship between the wildcard domain name *.test.com and the public network address 7.7.7.1, the public network address 7.7.7.1 is sent to the user device.

[0115] Step 4: After receiving the public network address 7.7.7.1, the user device can initiate an access message for security service 1 to the firewall device. The destination address of the access message is the public network address 7.7.7.1.

[0116] Step 5. After receiving the access message, the firewall device can extract the public network address 7.7.7.1, and then based on the correspondence between the locally maintained public network address 7.7.7.1 and the access address 192.168.0.2:6000 (the access address of the management module) of the access system of the security service, modify the destination address of the access message to the access address 192.168.0.2:6000 to obtain a first access message; and send the first access message to the management module in the access system of the security service.

[0117] Step 6: After receiving the first access message, the management module may send the first access message to the nginx module.

[0118] Step 7, the nginx module parses the requested domain name from the first access message, that is, the above-mentioned a0f28c1bc3f34e128b3460e309c8b5b9.test.com, and uses the requested domain name to match each configuration file, and then identifies the domain name where the server_name in the configuration file is located, and finds the configuration file that protects the requested domain name.

[0119] Step 8. The nginx module obtains the access URL from the first access message, and compares the access URL with the specified URL / api / oauth2 / login-url in the found configuration file. When the comparison is consistent, the management address (192.168.0.1:443) under the specified URL / api / oauth2 / login-url is used as the destination address of the first access message, and then sent to the virtual machine of security service 1.

[0120] Step 9: After receiving the access message, the virtual machine of security service 1 can send the management page of security service 1 to the user device to enable the user to manage and configure security service 1.

[0121] Therefore, by configuring different request domain names for different security services in the nginx module, the corresponding security services can be uniquely represented, and then the virtual machines corresponding to the security services can be uniquely represented. In addition, by maintaining the relationship between the wildcard domain name and the public network address in the domain name server, the firewall device only needs to expose one public network address to the outside for the access message containing the request domain name of the same wildcard domain name, thereby greatly reducing the security risks caused by excessive exposure of the public network address. In addition, since the firewall device only needs to configure the corresponding relationship between the above-mentioned public network address and the access address of the access system of the security service, and it can be achieved with a one-time configuration, even if the security service is subsequently opened, there is no need to configure the firewall device again, thereby reducing the configuration pressure. Furthermore, the present application uses the set key value and the specified URL in the cookie to verify the access message, and the access message can only be sent to the virtual machine of the security service after the verification is passed, thereby enhancing the access security of the access message.

[0122] Based on the same inventive concept, the embodiment of the present application provides an electronic device, such as Figure 5 As shown, the electronic device includes a processor 501 and a machine-readable storage medium 502, wherein the machine-readable storage medium 502 stores a computer program that can be executed by the processor 501, and the processor 501 is prompted by the computer program to execute the access method of the security service provided by any embodiment of the present application. In addition, the electronic device also includes a communication interface 503 and a communication bus 504, wherein the processor 501, the communication interface 503, and the machine-readable storage medium 502 communicate with each other through the communication bus 504.

[0123] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0124] The communication interface is used for communication between the above electronic device and other devices.

[0125] The machine-readable storage medium 502 may be a memory, which may include a random access memory (RAM), a DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory), or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the processor.

[0126] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0127] In addition, this embodiment also provides a machine-readable storage medium, which stores a computer program. When called and executed by a processor, the computer program prompts the processor to execute the method provided by any embodiment of the present application.

[0128] As for the electronic device and machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0129] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0130] The implementation process of the functions and effects of each unit / module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0131] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units / modules described as separate components may or may not be physically separated, and the components displayed as units / modules may or may not be physical units / modules, that is, they may be located in one place, or they may be distributed on multiple network units / modules. Some or all of the units / modules may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art can understand and implement it without creative work.

[0132] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for accessing a security service, characterized in that: In an access system applied to a security service, the access system includes a virtual machine of the security service, and the method includes: Receive a first access message of a first security service forwarded by a network security device, the first access message being obtained and sent by the network security device after receiving a second access message with a destination address being a public network address sent by a user device, by performing NAT conversion on the second access message according to the maintained correspondence between the public network address and the access address of the access system of the security service, the public network address carried by the second access message being fed back to the user device according to the mapping relationship between the wildcard domain name and the public network address by the domain name server after receiving a domain name request message sent by the user device, if it is identified that the requested request domain name includes a primary domain name of a wildcard domain name; Using the request domain name in the first access message, obtaining a configuration file containing the request domain name; The virtual machine of the first security service is accessed by using the management address of the first security service recorded in the configuration file.

2. The method according to claim 1, characterized in that Using the management address of the first security service recorded in the configuration file to access the virtual machine of the first security service includes: Identify and process the access URL in the first access message; When the access URL is identified as a designated URL in the configuration file, the management address recorded under the designated URL is obtained; The first access message is forwarded to the virtual machine corresponding to the acquired management address.

3. The method according to claim 2, characterized in that Also includes: If the access URL is not the specified URL, and the cookie in the first access message does not carry a set key-value pair, outputting an access page of the access system of the security service; If the access URL is not the designated URL, and the cookie in the first access message carries a set key-value pair, the first access message is sent to the virtual machine corresponding to the management address at the location of the set key-value pair in the configuration file.

4. The method according to claim 1, characterized in that: Also includes: After receiving an activation instruction of the second security service, creating a new virtual machine, and associating the new virtual machine with the second security service; Get pre-generated configuration file templates; Writing the management address of the new virtual machine into the corresponding position under the specified URL in the configuration file template and the position where the key-value pair is set in the configuration file template; Generate a request domain name for the second security service; The request domain name of the second security service is written into the location of the service name in the configuration file template to obtain the configuration file of the second security service.

5. The method according to claim 4, characterized in that Generating a request domain name for the second security service includes: Generate a character string of set bit width using a set algorithm; Remove the separator in the string to obtain a new string; The new character string is concatenated with the wildcard domain name corresponding to the second security service to obtain the requested domain name.

6. The method according to claim 4, characterized in that Also includes: A login address of the virtual machine used to log in to the second security service is sent to the user, where the login address includes a request domain name of the second security service.

7. The method according to claim 6, characterized in that The method for generating the login address is: Sending a login request to the virtual machine of the second security service; Receive a login token fed back by the virtual machine; The requested domain name is concatenated with the specified URL and the login token to obtain the login address.

8. A security service access system, characterized in that: include: The management module, forwarding module and virtual machines corresponding to each security service, including: The management module receives a first access message of a first security service forwarded by a network security device, wherein the first access message is obtained and sent by the network security device after receiving a second access message with a destination address being a public network address sent by a user device, and performing NAT conversion on the second access message according to the maintained correspondence between the public network address and the access address of the access system of the security service, and the public network address carried by the second access message is fed back to the user device according to the mapping relationship between the wildcard domain name and the public network address by the domain name server after receiving a domain name request message sent by the user device, if it is identified that the requested request domain name includes a primary domain name of a wildcard domain name; The management module is further configured to forward the first access message to the forwarding module; The forwarding module is further used to use the request domain name in the first access message to obtain a configuration file containing the request domain name; and use the management address of the first security service recorded in the configuration file to access the virtual machine of the first security service.

9. The system according to claim 8, characterized in that The forwarding module is specifically used to identify and process the access URL in the first access message; when the access URL is identified as the specified URL in the configuration file, the management address recorded under the specified URL is obtained; and the first access message is forwarded to the virtual machine corresponding to the obtained management address.

10. The system according to claim 9, characterized in that The forwarding module is further configured to output an access page of the access system of the security service if the access URL is not the specified URL and the cookie in the first access message does not carry a set key-value pair; If the access URL is not the designated URL, and the cookie in the first access message carries a set key-value pair, the first access message is sent to the virtual machine corresponding to the management address at the location of the set key-value pair in the configuration file.

11. The system according to claim 8, characterized in that The management module is further configured to, after receiving an activation instruction of the second security service, create a new virtual machine and associate the new virtual machine with the second security service; and obtain a pre-generated configuration file template; Writing the management address of the new virtual machine into the corresponding position under the specified URL in the configuration file template and the position where the key-value pair is set in the configuration file template; Generate a request domain name for the second security service; Writing the request domain name of the second security service into the location of the service name in the configuration file template to obtain a configuration file of the second security service; The management module is further used to send the configuration file of the second security service to the forwarding module.

12. The system according to claim 11, characterized in that The management module is specifically used to generate a character string with a set bit width using a set algorithm; remove the separator in the character string to obtain a new character string; and concatenate the new character string with the wildcard domain name corresponding to the second security service to obtain the requested domain name.

13. The system according to claim 11, characterized in that The management module is further used to send a login address of the virtual machine used to log in to the second security service to the user, where the login address includes a request domain name of the second security service.

14. The system according to claim 12, characterized in that The management module is also used to send a login request to the virtual machine of the second security service; receive a login token fed back by the virtual machine; and concatenate the request domain name with the specified URL and the login token to obtain the login address.

Citation Information

Cited By

  • Cloud platform and configuration method and configuration device thereof

    CN119603356A

  • Safety management method and device

    CN119652644A

  • Encrypted dual-channel spread spectrum communication method and system based on chaotic orthogonal coding

    CN120979477A