Method and device for establishing anonymous tunnel
By dynamically generating and updating anonymous tunnel credentials, using the encryption and decryption mechanism of public and private keys, the problem of leaking anonymous tunnel authentication credentials is solved, and network security performance is improved.
Patent Information
- Application Number
- CN202411098829.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-15
AI Technical Summary
In the prior art, the authentication credential information of anonymous tunnels is easily leaked, resulting in increased network security risks and cannot be invalidated and updated in a timely manner.
By determining the public and private keys corresponding to the client, receiving the anonymous tunnel credential request sent by the client and the encrypted target key, generating and sending the decrypted anonymous tunnel credentials, which are used to establish the Anonymous tunnel, enabling dynamic updates and encryption protection.
It improves the reliability and security of anonymous tunnels between the client and the gateway, reduces the risk of authentication credential leakage, and improves the security performance of the network.
Smart Images

Figure CN118972128A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a method and device for establishing an anonymous tunnel. Background Art
[0002] Zero Trust Access is a network security model that assumes that every device or user within the network may be a potential risk, does not automatically grant trust, and always requires any form of verification and authorization to access network resources. The two principles of Zero Trust Access are the principle of least privilege and the principle of continuous verification.
[0003] In related technologies, users need to log in to the zero-trust client installed on the terminal device before they can perform zero-trust access. In order to maximize the security of user services and access, the user's login authentication page or application programming interface (API) is not directly exposed to the public network. When the user logs in, the client and the zero-trust gateway need to first establish an anonymous tunnel, and complete the interactive communication with the intranet authentication service through the anonymous tunnel. Establishing an anonymous tunnel is a basic authentication operation, which usually involves setting a fixed authentication credential information in the client, such as: account and account password, or AK / SK (Access Key Id / Secret Access Key). When the client is started, the authentication credential information is used to establish an anonymous tunnel to the zero-trust gateway, and after the zero-trust gateway channel is authenticated, the anonymous tunnel is successfully established.
[0004] However, in the related art, the authentication credential information is built into the client. If the client is cracked, the authentication credential information is at risk of being leaked. When the authentication credential information is leaked, the leaked authentication credential information cannot be invalidated or updated in time, which increases the security risk of the network. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device, computer equipment, readable storage medium and program product for establishing an anonymous tunnel that can improve the security performance of the network in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for establishing an anonymous tunnel, which is applied to a controller and includes:
[0007] Receive a public key request sent by a client, determine a public key and a private key corresponding to the client; and return the public key to the client, so that the client encrypts the target key by using the public key to obtain the encrypted target key;
[0008] Receiving the anonymous tunnel credential request and the encrypted target key sent by the client; decrypting the encrypted target key based on the private key to obtain a decrypted target key;
[0009] The anonymous tunnel credential carrying the decrypted target key is sent to the client, and the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0010] In one embodiment, returning the public key corresponding to the client to the client includes:
[0011] Receiving terminal information sent by the client, performing compliance detection on the terminal information based on a preset compliance policy, and obtaining a compliance detection result of the client;
[0012] If the compliance detection result meets the preset compliance condition, the public key corresponding to the client is returned to the client.
[0013] In one embodiment, determining a public key and a private key corresponding to the client includes:
[0014] When a first preset update condition is met, a public key and a private key corresponding to the client are generated, wherein the first preset update condition is reaching a first update time interval and / or receiving an abnormal signal from the controller;
[0015] Alternatively, in the relationship between the client and the public-private key pair, the public key and the private key corresponding to the client are determined.
[0016] In one embodiment, the method further comprises:
[0017] When the second preset update condition is met, generating the anonymous tunnel credential corresponding to the client, wherein the second preset update condition is reaching a second update time interval and / or receiving an abnormal signal from the controller;
[0018] Alternatively, in the relationship between the client and the anonymous tunnel credential, the anonymous tunnel credential corresponding to the client is determined.
[0019] In a second aspect, the present application provides a method for establishing an anonymous tunnel, which is applied to a client and includes:
[0020] Send a public key request to the controller;
[0021] Receiving the public key corresponding to the client, and encrypting the target key by using the public key to obtain the encrypted target key;
[0022] Sending the encrypted target key and an anonymous tunnel credential request to the controller so that the controller decrypts the encrypted target key to obtain a decrypted target key;
[0023] An anonymous tunnel credential carrying the decrypted target key is received, where the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0024] In one embodiment, the method further comprises:
[0025] The target key is used to decrypt the anonymous tunnel credential carrying the decrypted target key to obtain the anonymous tunnel credential, and the anonymous tunnel credential is sent to the gateway.
[0026] In one embodiment, the method further comprises:
[0027] The terminal information is sent to the controller, so that the controller performs compliance detection on the client based on the terminal information to obtain a compliance detection result of the client.
[0028] In one embodiment, the method further comprises:
[0029] When the anonymous tunnel is successfully established, in response to the login operation, a login authentication request is sent to the gateway through the anonymous tunnel, so that the gateway determines the compliance detection result corresponding to the client, sends the login authentication request to the intranet authentication terminal based on the compliance detection result, and receives the authentication result corresponding to the login authentication request.
[0030] In a third aspect, the present application further provides a device for establishing an anonymous tunnel, which is applied to a controller and includes:
[0031] A first determination module is used to receive a public key request sent by a client, determine a public key and a private key corresponding to the client, and return the public key to the client, so that the client encrypts the target key by using the public key to obtain the encrypted target key;
[0032] A first receiving module is configured to receive the anonymous tunnel credential request and the encrypted target key sent by the client; decrypt the encrypted target key based on the private key to obtain a decrypted target key;
[0033] The first sending module is used to send the anonymous tunnel credential carrying the decrypted target key to the client, and the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0034] In a fourth aspect, the present application further provides a device for establishing an anonymous tunnel, which is applied to a client and includes:
[0035] The second determination module is used to send a public key request to the controller; receive the public key corresponding to the client, and encrypt the target key by using the public key to obtain the encrypted target key;
[0036] A second sending module, used for sending the encrypted target key and an anonymous tunnel credential request to the controller, so that the controller decrypts the encrypted target key to obtain a decrypted target key;
[0037] The second receiving module is used to receive an anonymous tunnel credential carrying the decrypted target key, where the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0038] In a fifth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in each method embodiment in the first aspect or the second aspect when executing the computer program.
[0039] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in each method embodiment in the first aspect or the second aspect are implemented.
[0040] In a seventh aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps in the method embodiments in the first aspect or the second aspect.
[0041] The above-mentioned anonymous tunnel establishment method and device, by determining the public key and private key corresponding to the client, receives the anonymous tunnel credential request and the encrypted target key sent by the client, and determines the anonymous tunnel credential corresponding to the client, establishes an anonymous tunnel between the client and the gateway through the anonymous tunnel credential, realizes the generation of anonymous tunnel credentials through the controller, improves the reliability and security of the anonymous tunnel between the client and the gateway, and thus improves the security performance of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1FIG. 1 is an application environment diagram of a method for establishing an anonymous tunnel in one embodiment;
[0044] Figure 2 A schematic diagram of a flow chart of a method for establishing an anonymous tunnel in an embodiment;
[0045] Figure 3 A schematic diagram of a flow chart of a method for establishing an anonymous tunnel in an embodiment;
[0046] Figure 4 is a timing diagram of a method for establishing an anonymous tunnel in one embodiment;
[0047] Figure 5 is a structural block diagram of a device for establishing an anonymous tunnel in one embodiment;
[0048] Figure 6 is a structural block diagram of a device for establishing an anonymous tunnel in one embodiment;
[0049] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] The zero-access authentication method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in FIG. 1 , the client can communicate with the server. The client can be installed on a terminal device. The controller, database, gateway and intranet authentication terminal can be integrated in the server. The server can be an independent physical server, a server cluster distributed system composed of multiple servers, or a cloud server that provides cloud computing services.
[0052] In an exemplary embodiment, Figure 2 As shown, a method for establishing an anonymous tunnel is provided, and the method is applied to Figure 1 The controller in is taken as an example to illustrate, including the following steps, wherein:
[0053] Step 201: Receive a public key request sent by a client, determine the public key and private key corresponding to the client, and return the public key to the client so that the client encrypts the target key through the public key to obtain the encrypted target key.
[0054] The public key request includes a client request to access the public key endpoint of the controller. The public key and the private key form a public-private key pair. Each client corresponds to a public-private key pair.
[0055] Specifically, the controller can establish a long connection with the client through Hypertext Transfer Protocol Secure (HTTPS), and the client can communicate with the controller through HTTPS. The controller can receive the public key request sent by the client through HTTPS and access the public key endpoint. The controller can generate the public key and private key corresponding to the client according to the public key request. The controller can store the corresponding relationship between the client and the public key pair corresponding to the client in the database. The controller can also update the public and private key pair corresponding to the client and store the updated public and private key pair in the database. When the controller recognizes the client, it can obtain the public and private key pair corresponding to the client from the database. The controller can send the public key to the client. The client can randomly generate a target key corresponding to the public key, and encrypt the target key with the public key to obtain the encrypted target key.
[0056] Step 202: Receive the anonymous tunnel credential request and the encrypted target key sent by the client; decrypt the encrypted target key based on the private key to obtain the decrypted target key.
[0057] Specifically, the controller receives the anonymous tunnel credential request and the encrypted target key sent by the client, and can obtain the public-private key pair corresponding to the client from the database, and use the private key in the public-private key pair corresponding to the client to decrypt the encrypted target key to obtain the decrypted target key.
[0058] Step 203: Send the anonymous tunnel credential carrying the decrypted target key to the client.
[0059] The anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway. The anonymous tunnel credential can be an account and password or AK / SK.
[0060] Specifically, the controller can determine the anonymous tunnel credential corresponding to the client from the correspondence between the client and the anonymous tunnel credential based on the anonymous tunnel credential request sent by the client, or generate a new anonymous tunnel credential corresponding to the client. The controller can encrypt the anonymous tunnel credential using the decrypted target key and send the anonymous tunnel credential carrying the target key to the client, and the client can request the gateway to establish an anonymous tunnel based on the anonymous tunnel credential.
[0061] In this embodiment, by determining the public key and private key corresponding to the client, receiving the anonymous tunnel credential request and the encrypted target key sent by the client, and determining the anonymous tunnel credential corresponding to the client, an anonymous tunnel between the client and the gateway is established through the anonymous tunnel credential, and anonymous tunnel credentials are generated by the controller, thereby improving the reliability and security of the anonymous tunnel between the client and the gateway, thereby improving the security performance of the network.
[0062] In an exemplary embodiment, returning a public key corresponding to the client to the client includes:
[0063] Receive terminal information sent by the client, perform compliance detection on the terminal information based on the preset compliance policy, and obtain the compliance detection result of the client; if the compliance detection result meets the preset compliance conditions, return the public key corresponding to the client to the client.
[0064] Among them, terminal information may include but is not limited to: operating system version (operating system version number and patch level), system configuration (such as host name, domain name, Internet Protocol address, LAN address and other network configuration information), hardware information (CPU, memory, storage, network adapter and other hardware details), all processes currently running on the terminal and detailed information on their running (process identity document, parent process ID, process path and start time, etc.), process signature (application package name), registry and terminal device ID. One or more of the following. The process signature is used to verify the legitimacy of the process, the registry is used to monitor key registry items, such as startup items or service items, and the terminal device ID can characterize the specific type of the client. The preset compliance policy can be a policy for comparing the terminal information of the client with the preset compliance terminal information. The compliance detection result can be client compliance or client non-compliance. The preset compliance condition is client compliance.
[0065] Specifically, the controller receives the terminal information sent by the client. The controller can obtain the preset compliance terminal information from the database, compare the terminal information with the preset compliance terminal information, and obtain the comparison result. The controller can determine the comparison result as the compliance detection result of the client, and send the compliance detection result corresponding to the client to the database for storage, or correspond the terminal device id to the compliance detection result and send it to the database for storage. If the terminal information is consistent with the preset compliance terminal information, the client is considered to be compliant. If one or more items in the terminal information are inconsistent with the preset compliance terminal information, the client is considered to be non-compliant.
[0066] Specifically, after receiving the public key request sent by the client, the controller can obtain the corresponding compliance detection result from the database according to the terminal information (terminal device ID) corresponding to the client. If the compliance detection result shows that the client is compliant, the controller sends the public key corresponding to the client to the client; if the compliance detection result shows that the client is not compliant, the controller returns information to the client that refuses to return the public key.
[0067] In this embodiment, compliance detection is performed on the terminal information sent by the client, and the compliance detection results are stored in the database, and the public key is only returned to the compliant client, which provides credentials for the subsequent establishment of an anonymous tunnel and improves the security of establishing an anonymous tunnel.
[0068] In an exemplary embodiment, determining a public key and a private key corresponding to a client includes:
[0069] When the first preset update condition is met, the public key and private key corresponding to the client are generated, and the first preset update condition is reaching the first update time interval and / or receiving an abnormal signal from the controller; or, in the relationship between the client and the public-private key pair, the public key and private key corresponding to the client are determined.
[0070] The first preset update condition may be that the time interval between the current acquisition of the public-private key pair and the last acquisition of the public-private key pair is greater than the first update time interval, and / or the controller receives an abnormal signal. The abnormal signal may be a signal that the server detects a public key leak.
[0071] Specifically, the controller can detect the time when the public-private key pair is obtained. If the time interval between the current time when the public-private key pair is obtained and the last time when the public-private key pair is obtained is greater than the preset update interval, the controller regenerates the public key and private key corresponding to the client; or, if the controller receives an abnormal signal, the controller regenerates the public key and private key corresponding to the client; or, if the time interval between the current time when the public-private key pair is obtained and the last time when the public-private key pair is obtained is greater than the preset update interval and the controller receives an abnormal signal, the controller regenerates the public key and private key corresponding to the client. The controller can store the regenerated public key and private key corresponding to the client in a database.
[0072] Specifically, if the time interval between the current time of obtaining the public-private key pair and the last time the public-private key pair was obtained is less than the preset update interval and the controller detects an abnormal signal, it indicates that the first preset update condition is not met. The controller can directly determine the public key and private key corresponding to the client based on the terminal information of the client from the relationship between the client and the public-private key pair in the database.
[0073] In this embodiment, the method of obtaining the public and private key pairs corresponding to the client is determined by detecting whether the first preset update condition is met, thereby realizing dynamic acquisition of the public and private key pairs and improving the security of the network.
[0074] In an exemplary embodiment, the method for establishing an anonymous tunnel further includes:
[0075] When the second preset update condition is met, the anonymous tunnel credential corresponding to the client is generated, and the second preset update condition is reaching the second update time interval and / or receiving an abnormal signal from the controller; or, in the relationship between the client and the anonymous tunnel credential, the anonymous tunnel credential corresponding to the client is determined.
[0076] The second preset update condition may be that the time interval between the current acquisition of the anonymous tunnel credential and the last acquisition of the anonymous tunnel credential is greater than the second update time interval, and / or the controller receives an abnormal signal. The abnormal signal may be a signal that the server detects a leak of the anonymous tunnel credential.
[0077] Specifically, the controller can detect the time of obtaining the anonymous tunnel credential. If the time interval between the current time of obtaining the anonymous tunnel credential and the last time of obtaining the anonymous tunnel credential is greater than the second update time interval, the controller regenerates the anonymous tunnel credential corresponding to the client; or, if the controller receives an abnormal signal, the controller regenerates the anonymous tunnel credential corresponding to the client; or, if the time interval between the current time of obtaining the anonymous tunnel credential and the last time of obtaining the anonymous tunnel credential is greater than the preset update interval and the controller receives an abnormal signal, the controller regenerates the anonymous tunnel credential corresponding to the client. The controller can store the regenerated anonymous tunnel credential corresponding to the client in a database.
[0078] Specifically, if the time interval between the current time of obtaining the anonymous tunnel credential and the last time of obtaining the anonymous tunnel credential is less than the second update time interval and the controller detects an abnormal signal, indicating that the second preset update condition is not met, the controller can directly determine the anonymous tunnel credential corresponding to the client based on the terminal information of the client from the relationship between the client and the anonymous tunnel credential in the database.
[0079] In this embodiment, the method of obtaining the anonymous tunnel credentials corresponding to the client is determined by detecting whether the second preset update condition is met, so as to realize real-time online rotation of the anonymous tunnel credentials, improve the security and efficiency of establishing the anonymous tunnel, and improve the reliability of the network.
[0080] In an exemplary embodiment, applied to a client, such as Figure 3 As shown, Figure 3 FIG. 1 is a flow chart of a method for establishing an anonymous tunnel in an embodiment. The method for establishing an anonymous tunnel includes:
[0081] Step 301: Send a public key request to the controller; receive the public key corresponding to the client, and encrypt the target key by the public key to obtain the encrypted target key.
[0082] Step 302: Send the encrypted target key and anonymous tunnel credential request to the controller, so that the controller decrypts the encrypted target key to obtain the decrypted target key.
[0083] Step 303: Receive the anonymous tunnel credential carrying the decrypted target key.
[0084] The anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0085] Specifically, the client can establish an HTTPS long connection with the controller. The client can send a public key request to the controller based on the HTTPS connection. The controller can generate a public key corresponding to the client. The client can receive the public key corresponding to the client sent by the controller. After receiving the public key, the client can generate a random target key symmetric to the public key, and encrypt the target key with the received public key. Obtain the encrypted target key. The client can send the encrypted target key and anonymous tunnel credential request to the controller based on the HTTPS connection. The controller can use the private key corresponding to the public key to decrypt the encrypted target key to obtain the decrypted target key. The controller can generate an anonymous tunnel credential corresponding to the client or search the target key corresponding to the client in the database, and send the target key corresponding to the client to the client through the decrypted target key. The client receives the anonymous tunnel credential carrying the decrypted target key. The client can send an anonymous tunnel request to the gateway based on the anonymous tunnel credential to establish an anonymous tunnel between the client and the gateway.
[0086] In this embodiment, an anonymous tunnel is established between the client and the gateway through anonymous tunnel credentials, and anonymous tunnel credentials are generated by the controller, thereby improving the reliability and security of the anonymous tunnel between the client and the gateway, thereby improving the security performance of the network.
[0087] In an exemplary embodiment, the method for establishing an anonymous tunnel further includes:
[0088] The anonymous tunnel credential carrying the decrypted target key is decrypted using the target key to obtain the anonymous tunnel credential, and the anonymous tunnel credential is sent to the gateway.
[0089] Specifically, the client can receive an anonymous tunnel credential that carries a decrypted target key. The client can decrypt the key tunnel credential that carries the decrypted target key according to the target key to obtain the anonymous tunnel credential corresponding to the client. The client can send the anonymous tunnel credential to the gateway based on the HTTPS connection. The gateway can verify the anonymous tunnel credential sent by the receiving client from the relationship between the client and the anonymous tunnel credential in the database. If the anonymous tunnel credential sent by the client is consistent with the anonymous tunnel credential in the database, the gateway verification is successful, and the gateway can allow the establishment of an anonymous tunnel between the client and the gateway; if the anonymous tunnel credential sent by the client is inconsistent with the anonymous tunnel credential in the database, the gateway verification fails, and the gateway does not allow the establishment of an anonymous tunnel between the client and the gateway.
[0090] In this embodiment, the anonymous tunnel credential sent by the controller is decrypted by the target key to obtain the anonymous tunnel credential, thereby realizing encrypted acquisition of the anonymous tunnel credential and improving the security of subsequent establishment of the anonymous tunnel.
[0091] In an exemplary embodiment, the method for establishing an anonymous tunnel further includes:
[0092] The terminal information is sent to the controller so that the controller performs compliance detection on the client based on the terminal information to obtain the compliance detection result of the client.
[0093] Specifically, the client may send the terminal information of the client to the controller. The controller may perform compliance detection on the client based on the terminal information. The controller may obtain preset compliance terminal information from a database, compare the terminal information with the preset compliance terminal information, and obtain a comparison result. The controller may determine the comparison result as the compliance detection result of the client.
[0094] In this embodiment, the terminal information is sent to the controller so that the controller obtains the compliance detection result of the client, so as to facilitate subsequent compliance verification of the client.
[0095] In an exemplary embodiment, the method for establishing an anonymous tunnel further includes:
[0096] When the anonymous tunnel is successfully established, in response to the login operation, a login authentication request is sent to the gateway through the anonymous tunnel, so that the gateway determines the compliance detection result corresponding to the client, sends the login authentication request to the intranet authentication terminal based on the compliance detection result, and receives the authentication result corresponding to the login authentication request.
[0097] Specifically, the client can receive a login operation sent by a user. The client can send a login authentication request and terminal information to the gateway based on an anonymous tunnel. The gateway can determine the compliance detection result of the client based on the terminal information from the correspondence between the client and the compliance detection result in the database. If the compliance detection result is that the client is compliant, the gateway can send a login authentication request to the intranet authentication terminal and receive an authentication result corresponding to the login authentication request. The gateway can send the login authentication result through an anonymous tunnel.
[0098] In this embodiment, by successfully establishing an anonymous tunnel, the user's secure access to the intranet is achieved, thereby improving the security during the access process.
[0099] In an exemplary embodiment, Figure 4 As shown, Figure 4 The following is a timing diagram of a method for establishing an anonymous tunnel in an embodiment, which specifically includes the following steps:
[0100] The client starts and establishes a persistent HTTPS connection with the controller. The client collects terminal information. The client periodically reports terminal information.
[0101] The controller performs compliance detection on the terminal information and obtains compliance detection results. The controller sends the compliance detection results corresponding to the client to the database for storage.
[0102] The client carries the device ID in the terminal information and sends a public key request to the controller through HTTPS to access the public key endpoint. The controller queries the most recent compliance test results based on the device ID and makes a judgment on the compliance test results. If the client is not compliant, it returns a rejection of the public key; if the client is compliant, the controller determines to generate a new public-private key pair or obtains the public-private key pair corresponding to the device ID, and the controller sends the public key information to the client. The client generates a random symmetric target key and uses the public key to encrypt the target key to obtain the encrypted target key. The client sends the encrypted target key and anonymous tunnel credential request to the controller.
[0103] The controller uses the corresponding private key to decrypt the target key and obtain the decrypted target key. The controller can generate a new anonymous tunnel credential or obtain the anonymous tunnel credential corresponding to the generated client. The controller uses the anonymous tunnel credential carrying the target key to send to the client.
[0104] The client uses the target key to obtain the anonymous tunnel credential; the client sends a request to the gateway with the anonymous tunnel credential to establish the anonymous tunnel credential. The gateway verifies the anonymous tunnel credential. If the verification passes, the anonymous tunnel is allowed to be established. If the verification fails, a failure message is returned to the client.
[0105] When the anonymous tunnel is successfully established, the user performs a login operation on the client. The client sends a login authentication request to the gateway with the device ID through the anonymous tunnel. The gateway queries the compliance result of the client based on the device ID. If the compliance test fails, the gateway returns a rejection request to the client. If the compliance test passes, the client is allowed to access the authentication service. The gateway forwards the login authentication request to the intranet authentication end. The intranet authentication end returns the login authentication result to the gateway, and the gateway sends the login authentication result to the client.
[0106] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0107] Based on the same inventive concept, the embodiment of the present application also provides an anonymous tunnel establishment device for implementing the anonymous tunnel establishment method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the device for establishing one or more anonymous tunnels provided below can refer to the limitations of the anonymous tunnel establishment method above, and will not be repeated here.
[0108] In an exemplary embodiment, Figure 5 As shown, a device for establishing an anonymous tunnel is provided. The device 50 for establishing an anonymous tunnel includes: a first determining module 51, a first receiving module 52 and a first sending module 53, wherein:
[0109] The first determination module 51 is used to receive a public key request sent by a client, determine a public key and a private key corresponding to the client, and return the public key to the client so that the client encrypts the target key by the public key to obtain the encrypted target key.
[0110] The first receiving module 52 is used to receive the anonymous tunnel credential request and the encrypted target key sent by the client; decrypt the encrypted target key based on the private key to obtain the decrypted target key.
[0111] The first sending module 53 is used to send the anonymous tunnel credential carrying the decrypted target key to the client, and the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0112] In one example, the first determination module 51 is used to receive the terminal information sent by the client, perform compliance detection on the terminal information based on a preset compliance policy, and obtain a compliance detection result of the client;
[0113] If the compliance detection result meets the preset compliance condition, the public key corresponding to the client is returned to the client.
[0114] In one example, the first determination module 51 is used to generate a public key and a private key corresponding to the client when a first preset update condition is met, and the first preset update condition is reaching a first update time interval and / or receiving an abnormal signal from the controller;
[0115] Alternatively, in the relationship between the client and the public-private key pair, the public key and the private key corresponding to the client are determined.
[0116] In one example, the first receiving module 52 is further used to generate the anonymous tunnel credential corresponding to the client when the second preset update condition is met, and the second preset update condition is reaching the second update time interval and / or receiving an abnormal signal from the controller;
[0117] Alternatively, in the relationship between the client and the anonymous tunnel credential, the anonymous tunnel credential corresponding to the client is determined.
[0118] In an exemplary embodiment, Figure 6 As shown, a device for establishing an anonymous tunnel is provided. The device 60 for establishing an anonymous tunnel includes: a second determining module 61, a second sending module 62 and a second receiving module 63, wherein:
[0119] The second determination module 61 is used to send a public key request to the controller; receive the public key corresponding to the client, and encrypt the target key by using the public key to obtain the encrypted target key.
[0120] The second sending module 62 is used to send the encrypted target key and the anonymous tunnel credential request to the controller, so that the controller decrypts the encrypted target key to obtain the decrypted target key.
[0121] The second receiving module 63 is used to receive an anonymous tunnel credential carrying a decrypted target key, where the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0122] In one example, the second sending module 62 is further used to use the target key to decrypt the anonymous tunnel credential carrying the decrypted target key to obtain the anonymous tunnel credential, and send the anonymous tunnel credential to the gateway.
[0123] In one example, the second determination module 61 is further configured to send terminal information to the controller, so that the controller performs compliance detection on the client based on the terminal information to obtain a compliance detection result of the client.
[0124] In one example, the second receiving module 63 is also used to send a login authentication request to the gateway through the anonymous tunnel in response to a login operation when the anonymous tunnel is successfully established, so that the gateway determines the compliance detection result corresponding to the client, sends the login authentication request to the intranet authentication terminal based on the compliance detection result, and receives the authentication result corresponding to the login authentication request.
[0125] Each module in the above anonymous tunnel establishment device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0126] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store anonymous tunnel requests. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for establishing an anonymous tunnel is implemented.
[0127] Those skilled in the art will understand that Figure 7The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0129] Receive a public key request sent by a client, determine a public key and a private key corresponding to the client; and return the public key to the client, so that the client encrypts the target key by using the public key to obtain the encrypted target key;
[0130] Receiving the anonymous tunnel credential request and the encrypted target key sent by the client; decrypting the encrypted target key based on the private key to obtain a decrypted target key;
[0131] The anonymous tunnel credential carrying the decrypted target key is sent to the client, and the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0132] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0133] Receive a public key request sent by a client, determine a public key and a private key corresponding to the client; and return the public key to the client, so that the client encrypts the target key by using the public key to obtain the encrypted target key;
[0134] Receiving the anonymous tunnel credential request and the encrypted target key sent by the client; decrypting the encrypted target key based on the private key to obtain a decrypted target key;
[0135] The anonymous tunnel credential carrying the decrypted target key is sent to the client, and the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0136] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0137] Receive a public key request sent by a client, determine a public key and a private key corresponding to the client; and return the public key to the client, so that the client encrypts the target key by using the public key to obtain the encrypted target key;
[0138] Receiving the anonymous tunnel credential request and the encrypted target key sent by the client; decrypting the encrypted target key based on the private key to obtain a decrypted target key;
[0139] The anonymous tunnel credential carrying the decrypted target key is sent to the client, and the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
[0140] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0141] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0142] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for establishing an anonymous tunnel, characterized in that: Applied to a controller, the method comprises: Receive a public key request sent by a client, determine a public key and a private key corresponding to the client; and return the public key to the client, so that the client encrypts the target key by using the public key to obtain the encrypted target key; Receiving the anonymous tunnel credential request and the encrypted target key sent by the client; decrypting the encrypted target key based on the private key to obtain a decrypted target key; The anonymous tunnel credential carrying the decrypted target key is sent to the client, and the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
2. The method according to claim 1, characterized in that The returning the public key corresponding to the client to the client includes: Receiving terminal information sent by the client, performing compliance detection on the terminal information based on a preset compliance policy, and obtaining a compliance detection result of the client; If the compliance detection result meets the preset compliance condition, the public key corresponding to the client is returned to the client.
3. The method according to claim 1, characterized in that The determining of the public key and the private key corresponding to the client includes: When a first preset update condition is met, a public key and a private key corresponding to the client are generated, wherein the first preset update condition is reaching a first update time interval and / or receiving an abnormal signal from the controller; Alternatively, in the relationship between the client and the public-private key pair, the public key and the private key corresponding to the client are determined.
4. The method according to claim 1, characterized in that: The method further comprises: When the second preset update condition is met, generating the anonymous tunnel credential corresponding to the client, wherein the second preset update condition is reaching a second update time interval and / or receiving an abnormal signal from the controller; Alternatively, in the relationship between the client and the anonymous tunnel credential, the anonymous tunnel credential corresponding to the client is determined.
5. A method for establishing an anonymous tunnel, characterized in that: Applied to a client, the method comprises: Send a public key request to the controller; Receiving the public key corresponding to the client, and encrypting the target key by using the public key to obtain the encrypted target key; Sending the encrypted target key and an anonymous tunnel credential request to the controller so that the controller decrypts the encrypted target key to obtain a decrypted target key; An anonymous tunnel credential carrying the decrypted target key is received, where the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
6. The method according to claim 5, characterized in that The method further comprises: The target key is used to decrypt the anonymous tunnel credential carrying the decrypted target key to obtain the anonymous tunnel credential, and the anonymous tunnel credential is sent to the gateway.
7. The method according to claim 5, characterized in that The method further comprises: The terminal information is sent to the controller, so that the controller performs compliance detection on the client based on the terminal information to obtain a compliance detection result of the client.
8. The method according to claim 7, characterized in that The method further comprises: When the anonymous tunnel is successfully established, in response to the login operation, a login authentication request is sent to the gateway through the anonymous tunnel, so that the gateway determines the compliance detection result corresponding to the client, sends the login authentication request to the intranet authentication terminal based on the compliance detection result, and receives the authentication result corresponding to the login authentication request.
9. A device for establishing an anonymous tunnel, characterized in that: Applied to a controller, the device comprises: A first determination module is used to receive a public key request sent by a client, determine a public key and a private key corresponding to the client, and return the public key to the client, so that the client encrypts the target key by using the public key to obtain the encrypted target key; A first receiving module is configured to receive the anonymous tunnel credential request and the encrypted target key sent by the client; decrypt the encrypted target key based on the private key to obtain a decrypted target key; The first sending module is used to send the anonymous tunnel credential carrying the decrypted target key to the client, and the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
10. A device for establishing an anonymous tunnel, characterized in that: Applied to a client, the device comprises: The second determination module is used to send a public key request to the controller; receive the public key corresponding to the client, and encrypt the target key by using the public key to obtain the encrypted target key; A second sending module, used for sending the encrypted target key and an anonymous tunnel credential request to the controller, so that the controller decrypts the encrypted target key to obtain a decrypted target key; The second receiving module is used to receive an anonymous tunnel credential carrying the decrypted target key, where the anonymous tunnel credential is used to establish an anonymous tunnel between the client and the gateway.
