Access control method, client proxy apparatus, gateway device, and related system

By intercepting and modifying session negotiation packets to include authentication information in the transport layer, the method reduces performance overhead in Zero Trust architectures by eliminating unnecessary tunnel encryption and decryption steps, enhancing processing efficiency in terminal and gateway devices.

JP2024530911AInactive Publication Date: 2024-08-27HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024505506
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-09-03
Filing Date
2022-03-04
Publication Date
2024-08-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In Zero Trust architecture, the high performance overhead caused by tunnel encapsulation and decapsulation processes in terminal and gateway devices due to the need for additional encryption and decryption in session negotiations between terminal devices and servers, particularly in complex C/S scenarios, is a significant challenge.

Method used

A method where a client proxy device intercepts session negotiation packets, adds authentication information to the transport layer packet header, and sends them to the gateway device without further tunnel encapsulation, allowing the gateway device to authenticate and skip decapsulation, thus reducing overhead.

Benefits of technology

This approach reduces processing overhead by eliminating the need for additional tunnel encryption and decryption, improving performance in terminal and gateway devices while ensuring link security and authentication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024530911000001_ABST
    Figure 2024530911000001_ABST
Patent Text Reader

Abstract

In order to alleviate the problem of high performance overhead of a terminal device or a gateway device in an access control process of a zero trust scenario, the embodiments of the present application disclose an access control method, a client proxy device, a gateway device, and a related system. The access control method is executed by a client proxy device running on a terminal device. The client proxy device intercepts a first negotiation packet, where the first negotiation packet is from a first application client on the terminal device and is used to perform negotiation to establish a first session, where the first session is a session between the first application client and a first server, and the first session meets an encryption strength requirement. The client proxy device adds authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet, and sends the modified first negotiation packet to a gateway device.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 202110876797.1, entitled "AUTHENTICATION METHOD, CLIENT PROXY APPARATUS, GATEWAY DEVICE, AND AUTHENTICATION SYSTEM", filed with the State Intellectual Property Office of China on July 31, 2021, and Chinese Patent Application No. 202111029935.9, entitled "ACCESS CONTROL METHOD, CLIENT PROXY APPARATUS, GATEWAY DEVICE, AND RELATED SYSTEM", filed with the State Intellectual Property Office of China on September 3, 2021, which are incorporated by reference in their entireties herein.

[0002] The present application relates to the field of computer network technology, and in particular to an access control method, a client proxy apparatus, a gateway device, and an access control system. [Background technology]

[0003] Zero Trust Architecture (also called "Zero Trust Security Model") is different from traditional network perimeter security trust systems. Zero Trust Architecture emphasizes the principle of "never trust, always verify". In other words, the gateway device should not trust the terminal device by default, regardless of whether the terminal device is connected through the company's local area network or has already been verified. Link security is a key aspect in Zero Trust Architecture, which means that data of the session established between the terminal device and the server providing the resource must be encrypted for transmission to avoid security issues caused by network sniffing.

[0004] In the zero trust architecture, each session needs to carry authentication information while further ensuring link security, so that the gateway device performs authentication based on the authentication information carried in the session and determines whether the session currently being requested to be established has the corresponding resource access permission, thereby allowing or blocking the establishment of the session between the terminal device and the server.

[0005] The terminal device may transmit authentication information to the gateway device through the application layer field of the packet. For example, in a Browser / Server (B / S) scenario, the terminal device carries authentication information in the cookie field of the Hypertext Transfer Protocol (HTTP) packet by setting a small piece of data (cookie) downloaded from the browser to the terminal. However, in a Client / Server (C / S) scenario, the application forms are very rich and complex. If the authentication information needs to be transmitted through the application layer data of the packet, adaptation and modification need to be performed for multiple application protocols on the terminal device and the gateway, respectively, which is difficult to implement.

[0006] In order to mask the differences between various applications, research has proposed establishing a tunnel between the terminal device and the gateway device, where the terminal device carries authentication information through a tunnel header encapsulated in the packets. However, this solution requires that an additional tunnel be established between the terminal device and the gateway device. The terminal device needs to perform tunnel encapsulation for all application packets, and the gateway device needs to perform decapsulation for all tunnel packets. The tunnel-related encapsulation and decapsulation, as well as encryption and decryption that may be required, consume a lot of processing resources, resulting in high performance overhead for both the terminal device and the gateway device. Summary of the Invention

[0007] The embodiments of the present application provide an access control method to alleviate the problem of high performance overhead of a terminal device or a gateway device in the access control process of a zero trust scenario.

[0008] According to a first aspect, an access control method is provided, the access control method being executed by a client proxy apparatus running on a terminal device. The client proxy apparatus intercepts a first negotiation packet, where the first negotiation packet is from a first application client on the terminal device and is used to perform negotiation to establish a first session, the first session being a session between the first application client and a first server, and the first session meets an encryption strength requirement. The client proxy apparatus adds authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet, and sends the modified first negotiation packet to a gateway device.

[0009] In the embodiment of the present application, for a session initiated by an application client on a terminal device and meeting the encryption strength requirements, before forwarding the session negotiation packet to the gateway device, the client proxy device running on the terminal device does not need to further perform encrypted tunnel encapsulation, and carries the authentication information in the transport layer packet header of the session negotiation packet. In this way, when the link security and authentication requirements are met, the overhead caused by additional tunnel encryption and decryption is reduced, and the processing performance of the terminal device and the gateway device is improved.

[0010] Optionally, in a possible implementation, the client proxy device determines whether the session being negotiated meets the encryption strength requirement based on, for example, the protocol type and encryption strength-related information carried in the intercepted session negotiation packet, such as the encryption strength-related information carried in the session negotiation packet including, but not limited to, a protocol version number and / or a cipher suite identifier list.

[0011] For example, the first session meeting encryption strength requirements includes:

[0012] The first negotiation packet carries a specified protocol version number, and the transmission security of an implementation of a protocol version corresponding to the specified protocol version number is higher than a predefined security standard, and the data transmission is performed using the first session based on the protocol version, for example, the specified protocol version number includes Transport Layer Security (TLS) 1.2 or TLS 1.3.

[0013] In another example, the first session meeting the encryption strength requirement includes:

[0014] The first negotiation packet includes a specified cipher suite identifier, the specified cipher suite identifier identifies a specified cipher suite, the transmission security implemented by the specified cipher suite is higher than a pre-defined security standard, and application data for the first session is encrypted based on the specified cipher suite.

[0015] The embodiments of the present application provide a scheme for determining that a first session meets an encryption strength requirement based on information carried in a session negotiation packet, which is simple and effective.

[0016] Optionally, in a possible implementation, the first negotiation packet is a TLS packet, for example, the first negotiation packet is a Client Hello message.

[0017] Optionally, in a possible implementation, for a packet received from the client proxy device, the gateway device needs to perform different subsequent processing in different cases. For example, if the received packet is a packet multiplexed by the client proxy device after authentication information is added to the transport layer packet header of the negotiation packet sent by the application client, the packet is not encapsulated, so the gateway device does not need to perform decapsulation on the packet. To facilitate processing by the gateway device, the transport layer packet header of the modified first negotiation packet further includes indication information, which enables the gateway device to skip performing decapsulation on the modified first negotiation packet.

[0018] Optionally, the client proxy device selectively adds the authentication information to different positions of a transport layer packet header of the first negotiation packet. In a possible implementation, the client proxy device adds the authentication information to a Transport Layer Security Option (TLS option) in the transport layer packet header. For example, adding the authentication information corresponding to the first application client to the transport layer packet header of the first negotiation packet includes adding a TLS option field to the transport layer packet header of the first negotiation packet and including the authentication information corresponding to the first application client in the TLS option field.

[0019] Optionally, in a possible implementation, the TLS option field conforms to a type-length-value (TLV) structure, where the type T field of the TLV structure is used to carry indication information, which is used to enable the gateway device to skip performing a TLS decapsulation process on the modified session negotiation packet, and the value V field is used to carry authentication information. According to the structure of the TLS option field provided in the embodiment of the present application, the TLS option field can carry both indication information and authentication information, which is an efficient information carrying manner.

[0020] Optionally, in a possible implementation, the authentication information includes a user token and / or an application token, which is used by the gateway device to authenticate the identity of the access initiator in each session establishment process.

[0021] Optionally, in a possible implementation, the authentication information further includes a device identifier and / or address information of the first server. For example, the address information of the first server includes an Internet Protocol (IP) address and / or a port number of the first server.

[0022] Optionally, in a possible implementation, before transmitting the modified first negotiation packet, the method further comprises: and further including modifying a sequence number of the first negotiation packet based on the first difference and a length value of the TLS option field, and modifying an acknowledgment number of the first negotiation packet based on the second difference to obtain a modified first negotiation packet, where the first difference is a difference between a sequence number of a synchronization packet sent by the client proxy device acting as a proxy client to the first server and a sequence number of a synchronization packet sent by the first client, and the second difference is a difference between an acknowledgment number of the synchronization packet sent by the client proxy device acting as a proxy client to the first server and an acknowledgment number of the synchronization packet sent by the first client.

[0023] Since the client proxy device adds the authentication information to the first negotiation packet, the packet length of the modified first negotiation packet is changed compared with the packet length before the modification. In order to reduce an error rate when the gateway device analyzes the modified first negotiation packet, the client proxy device further modifies a sequence number of the first negotiation packet when adding the authentication information to the first negotiation packet.

[0024] Optionally, in a possible implementation, after sending the modified first negotiation packet to the gateway device, the method further comprises: The method further includes transmitting subsequent packets of the first session in a stream mode after the first session is successfully established.

[0025] In the embodiment of the present application, the client proxy device forwards packets in a proxy mode before the first session is successfully established, and switches from the proxy mode to a stream mode to transmit subsequent packets of the first session after the first session is successfully established. Compared with the proxy mode, in the stream mode, the client proxy device does not need to maintain two independent connection states. Therefore, the processing resources of the client proxy device can be further saved, specifically, the processing resources of the terminal device can be saved.

[0026] Optionally, in a possible implementation, transmitting subsequent packets of the first session in a stream mode includes: modifying a sequence number of a subsequent packet of the first session from the first application client based on a first difference and modifying an acknowledgment number of the subsequent packet of the first session from the first application client based on a second difference to obtain a modified subsequent packet of the first session from the first application client, wherein the first difference is a difference between a sequence number of a synchronization packet sent to the first server by the client proxy device acting as a proxy client and a sequence number of the synchronization packet sent by the first client, and the second difference is a difference between an acknowledgment number of a synchronization packet sent to the first server by the client proxy device acting as a proxy client and an acknowledgment number of the synchronization packet sent by the first client; sending a modified subsequent packet of the first session from the first application client to the gateway device; modifying a sequence number of a subsequent packet of the first session from the gateway device based on a third difference and modifying an acknowledgment number of the subsequent packet of the first session from the gateway device based on a fourth difference and a length value of the TLS option field to obtain a modified subsequent packet of the first session from the gateway device, wherein the third difference is a difference between a sequence number of a synchronization acknowledgment packet sent by the client proxy apparatus acting as a proxy server to the first client and a sequence number of a synchronization acknowledgment packet sent by the first server, and the fourth difference is a difference between an acknowledgment number of a synchronization acknowledgment packet sent by the client proxy apparatus acting as a proxy server to the first client and an acknowledgment number of a synchronization acknowledgment packet sent by the first server; sending a modified subsequent packet of the first session originating from the gateway device to the gateway device; Further includes:

[0027] Optionally, in a possible implementation, the method further comprises: intercepting a second negotiation packet, the second negotiation packet being from a second application client on the terminal device and used to negotiate with a second server to establish a second session, the second session not meeting an encryption strength requirement; performing tunnel encapsulation on the second negotiation packet to obtain a tunnel negotiation packet, a packet header of the tunnel negotiation packet including authentication information corresponding to the second application client, the tunnel negotiation packet being used to perform negotiation to establish an encrypted tunnel between the client proxy device and the gateway device; Sending a tunnel negotiation packet to the gateway device Further includes:

[0028] According to the access control method provided in the embodiment of the present application, as a supplement to the processing process of a session initiated by an application client that meets the encryption strength requirement, for a session initiated by an application client on a terminal device that does not meet the encryption strength requirement, the client proxy device needs to establish an additional encrypted tunnel between the client proxy device and the gateway device. The client proxy device encapsulates the session packet by the encrypted tunnel to meet the link security requirement. In addition, the authentication information is transferred to the gateway device through the tunnel negotiation packet header added by the client proxy device to the session negotiation packet to meet the authentication requirement. In this way, a more complex solution is provided, so that the client proxy device on the terminal device can process various sessions initiated by various application clients.

[0029] Optionally, authentication information corresponding to the second application client is carried in various locations of a packet header of the tunnel negotiation packet. In a possible implementation, the authentication information corresponding to the second application client is carried in an application layer packet header of the tunnel negotiation packet. In another implementation, the authentication information corresponding to the second application client is carried in a transport layer packet header of the tunnel negotiation packet.

[0030] Optionally, in a possible implementation, the application layer packet header is a HyperText Transfer Protocol HTTP header, and the authentication information corresponding to the second application client is carried in a cookie field of the HTTP header.

[0031] Optionally, in a possible implementation, after sending the tunnel negotiation packet to the gateway device, the method further comprises: transmitting subsequent packets of the second session through the encrypted tunnel after the encrypted tunnel is successfully established. Further includes:

[0032] In a session initiated by an application client on a terminal device that does not meet the encryption strength requirement, the client proxy device transmits subsequent packets of the session through an encrypted tunnel between the client proxy device and the gateway device to meet the link security requirement.

[0033] According to a second aspect, an embodiment of the present application provides an access control method. A gateway device receives a first negotiation packet, where the first negotiation packet is from a first client proxy device and is used to perform negotiation to establish a first session, where the first session is a session between a first terminal device and a first server, specifically, a session between a first application client on the first terminal device and a first server. The first client proxy device runs on the first terminal device, and a transport layer packet header of the first negotiation packet carries authentication information. The first negotiation packet received by the gateway device is actually the first negotiation packet modified by the client proxy device of the first aspect. The gateway device initiates a first authentication based on the authentication information. After the first authentication is successful, the gateway device skips performing tunnel decapsulation on the first negotiation packet and forwards the first negotiation packet to the first server to establish a first connection, where the first connection is a connection between the gateway device and the first server.

[0034] When the transport layer packet header of the received session negotiation packet carries authentication information, and when the authentication is successful based on the authentication information carried in the transport layer packet header, the gateway device forwards the session negotiation packet to the server without performing decapsulation on the session negotiation packet. Since tunnel decapsulation is not performed, the overhead caused by additional tunnel encryption and decryption is reduced, and the processing performance of the terminal device and the gateway device is improved.

[0035] Optionally, in a possible implementation of the second aspect, the first negotiation packet is a TLS packet, for example, the first negotiation packet is a Client Hello message.

[0036] Optionally, in a possible implementation of the second aspect, the authentication information is carried in a Transport Layer Security Option (TLS option) field of a transport layer packet header of the first negotiation packet.

[0037] Optionally, in a possible implementation of the second aspect, the transport layer packet header further carries indication information, which enables the gateway device to skip performing tunnel decapsulation on the first negotiation packet.

[0038] Optionally, in a possible implementation of the second aspect, the TLS option field conforms to a Type / Length / Value TLV structure, a type T field of the TLV structure is used to carry indication information, the gateway device skips performing TLS decapsulation on the modified session negotiation packet based on the indication information, and a value V field is used to carry authentication information.

[0039] Optionally, in a possible implementation of the second aspect, the method further comprises: successfully establishing a second connection after the first authentication is successful, the second connection being a connection between the gateway device and the first client proxy device; receiving subsequent packets of the first session sent by the first client proxy device via the second connection and forwarding the subsequent packets of the first session from the first client proxy device to the first server via the first connection; receiving subsequent packets of the first session from the first server via the first connection and forwarding subsequent packets of the first session from the first server to the first client proxy device via the second connection; Further includes:

[0040] When the gateway device successfully authenticates the session initiator, the gateway device transmits session packets between the application client on the terminal device and the server via a connection between the gateway device and the first client proxy device and a connection between the gateway device and the server, thereby enforcing access control at the granularity of the session.

[0041] Optionally, in a possible implementation of the second aspect, the method further includes the gateway device terminating establishment of the second connection if the first authentication fails.

[0042] Optionally, in a possible implementation of the second aspect, the method further comprises: receiving a second negotiation packet, the second negotiation packet being from a second client proxy apparatus and used to perform negotiation to establish a second session, the second session being a session between a second terminal device and a second server, the second client proxy apparatus running on the second terminal device, and a transport layer packet header of the second negotiation packet not carrying authentication information; obtaining authentication information from an application layer packet header of the second negotiation packet and initiating a second authentication based on the authentication information obtained from the application layer packet header of the second negotiation packet; performing access control on the second session based on an authentication result of the second authentication; Further includes:

[0043] According to the access control method provided in the embodiment of the present application, after receiving a session negotiation packet, the gateway device performs different subsequent processing processes according to different locations where the authentication information is obtained. Specifically, as a supplement to the processing process of a session initiated by an application client that meets the encryption strength requirement, when the transport layer packet header of the received session negotiation packet does not carry the authentication information, the gateway device obtains the authentication information from the application layer packet header to initiate authentication. When the authentication is successful, link security needs to be implemented between the gateway device and the client proxy device through the encrypted tunnel. Therefore, when performing packet forwarding, the gateway device needs to perform tunnel encapsulation or decapsulation on the packet transmitted between the gateway device and the client proxy device.

[0044] Optionally, in a possible implementation of the second aspect, performing access control on the first session based on an authentication result of the first authentication process includes: if the second authentication is successful, performing tunnel decapsulation on the second negotiation packet and sending the decapsulated packet to the second server to establish a third connection, where the third connection is a connection between the gateway device and the second server; establishing an encrypted tunnel between the gateway device and a second client proxy device; transmitting subsequent packets of the second session through the encrypted tunnel and the third connection; Includes.

[0045] Optionally, in a possible implementation of the second aspect, performing access control on the second session based on an authentication result of the second authentication includes: Terminating establishment of the encrypted tunnel with the second client proxy device if the second authentication fails. Includes.

[0046] According to a third aspect, an embodiment of the present application provides a client proxy apparatus, which runs on a terminal device, and includes a plurality of functional modules, which interact with each other to implement the method of the first aspect and the implementation of the first aspect. Optionally, the plurality of functional modules are implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules are randomly combined or divided based on a specific implementation.

[0047] According to a fourth aspect, an embodiment of the present application provides a gateway device, the gateway device includes a plurality of functional modules, and the plurality of functional modules interact with each other to implement the method of the first aspect and the implementation of the first aspect. Optionally, the plurality of functional modules are implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules are randomly combined or divided based on a specific implementation.

[0048] According to a fifth aspect, an embodiment of the present application provides a terminal device including a memory and a processor, wherein: The memory is configured to store computer instructions; After the computer instructions are read by the processor, the terminal device is enabled to execute the method according to the first aspect or any possible implementation of the first aspect.

[0049] According to a sixth aspect, an embodiment of the present application provides a gateway device, including a memory and a processor, wherein: The memory is configured to store computer instructions; After the computer instructions are read by the processor, the gateway device is capable of performing the method according to the second aspect or any possible implementation of the second aspect.

[0050] According to a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium storing computer instructions, the computer instructions, when executed by a processor of a terminal device, enable the terminal device to perform an access control method according to the first aspect or any possible implementation of the first aspect, or the computer instructions, when executed by a processor of a gateway device, enable the gateway device to perform a method according to the second aspect or any possible implementation of the second aspect.

[0051] According to an eighth aspect, an embodiment of the present application provides an access control system including a terminal device and a gateway device, where a client proxy apparatus runs within the terminal device, the client proxy apparatus is configured to intercept a first negotiation packet, the first negotiation packet is from a first application client on the terminal device and is used to perform negotiation to establish a first session, the first session being a session between the first application client and a first server, the first session meeting an encryption strength requirement, and the client proxy apparatus is further configured to add authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet, and send the modified first negotiation packet to the gateway device.

[0052] The gateway device is configured to receive the modified first negotiation packet, initiate a first authentication based on authentication information carried in a transport layer packet header of the modified first negotiation packet, and after the first authentication is successful, skip performing tunnel decapsulation on the first negotiation packet, and forward the first negotiation packet to the first server to establish a first connection, where the first connection is a connection between the gateway device and the first server.

[0053] According to a ninth aspect, there is provided a chip including programmable logic circuitry and / or program instructions that, when operated, performs the actions performed by the client proxy device in the first aspect and the method according to an implementation of the first aspect.

[0054] According to a tenth aspect, there is provided a chip, the chip including programmable logic circuitry and / or program instructions, which when operated performs the actions performed by the gateway device in the second aspect and the method according to an implementation of the second aspect.

[0055] According to an eleventh aspect, there is provided a computer program product comprising one or more computer program instructions which, when loaded and executed by a terminal device, enable the terminal device to perform actions performed by the terminal device in the first aspect and in a method according to an implementation of the first aspect.

[0056] According to a twelfth aspect, there is provided a computer program product comprising one or more computer program instructions which, when loaded and executed by a gateway device, enable the gateway device to perform the actions performed by the gateway device in the second aspect and in a method of implementation of the second aspect. [Brief description of the drawings]

[0057] In order to more clearly describe the technical solutions of the embodiments of the present application, the following briefly describes the accompanying drawings for describing the embodiments. The accompanying drawings in the following description merely illustrate some embodiments of the present application, and it is obvious that those skilled in the art can derive other drawings from these accompanying drawings without creative efforts.

[0058] [Figure 1] FIG. 1 is a schematic diagram of an access control method of a zero trust architecture according to an embodiment of the present application. [Diagram 2] FIG. 1 is a schematic diagram of conveying authentication token information via cookies in a B / S scenario according to an embodiment of the present application. [Diagram 3] FIG. 2 is a schematic diagram of the transmission of authentication information between a client proxy device and a gateway device via a TLS tunnel according to an embodiment of the present application; [Figure 4] FIG. 2 is a schematic diagram of the transmission of authentication information between a client proxy device and a gateway device via an HTTPS tunnel according to an embodiment of the present application; [Diagram 5] FIG. 2 is a schematic diagram of carrying authentication information via an HTTP application layer packet header according to an embodiment of the present application; [Figure 6] FIG. 2 is a schematic diagram of an application scenario of the access control method according to an embodiment of the present application; [Figure 7] 2 is a flow diagram of an access control method according to an embodiment of the present application; [Figure 8]FIG. 2 is a schematic diagram of an analysis result of a Client Hello message according to an embodiment of the present application; [Figure 9] 1 is a schematic diagram of packet sequence numbers and acknowledgement numbers that need to be recorded in the process of establishing a three-way connection by an application client, a client proxy device, and a gateway device according to an embodiment of the present application; [Figure 10] FIG. 2 is a detailed schematic diagram of adjusting forwarded packets by a client proxy device according to an embodiment of the present application; [Figure 11] 4 is a flow chart of another access control method according to an embodiment of the present application; [Figure 12] 4 is a flow chart of another access control method according to an embodiment of the present application; [Figure 13] 4 is a flow chart of another access control method according to an embodiment of the present application; [Figure 14] 1 is a schematic diagram of an access control method according to an embodiment of the present application; [Figure 15] 1 is a schematic diagram of an access control method according to an embodiment of the present application; [Figure 16] FIG. 2 is a schematic diagram of the structure of a terminal device according to an embodiment of the present application; [Figure 17] FIG. 2 is another schematic diagram of the structure of a terminal device according to an embodiment of the present application; [Figure 18] FIG. 2 is a schematic diagram of the structure of a gateway device according to an embodiment of the present application; [Figure 19] FIG. 2 is a schematic diagram of the structure of another gateway device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0059] As shown in Fig. 1, an access control system based on a zero trust architecture usually includes a control device, a gateway device, and a terminal device, and a client proxy device is installed in the terminal device. When the terminal device needs to access a protected application resource, the client proxy device first initiates an identification authentication and access control request to the control device, and after the identification authentication and access control are successful, the control device sends token information to the client proxy device. Then, the client proxy device sends an access request to the gateway device, and carries authentication information including the token information in the access request. The gateway device authenticates the access initiator based on the authentication information in the access request. If the authentication is successful, the gateway device establishes a connection with the server to transmit subsequent service packets between the client proxy device and the server, and if not, the gateway device closes the connection with the client proxy device.

[0060] In different scenarios, the client proxy device needs to solve the problem of how to forward the authentication information to the gateway device so that the gateway device can use the authentication information to identify whether the current session has the corresponding resource access permission.

[0061] In the B / S scenario, the browser of the terminal device is used as an application client to access a web application, as shown in Fig. 1. In this scenario, the client proxy device carries the token information in the cookie field of the HTTP protocol header by setting a browser cookie, as shown in Fig. 2.

[0062] As shown in Fig. 1, unlike the B / S scenario, the application forms of the C / S scenario are very rich and complex. For example, the plain text application field using File Transfer protocol (FTP) application, Telnet application, Secure Shell (SSH) protocol application, and Remote Desktop Protocol (RDP) application as an example, the encryption application field using File Transfer protocol via Secure Socket Layer (FTPS) and Web sockets as an example, and the proprietary protocol application field using desktop cloud interconnection and mini-programs as an example, etc. When the authentication information is carried in the application layer packet header of the packet, multiple application protocols need to be adapted and modified in the terminal device. Accordingly, the gateway device also needs to perform corresponding adaptation and modification in the protocol layer so that the gateway device can analyze and identify the authentication information carried in the packet sent by the terminal device. Therefore, this solution is difficult to implement and is not practical.

[0063] In view of the problem that the solution of transmitting authentication information by protocol layer adaptation is difficult to implement, research has proposed that when a tunnel is established between a client and a zero trust gateway, the authentication information is encapsulated in the packet header of the tunnel packet. This eliminates the need to perform protocol layer adaptation for various application fields, and the token information used for authentication can also be transferred. Specifically, after obtaining a service packet from an application client belonging to the same terminal device, the client proxy device initiates a tunnel establishment process with the gateway device and encapsulates the authentication information in the tunnel (the following will describe in detail how to carry the authentication information for different tunnels). Upon obtaining the tunnel packet, the gateway device first performs decapsulation on the tunnel packet header, extracts the relevant authentication information from the tunnel packet header, and performs authentication on the relevant authentication information. If the authentication fails, the gateway device blocks the service traffic. If the authentication is successful, the gateway device establishes a connection with the server providing the resource (the server providing the resource is also called a "real server" as opposed to a proxy server. The zero trust gateway establishes a connection with the terminal device by mapping a virtual IP address as a proxy server and replacing it with the real server), performs decapsulation on the tunnel traffic, and sends the decapsulated service packet to the server providing the resource. The above process meets the requirements of link security and real-time authentication in the C / S scenario.

[0064] Figure 3 shows a solution in which authentication information is transferred between the client proxy device and the gateway device through a TLS tunnel. It is assumed that there are three servers in the protected network. Server A provides a TCP service through port 7788 at IP address 10.19.13.181, server B provides an SSH service through port 22 at IP address 10.88.0.2, and server C provides a web service through port 80 at IP address 10.88.0.2. Depending on the configuration of the control device, the above three services are mapped to port 8443 at virtual IP address 10.0.3.11 of the gateway device. Before the terminal device accesses various applications, the client proxy device obtains the mapped virtual IP addresses and ports of each service that the terminal device and user are allowed to access, and the corresponding real server addresses and port numbers, from the control device by initiating an identification authentication and access control process.

[0065] After intercepting service packets sent by various applications running on the terminal device, the client proxy device starts to establish a TLS tunnel with the gateway device. The client proxy device carries token information and real server information used for authentication in the TLS extension option of the first TLS handshake packet Client Hello. For example, the TLS extension type is defined as 2000 (the extension type is not in the default TLS option). After being parsed, the contents of the carried data are as follows: json_content: { ”cmd”:”open”,#Bypass request "time":"1612350008",#UNIX operating system timestamp ”user_token”:”xxx”,#user token ”app_token”:”yyy”,#Application token ”terminal_id”:”zzz”, #Terminal device identifier (ID, identifier) ”terminal_ip”:”10.0.3.10”, #IP address of terminal device ”rserver_info”:”10.80.0.2:22”, # IP address and / or port number of the real server (Port) }

[0066] The gateway device extracts relevant authentication information and performs authentication to determine whether the terminal device is authorized to access the service provided at port 22 of IP address 10.80.0.2 carried in the TLS option field. If the authentication fails, the current session between the gateway device and the client proxy device is closed. If the authentication is successful, the gateway device initiates a connection with the real server based on the real server's information (i.e., IP address 10.80.0.2 and port number 22) obtained from the TLS option. Then, the gateway device completes the TLS tunnel establishment process with the client proxy device, performs TLS decapsulation and decryption on the tunnel packets subsequently received through the TLS tunnel, and forwards the service packets obtained by decapsulation and decryption to the real server.

[0067] FIG. 4 illustrates a solution in which token information is transferred between a client proxy device and a gateway device through an HTTPS tunnel. The application scenario is similar to that of FIG. 3. For details, please refer to the description of FIG. 3. After the client proxy device intercepts a service packet sent by an application running on a terminal device, the client proxy device initiates an HTTPS tunnel establishment process with the gateway device. HTTPS is also called HTTP over TLS / SSL. The client proxy device carries the relevant information of the real server in a Uniform Resource Identifier (URI) field of the Connect method of the HTTP application layer. As shown in FIG. 5, for example, the content of the Connect field carries the IP address 10.19.13.181, the port number 7788, and the open service protocol TCP of the real server currently accessed by the terminal device. The client proxy device carries the token information in a Cookie field. The token information includes an application token "aef7-a18534f3971bdcbea25-" and / or user token information (not shown), etc.

[0068] The gateway device obtains the token information carried in the packet header of the HTTPS tunnel packet using a protocol analysis procedure similar to that of the B / S scenario, and performs token authentication to determine whether the terminal device is authorized to access the TCP service provided by the port 7788 of the IP address 10.19.13.181 carried in the Connect field. If the authentication fails, the current session between the gateway device and the client proxy device is closed. If the token authentication is successful, a connection with the real server is initiated based on the real server's information carried in the Connect field (i.e., IP address 10.19.13.181 and port number 7788). The HTTPS tunnel establishment process with the client is completed, and the tunnel packets subsequently received through the HTTPS tunnel are decapsulated and decrypted, and the decapsulated and decrypted service packets are forwarded to the real server.

[0069] In the solution shown in FIG. 3 or FIG. 4, in a C / S scenario, the client proxy device needs to establish a new tunnel connection with the gateway device. The client proxy device needs to encapsulate the service packet to be sent, and the gateway device needs to perform decapsulation on the service packet to be sent. However, the encryption and decryption involved in the TLS tunnel or HTTPS tunnel of the client proxy device consumes a lot of performance. If the application accessed by the application client on the terminal device is an encryption protocol and meets the strong encryption requirement, for example, the FTPS protocol is already TLS encrypted, in this case TLS tunnel encapsulation or HTTPS tunnel encapsulation is not needed. In the client proxy device, creating a tunnel increases performance overhead, and in the gateway device, parallel processing is performed for the tunnel connections between multiple client proxy devices, which also generates high performance overhead.

[0070] Regarding the problem of high performance overhead in the solution shown in Fig. 3 or Fig. 4, the embodiment of the present application provides an access control method. In the solution shown in Fig. 3 or Fig. 4, the tunnel connection established between the client proxy device and the gateway device mainly considers link security and authentication. In the access control method provided in the embodiment of the present application, the following concepts are used to solve the considerations of these two points.

[0071] The first point is how to guarantee the security of network data transmission. For a session initiated by an application client that meets the encryption strength requirement, the client proxy device does not need to further perform encrypted tunnel encapsulation before forwarding the session negotiation packet to the gateway device, thereby reducing the overhead caused by additional encryption and decryption of the tunnel. Optionally, for a session initiated by an application client that does not meet the encryption strength requirement, encrypted tunnel encapsulation is further performed, for example HTTPS tunnel encapsulation, and link security is guaranteed by the tunnel.

[0072] The second point is to solve the problem of how to carry authentication information. For a session to be created that meets the encryption requirement, the client proxy device modifies the transport layer packet header of the original session negotiation packet to carry the authentication information, and multiplexes the original session negotiation packet. The gateway device obtains the authentication information from the transport layer packet header of the modified session negotiation packet, and performs authentication on the authentication information. If the currently obtained token information is invalid, the gateway device blocks the current session between the gateway device and the client proxy device, and if the currently obtained token information is valid, the gateway device establishes a connection with the real server, and forwards the subsequent service packets between the real server and the application client. Thus, the problem of authenticating the access initiator by the gateway device is solved. In this way, the client proxy device does not need to perform tunnel encapsulation on the service packet, and carries the token information through the tunnel packet header. This reduces the overhead caused by additional tunnel encryption and decryption.

[0073] Hereinafter, the main implementation principles, specific implementations and advantages of the technical solutions provided in the embodiments of the present application will be described in detail with reference to the accompanying drawings.

[0074] Figure 6 is a schematic diagram of an application scenario of an access control method according to an embodiment of the present application. Similar to Figures 1, 3, and 4, the scenario shown in Figure 6 includes an access control system and a protected application resource. The access control system includes three types of devices, namely a control device, a gateway device, and a terminal device. The protected application resource includes three servers in a protected network. Server A provides a TCP service through port 7788 at IP address 10.19.13.181, Server B provides an SSH service through port 22 at IP address 10.88.0.2, and Server C provides a web service through port 80 at IP address 10.88.0.2. According to the configuration of the control device, the above three services are mapped to port 8443 at virtual IP address 10.0.3.11 of the gateway device.

[0075] The control device is configured to, after performing access control and identification authentication for the terminal device and the user based on a request from the client proxy device, deliver authentication information and a list of accessible resources to the client proxy device, and deliver a control policy corresponding to the authenticated user to the gateway device, so that the gateway device controls the access of the terminal device to the protected application resources in accordance with the control policy.

[0076] The client proxy device is installed in the terminal device. Before the terminal device accesses various applications, the client proxy device further obtains, from the control device through an identification authentication and access control process, a virtual IP address and a port number of the gateway device to which each service that the terminal device and the user are permitted to access is mapped, and an address and a port number of the corresponding real server. The client proxy device is configured to intercept a packet sent by an application client on the terminal device where the client proxy device is located, and initiate the establishment of a connection with the gateway device based on the packet.

[0077] In the embodiment of the present application, only two terminal devices, i.e., terminal device A and terminal device B, are used as examples for explanation. When there are more terminal devices, the functions of other terminal devices are similar to those of terminal device A or terminal device B. The client proxy device A is installed in the terminal device A, and the client proxy device B is installed in the terminal device B.

[0078] The gateway device is configured to extract authentication information from traffic sent by the client proxy device, initiate authentication, and perform corresponding actions based on the authentication result, for example, when the authentication fails, the gateway device blocks a connection between the gateway device and the client proxy device, or when the authentication succeeds, the gateway device establishes a connection with the server, and transmits subsequent service packets between the application client and the server through the connection between the gateway device and the server.

[0079] In the embodiment of the present application, the following improvements are mainly made to the client proxy device and the gateway device.

[0080] After intercepting a session negotiation packet used by an application client to create a session with a server, the client proxy device provided in the embodiment of the present application adds authentication information to a transport layer packet header of the session negotiation packet to obtain a modified session negotiation packet when the session to be created meets the encryption strength requirement. The client proxy device sends the modified session negotiation packet to a gateway device, so that the gateway device authenticates the terminal device and the user based on the authentication information carried in the transport layer packet header of the modified session negotiation packet. In this way, the purpose of transferring the authentication information is achieved by reusing the session negotiation packet sent by the application client, and there is no need to further initiate a tunnel establishment process. The authentication information is transferred through the session negotiation packet in the tunnel establishment process initiated by the application client. This helps save the processing resources consumed for performing additional tunnel negotiation on the terminal device and the gateway device, and reduces the performance overhead of the terminal device and the gateway device.

[0081] After receiving a session negotiation packet from the client proxy device, the gateway device provided in the embodiment of the present application determines whether the transport layer packet header of the session negotiation packet carries authentication information. If the transport layer packet header of the session negotiation packet carries authentication information, the gateway device initiates authentication based on the authentication information carried in the transport layer packet header of the session negotiation packet. When the authentication is successful, the session negotiation packet is not decapsulated and is forwarded. In this way, when the session to be created initiated by the application client meets the encryption strength requirement, the gateway device does not need to perform tunnel decapsulation on the session negotiation packet, and obtains the authentication information from the application layer in this case. This saves processing resources and improves authentication efficiency and processing performance.

[0082] Optionally, when the session to be created between the application client and the server meets the encryption strength requirement, after the authentication is successful, the client proxy device and the gateway device may switch from proxy mode to stream mode to transmit the subsequent service packets, and do not need to perform tunnel transmission or proxy mode forwarding for the service packets. This may save the processing resources consumed by the terminal device and the gateway device to perform the tunnel-related encapsulation and decapsulation process and the encryption and decryption process that may be involved. Therefore, the performance overhead of the terminal device and the gateway device is reduced, and the overall performance of the access control system is improved.

[0083] Fig. 7 is a flow chart of an access control method according to an embodiment of the present application, including steps 701 to 704. The flow chart shown in Fig. 7 mainly illustrates the access control method provided in the embodiment of the present application from the perspective of a client proxy apparatus in a terminal device. Optionally, the terminal device in the embodiment shown in Fig. 7 is the terminal device A or the terminal device B in Fig. 6. Correspondingly, when the terminal device in Fig. 7 is the terminal device A in Fig. 6, the client proxy apparatus in the embodiment shown in Fig. 7 is the client proxy apparatus A in Fig. 6, and when the terminal device in Fig. 7 is the terminal device B in Fig. 6, the client proxy apparatus in the embodiment shown in Fig. 7 is the client proxy apparatus B in Fig. 6.

[0084] Step 701: The client proxy device intercepts a first negotiation packet, where the first negotiation packet is from a first application client on a terminal device and is used to perform negotiation to establish a first session with a first server, where the first session meets an encryption strength requirement.

[0085] In the zero trust C / S scenario, the terminal device enables a client proxy device installed on the terminal device by default. When an application client in the terminal device initiates a connection, the client proxy device intercepts a session negotiation packet sent by the application client.

[0086] In the embodiment of the present application, the "application client" is application client software installed on a terminal device, such as FTP client software using FileZilla as an example (FileZilla may be used as FTP client software or FTPS client software), or a command line telnet client built into Windows series operating systems. In the embodiment of the present application, the first negotiation packet is, for example, a session negotiation packet sent when the FileZilla client starts creating a first session with the FTPS server.

[0087] Optionally, the manner in which the client proxy device intercepts the session negotiation packet is related to a specific operating system. For example, Netfilter is a framework provided by the Linux kernel, which allows various network-related operations to be implemented in the form of customized processing programs. Netfilter provides various functions and operations for packet filtering, network address translation, and port translation. In the Linux operating system, the client proxy device intercepts the session negotiation packet and subsequent service packets from the application client by a Hook function added to Netfilter.

[0088] The client proxy device functions as a proxy device between the application client and the gateway device, and in the proxy mode communicates with the application client and the gateway device separately. For the application client, the client proxy device functions as a proxy server. For the gateway device, the client proxy device functions as a proxy client. Before receiving a session negotiation packet from the application client, the client proxy device first establishes a TCP connection with the application client by a three-way handshake process, and receives the session negotiation packet through the established TCP connection. Similarly, before step 702, the client proxy device establishes a TCP connection with the gateway device by a three-way handshake process, and in step 703, sends a modified session negotiation packet through the established TCP connection.

[0089] Optionally, the client proxy device or another component on the terminal device determines whether the session to be created corresponding to the intercepted session negotiation packet satisfies the encryption strength requirement. For example, when the client proxy device determines whether the session to be created satisfies the encryption strength requirement, the client proxy device first intercepts the session negotiation packet generated by the application client, and performs the steps shown in step 701a on the intercepted session negotiation packet. When the session to be created satisfies the encryption strength requirement, the intercepted session negotiation packet becomes the first negotiation packet, and the session to be created becomes the first session.

[0090] When the other component determines whether the first session meets the encryption strength requirement, the client proxy device first intercepts the packet generated by the application client, and the other component performs the steps shown in step 701a on the intercepted session negotiation packet. When the session to be created meets the encryption strength requirement, the intercepted session negotiation packet becomes the first negotiation packet, and the session to be created becomes the first session.

[0091] Step 701a: Based on the intercepted session negotiation packet, determine whether the session to be created meets the encryption strength requirement.

[0092] Optionally, after intercepting the session negotiation packet, the client proxy device performs a protocol analysis on the intercepted session negotiation packet to determine whether the session being negotiated meets the encryption strength requirement based on, for example, the protocol type and encryption strength-related information carried in the session negotiation packet. The encryption strength-related information carried in the session negotiation packet includes, but is not limited to, a protocol version number and / or a cipher suite identifier list.

[0093] In an embodiment of the present application, cases in which a session created by negotiation using a session negotiation packet satisfies the encryption strength requirement include at least one of the following: the session created by the session negotiation packet is an encrypted application, and / or the transmission security of the session to be created is higher than a pre-defined security standard based on information related to encryption strength carried in the session negotiation packet.

[0094] More specifically, in a first example in which a session satisfies the encryption strength requirement, the intercepted session negotiation packet carries a specified protocol version number, where the transmission security of an implementation of a protocol version corresponding to the specified protocol version number is higher than a pre-defined security standard, and data transmission is performed using the first session based on this protocol version.

[0095] In a second example in which the session meets the encryption strength requirement, the intercepted session negotiation packet includes a specified cipher suite identifier, where the specified cipher suite identifier identifies a specified cipher suite, and the transmission security implemented by the specified cipher suite is higher than the default security standard, and application data for the first session is encrypted based on the specified cipher suite.

[0096] In the embodiment of the present application, the case where the session created by the negotiation using the session negotiation packet does not satisfy the encryption strength requirement is another case other than the above case where the encryption strength requirement is satisfied. For example, the case where the session created by the negotiation using the session negotiation packet does not satisfy the encryption strength requirement includes, but is not limited to, at least two scenarios. In the first scenario, the client proxy device determines that the session created by the negotiation using the session negotiation packet is an encrypted application, but determines that the transmission security of the session to be created is lower than a predetermined security standard based on the information related to the encryption strength carried in the session negotiation packet, and in the second scenario, the client proxy device determines that the session created by the negotiation using the session negotiation packet is a plaintext application, i.e., an unencrypted application.

[0097] In this embodiment, an example is taken of the first negotiation packet being a Client Hello message. When the application client is an FTPS client, TLS layer encryption parameters need to be negotiated before the FTPS client requests to establish a connection with the FTPS server. In other words, a TLS tunnel needs to be negotiated. According to the existing TLS standard, a handshake process is performed between the client and the server to negotiate the TLS layer encryption parameters. In the handshake process, the client first sends a Client Hello message to the server, where the Client Hello message carries a protocol version number and a cipher suite identifier list.

[0098] After intercepting the Client Hello message, the client proxy device obtains the content carried in the Client Hello message by analysis, as shown in Fig. 8. In Fig. 8, a solid frame is used to indicate that the transport layer protocol header of the Client Hello message carries a protocol version number and a cipher suite identifier list. In the example shown in Fig. 8, the protocol version number carried in the Client Hello message is TLS1.2. After receiving the Client Hello message, the server selects a cipher suite according to the cipher suite identifier list carried in the Client Hello message, and then encrypts the service packet using the protocol corresponding to the protocol version number carried in the Client Hello message and the selected cipher suite.

[0099] The embodiment of the present application separately provides a method (method 1) in which the client proxy device determines whether the first session meets the encryption strength requirement based on a protocol version number, and a method (method 2) in which the client proxy device determines whether the first session meets the encryption strength requirement based on a cipher suite identifier list. Either of these two methods may be used, or these two methods may be used in combination.

[0100] Method 1

[0101] The encryption strength requirements pre-stored in the client proxy device include a set of protocol version numbers, where the transmission security of an implementation of a protocol version corresponding to a protocol version number in the set of protocol version numbers is higher than a predetermined security standard.

[0102] The client proxy device determines whether a protocol version number carried in the session negotiation packet belongs to a protocol version number set, and if the protocol version number carried in the session negotiation packet belongs to the protocol version number set, it is determined that the session meets the encryption strength requirement, or if the protocol version number carried in the session negotiation packet does not belong to the protocol version number set, it is determined that the session does not meet the encryption strength requirement.

[0103] For example, the protocol version number set included in the encryption strength requirement is {TLS1.2, TLS1.3}. If the protocol version number carried in the Client Hello message is TLS1.2, which belongs to the protocol version number set, it is determined that the session to be established satisfies the encryption strength requirement. If the protocol version number carried in the Client Hello message is TLS1.0, which does not belong to the protocol version number set, it is determined that the session to be established does not satisfy the encryption strength requirement.

[0104] Method 2

[0105] The encryption strength requirements pre-stored in the client proxy device include a cipher suite identifier set, and the transmission security implemented by the cipher suite corresponding to the cipher suite identifier in the cipher suite identifier set is higher than a default security standard.

[0106] The client proxy device determines whether the cipher suite identifier list carried in the first negotiation packet includes a cipher suite identifier in the cipher suite identifier set. If the cipher suite identifier list carried in the first negotiation packet includes a cipher suite identifier in the cipher suite identifier set, the client proxy device determines that the first session meets the encryption strength requirement, or if the cipher suite identifier list carried in the first negotiation packet does not include a cipher suite identifier in the cipher suite identifier set, the client proxy device determines that the first session does not meet the encryption strength requirement.

[0107] For example, the set of cipher suite identifiers included in the encryption strength requirements is: {TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 …} It is.

[0108] This set contains cipher suite identifiers that provide medium or high levels of encryption.

[0109] If the cipher suite identifier list carried in the Client Hello message includes one or more cipher suite identifiers in the cipher suite identifier set, then it is determined that the session to be established meets the encryption strength requirement, and if the cipher suite identifier list carried in the Client Hello message does not include any cipher suite identifiers in the cipher suite identifier set, then it is determined that the session to be established does not meet the encryption strength requirement.

[0110] The client proxy device determines that the first session meets the encryption strength requirement based on the first negotiation packet, and performs step 702 .

[0111] Step 702: The client proxy device adds authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet.

[0112] When the session to be established between the application client and the server meets the encryption strength requirement, it indicates that the session has an encryption mechanism and link security can be guaranteed. In this case, the client proxy device does not need to establish an additional encrypted tunnel with the gateway device to guarantee link security. To transfer the authentication information, the client proxy device may multiplex the original session negotiation packet to carry the authentication information. Still using the Client Hello message as an example, the client proxy device adds a new TLS option (Option) field to the transport layer packet header of the Client Hello message, and carries the authentication information in the newly added TLS option field. In a specific implementation, the authentication information includes, but is not limited to, one of several pieces of information shown in Table 1, or a combination of at least two of the several pieces of information.

[0113] [Table 1]

[0114] Optionally, the authentication information further includes a timestamp, an IP address of the terminal device, a current operating status of the terminal device, or security scan results, etc., which are not listed one by one in this specification.

[0115] Optionally, to distinguish the case where the gateway device carries authentication information in a transport layer packet header from the solution of FIG. 3, the client proxy device checks that the session negotiation packet sent by the client proxy device is a multiplexed session negotiation packet when the session to be created meets the encryption strength requirement, or a tunnel packet obtained by additional encapsulation, so that decapsulation is not performed when the session negotiation packet is multiplexed, and when multiplexing the session negotiation packet, the client proxy device instructs the gateway device in a default or explicit manner to skip performing tunnel decapsulation on the first negotiation packet.

[0116] For example, by default, if the transport layer packet header of the session negotiation packet carries authentication information, which indicates that the session to be created meets the encryption strength requirement, the gateway device skips performing tunnel decapsulation on the first negotiation packet. If the session to be created does not meet the encryption strength requirement, the client proxy device carries authentication information in the application layer packet header of the tunnel packet after performing tunnel encapsulation on the session negotiation packet.

[0117] For example, in the explicit method, when the session to be created meets the encryption strength requirement, the client proxy device not only carries the authentication information in the transport layer packet header of the first negotiation packet, but also carries the indication information. The indication information allows the gateway device to skip performing decapsulation on the modified first negotiation packet. The specific location of the indication information in the transport layer packet header is not limited in this specification.

[0118] In a specific implementation, the embodiment of the present application further provides a different way of carrying indication information, that is, when authentication information is carried in a TLS option field, the TLS option field conforms to a TLV structure, in which a type T field is used to carry indication information, which is used to enable a gateway device to skip performing a TLS decapsulation process on the modified session negotiation packet, and a value V field is used to carry authentication information.

[0119] Step 703: The client proxy device sends the modified first negotiation packet to the gateway device.

[0120] In the embodiment of the present application, after intercepting the session negotiation packet of the session that meets the encryption strength requirement initiated by the first application client, the client proxy device adds authentication information to the transport layer packet header of the session negotiation packet to obtain a modified session negotiation packet, and sends the modified session negotiation packet to the gateway device, so that the gateway device authenticates the terminal device and the user according to the authentication information carried in the transport layer packet header of the session negotiation packet. In this way, the original session negotiation packet of the application client is multiplexed between the client proxy device and the gateway device to implement the purpose of transferring authentication information. In this way, under the premise of ensuring the security of the connection and transferring the authentication information, the client proxy device and the gateway device do not need to establish an additional encrypted tunnel. This helps to save the processing resources consumed for performing additional tunnel negotiation in the terminal device and the gateway device, and reduces the performance overhead of the terminal device and the gateway device.

[0121] Optionally, the gateway device authenticates the session initiator based on the modified first negotiation packet sent in step 703. If the authentication is successful, the client proxy device performs steps 704 and 705.

[0122] Step 704: The client proxy device receives a negotiation success packet sent by the gateway device, where the negotiation success packet indicates that the first session has been successfully established.

[0123] After successfully authenticating the terminal device and the user based on the authentication information carried in the modified session negotiation packet sent in step 703, the gateway device sends a negotiation success packet to the client proxy device through the TCP connection between the gateway device and the client proxy device to complete the TLS handshake with the client proxy device. The client proxy device sends a negotiation success packet to the application client through the TCP connection between the client proxy device and the first application client to complete the TLS handshake with the first application client. In this way, a session between the first application client and the first server is substantially successfully created, and the first application client and the first server can start transmitting service packets through the created session, and the client proxy device performs step 705 after step 704.

[0124] Step 705: The client proxy device forwards subsequent service packets of the first session.

[0125] If the gateway device successfully authenticates the terminal device and the user based on the authentication information carried in the modified session negotiation packet, the client proxy device does not need to establish an additional encrypted tunnel to transmit subsequent service packets of the first session between the first application client and the gateway device, which saves processing resources consumed by the terminal device and the gateway device for performing the tunnel encapsulation and decapsulation processes and the encryption and decryption processes that may be involved, helps to reduce the performance overhead of the terminal device and the gateway device, and improves the overall performance of the access control system.

[0126] The above FTPS client software is also used as an example to describe the subsequent service packet of the first session, which includes the FTPS client software sending a file download request to the FTPS server, the download request carrying parameters such as file name and download path, and the FTPS server returning the requested resource file to the FTPS client software, or the FTPS client software sending a file upload request to the FTPS server, the upload request carrying parameters such as file size and upload path, and the FTPS server returning a file upload success result or a file upload failure result to the FTPS client software.

[0127] The client proxy device relays and forwards subsequent service packets of a session created between the application client and the server. Optionally, the client proxy device can transmit subsequent packets of a session between the application client and the server in multiple different ways. In the embodiment of the present application, only two ways are described as an example.

[0128] Method 1

[0129] The client proxy device continues to transmit subsequent packets of the first session in proxy mode.

[0130] Please refer to the above description. The client proxy device operates in a proxy mode between the application client and the gateway device, and the client proxy device maintains a TCP connection between the client proxy device and the application client and a TCP connection between the client proxy device and the gateway device separately. The two TCP connections are established by independent three-way handshake processes, so that the sequence numbers and acknowledgment numbers in the packets transmitted on the two TCP connections are independent of each other. After step 705, the implementation of the client proxy device transmitting subsequent packets of the session between the application client and the server is that the client proxy device continues to transmit service packets between the application client and the gateway device through the two TCP connections respectively. For example, the client proxy device performs a transport layer analysis on the service packet sent by the application client to obtain a transport layer payload, and then adds a transport layer packet header to the transport layer payload obtained by the analysis based on the state information related to the TCP connection between the client proxy device and the gateway device maintained by the client proxy device to obtain a new service packet, and then transmits the new service packet to the gateway device through the TCP connection between the client proxy device and the gateway device. The principle of transmitting service packets in the reverse direction is similar, and will not be described in detail in this specification.

[0131] Method 2

[0132] The client proxy device transmits subsequent packets of the first session in a stream mode, specifically, the subsequent packets of the first session from the first application client are forwarded to a gateway device, and the subsequent packets of the first session from the gateway device are forwarded to the first application client, where the subsequent packets of the first session from the gateway device are responsive to the subsequent packets of the first session from the first application client.

[0133] As mentioned above, when the session to be created between the application client and the server meets the encryption strength requirement, the client proxy device may multiplex packets sent from the application client without tunnel encapsulation. This means that after the authentication is successful, in the forwarding process of the subsequent service packets of the client proxy device, for one forwarding process, the data carried in the service packets forwarded to the gateway device (packets after forwarding) is the same as the data carried in the packets received from the application client (packets before forwarding), and only the packet sequence (SYN) number and the acknowledgement (ACK) number may be different. Optionally, based on this idea, in order to further save the processing resources in the client proxy device, after the authentication is successful, the client proxy device switches from the proxy mode to the stream mode, and if the sequence numbers and acknowledgement numbers of the subsequent packets are adjusted during forwarding, the application client and the server may correctly reassemble the service packets without interrupting the session. There is no need to continue to operate in the proxy mode between the application client and the gateway device.

[0134] In order to obtain the difference in sequence numbers and acknowledgment numbers required for performing forwarding in stream mode before and after a packet is forwarded by the client proxy device, the client proxy device needs to record the sequence number and acknowledgment number of the SYN packet and the sequence number of the SYN+ACK packet in two independent three-way handshake processes when the client proxy device operates in proxy mode, and adjust the sequence number and acknowledgment number of the subsequent packet according to the difference in the sequence numbers and the difference in the acknowledgment numbers of the corresponding packets in the two three-way handshake processes. Figure 9 is a schematic diagram of the sequence numbers and acknowledgment numbers of packets that need to be recorded in the process of establishing a three-way connection by an application client, a client proxy device, and a gateway device.

[0135] 9, the client proxy device records the sequence number and acknowledgment number of the SYN packet sent by the application client, the sequence number and acknowledgment number of the SYN packet sent by the client proxy device functioning as a proxy client, and the sequence number of the SYN+ACK packet sent by the server (the sequence number of the SYN+ACK packet sent by the server is equivalent to the sequence number of the SYN packet sent by the client proxy device functioning as a proxy client). The sequence number of the SYN+ACK packet sent by the client proxy device functioning as a proxy server (the acknowledgment number of the SYN+ACK packet sent by the client proxy device functioning as a proxy server is equivalent to the sequence number of the SYN packet sent by the application client).

[0136] Based on the recorded information, the client proxy device determines the difference in sequence numbers and the difference in acknowledgement numbers before and after the transfer.

[0137] For example, SEQ_REQ_OFFSET is used to represent the difference in sequence numbers before and after a client proxy device forwards a packet from an application client, and the value of SEQ_REQ_OFFSET is the difference between the sequence number of a SYN packet sent by a client proxy device acting as a proxy client and the sequence number of a SYN packet sent by the application client.

[0138] SEQ_REQ_OFFSET=PC_SYN_SEQ-C_SYN_SEQ

[0139] For example, ACK_REQ_OFFSET is used to represent the difference in the acknowledgment number before and after a client proxy device forwards a packet from an application client, and the value of ACK_REQ_OFFSET is the difference between the acknowledgment number of a SYN packet sent by a client proxy device functioning as a proxy client and the acknowledgment number of a SYN packet sent by an application client.

[0140] ACK_REQ_OFFSET=PC_SYN_ACK-C_SYN_ACK

[0141] For example, SEQ_RESP_OFFSET is used to represent the difference in sequence numbers before and after a client proxy device forwards a packet from a server, and the value of SEQ_RESP_OFFSET is the difference between the sequence number of the SYN+ACK packet sent by the client proxy device acting as a proxy server and the sequence number of the SYN+ACK packet sent by the server.

[0142] SEQ_RESP_OFFSET=PS_SYN+ACK_SEQ-S_SYN+ACK_SEQ

[0143] For example, ACK_RESP_OFFSET is used to represent the difference in the acknowledgment number before and after a client proxy device forwards a packet from a server, and the value of ACK_RESP_OFFSET is the difference between the acknowledgment number of the SYN+ACK packet sent by the client proxy device acting as a proxy server and the acknowledgment number of the SYN+ACK packet sent by the server.

[0144] ACK_RESP_OFFSET=PS_SYN+ACK_ACK-S_SYN+ACK_ACK=C_SYN_SEQ-PC_SYN_SEQ

[0145] The acknowledgment number of the SYN+ACK packet sent by the client proxy device acting as a proxy server is equal to the sequence number of the SYN packet sent by the application client, and the acknowledgment number of the SYN+ACK packet sent by the server is equal to the sequence number of the SYN packet sent by the client proxy device acting as a proxy client. Therefore, the value of ACK_RESP_OFFSET is the difference between the sequence number of the SYN packet sent by the application client and the sequence number of the SYN packet sent by the client proxy device acting as a proxy client.

[0146] In addition, the client proxy device adjusts the sequence number and acknowledgement number of the service packet (shortly called "client service packet") sent by the application client in the stream mode packet forwarding process using the above difference, and adjusts the sequence number and acknowledgement number of the service packet (shortly called "server service packet") from the server responding to the client service packet. Figure 10 is a detailed schematic diagram of the adjustment of forwarded packets by the client proxy device according to an embodiment of the present application.

[0147] 10, an application client, a client proxy device, and a gateway device are arranged in that order from left to right. The application client and the client proxy device are located in a terminal device.

[0148] Optionally, the application client of FIG. 10 is located in terminal device A or terminal device B of FIG. 6, or is an application client of FIG. 8 or FIG. 9, such as, for example, the FTPS client FileZilla mentioned above.

[0149] The client proxy device in FIG. 10 is the client proxy device A or the client proxy device B in FIG. 6, or the client proxy device in FIG. 8 or FIG.

[0150] The gateway device of FIG. 10 is the gateway device of FIG. 6, FIG. 7 or FIG.

[0151] Please refer to Figure 10. First, from left to right, we will describe the process in which the client proxy device adjusts a packet sent by the application client after the three-way handshake. It is assumed that the sequence number of the packet sent by the application client (represented by TCP_packet A) is represented by C_SEQ and the acknowledgement number is represented by C_ACK. It is assumed that the packet obtained after the client proxy device adjusts the sequence number and acknowledgement number of TCP_packet A is represented by TCP_packet B.

[0152] The client proxy device adds the sequence number C_SEQ of TCP_packet A, the difference SEQ_REQ_OFFSET between the sequence numbers before and after the client proxy device forwards the packet from the application client, and an offset (indicated by TLS_OptionLen) generated by adding the length of the TLS option field, to obtain the sequence number of TCP_packet B. In other words, the value of the sequence number of TCP_packet B is C_SEQ+SEQ_REQ_OFFSET+TLS_OptionLen.

[0153] The client proxy device adds the acknowledgment number C_ACK of TCP_packet A to the difference ACK_REQ_OFFSET between the acknowledgment numbers before and after the client proxy device forwards the packet from the application client, to obtain the acknowledgment number of TCP_packet B. In other words, the value of the acknowledgment number of TCP_packet B is C_ACK+ACK_REQ_OFFSET.

[0154] From right to left, the following describes the process in which the client proxy device adjusts the packet sent by the gateway device after the three-way handshake. It is assumed that the sequence number of the packet sent by the gateway device (represented by TCP_packet C) is represented by S_SEQ and the acknowledgement number is represented by S_ACK. It is assumed that the packet obtained after the client proxy device adjusts the sequence number and acknowledgement number of TCP_packet C is represented by TCP_packet D.

[0155] The client proxy device adds the sequence number S_SEQ of TCP_packet C to the difference SEQ_RESP_OFFSET between the sequence numbers before and after the client proxy device forwards the packet from the server, to obtain the sequence number of TCP_packet D. In other words, the value of the sequence number of TCP_packet D is S_SEQ+SEQ_RESP_OFFSET.

[0156] The client proxy device adds the acknowledgment number S_ACK of TCP_packet C to the difference ACK_REQ_OFFSET between the acknowledgment numbers before and after the client proxy device forwards the packet from the application client, and subtracts the offset (indicated by TLS_OptionLen) caused by the length of the TLS option field to obtain the acknowledgment number of TCP_packet D. In other words, the value of the acknowledgment number of TCP_packet B is S_ACK+ACK_RESP_OFFSET-TLS_OptionLen.

[0157] Table 2 provides a brief explanation of some of the symbols in Figures 9 and 10.

[0158] [Table 2]

[0159] FIG. 11 is a flow chart of an access control method according to an embodiment of the present application, including step 111 to step 115. Both FIG. 11 and FIG. 7 show the access control method provided in the embodiment of the present application from the perspective of a client proxy device. The difference between FIG. 11 and FIG. 7 is that FIG. 7 uses an example of a first negotiation packet sent by a first application client on a terminal device to describe an access control method when a session to be created satisfies an encryption strength requirement, whereas FIG. 11 uses an example of a second negotiation packet sent by a second application client on a terminal device to describe an access control method when a session to be created does not satisfy an encryption strength requirement, which is an optional supplement to the embodiment shown in FIG. 7. The application scenario of FIG. 11 is similar to that of FIG. 7 and will not be repeated in this specification.

[0160] Step 111: The client proxy device intercepts a second negotiation packet, where the second negotiation packet is from a second application client on the terminal device and is used to perform negotiation to establish a second session with a second server, and the second session does not meet the encryption strength requirement.

[0161] Optionally, the step of the client proxy device or another component determining whether the session to be created satisfies the encryption strength requirement is similar to step 701. For example, when the client proxy device determines whether the session to be created satisfies the encryption strength requirement, the client proxy device intercepts a session negotiation packet generated by the application client and performs the steps shown in step 111a on the session negotiation packet. When the other component determines whether the session to be created satisfies the encryption strength requirement, after performing the steps shown in step 111a on the intercepted session negotiation packet, the other component sends a negotiation packet of the session to be created that does not satisfy the encryption strength requirement to the client proxy device.

[0162] In the embodiment of the present application, the second negotiation packet is, for example, a session negotiation packet sent when the telnet client starts creating a second session with the telnet server.

[0163] Step 111a: Based on the intercepted negotiation packet, determine whether the session to be created meets the encryption strength requirement.

[0164] The user enters a command on the telnet client, such as "telnet 192.168.10.132", where 192.168.10.132 is the IP address of the telnet server. The telnet client and the telnet server set up a TCP connection via a three-way handshake. The user is then prompted to log into the telnet server by entering a username and password. After successful login, the user enters a control command into the telnet client, such as the command ls to display a directory listing. The second negotiation packet is a SYN packet.

[0165] In the embodiment of the present application, the client proxy device determines based on the second negotiation packet that the session created by the negotiation is an unencrypted application, in which case the encryption requirement is not met.

[0166] In the embodiment of the present application, if the client proxy device determines based on the second negotiation packet that the second session does not meet the encryption strength requirement, step 112 is performed.

[0167] Step 112: The client proxy device performs tunnel encapsulation on the second negotiation packet to obtain a tunnel negotiation packet, where a packet header of the tunnel negotiation packet includes authentication information corresponding to the second application client. The tunnel negotiation packet is used to perform negotiation to establish an encrypted tunnel between the client proxy device and the gateway device.

[0168] Step 113: The client proxy device sends a tunnel negotiation packet to the gateway device.

[0169] Optionally, when the second session to be created does not meet the encryption strength requirement, the client proxy device performs tunnel negotiation with the gateway device, and negotiates to establish an encrypted tunnel between the client proxy device and the gateway device, for example, the TLS tunnel or the HTTPS tunnel shown in Fig. 3 or Fig. 4. When a TLS tunnel is established between the client proxy device and the gateway device, the client proxy device carries the authentication information in the TLS option field of the Client Hello message. When an HTTPS tunnel is established between the client proxy device and the gateway device, the client proxy device carries the authentication information in the Connect field and the cookie field of the application layer packet header.

[0170] Since the tunnel negotiation packet carries the authentication information, the gateway device authenticates the terminal device and the user using the authentication information carried in the tunnel negotiation packet. Furthermore, the service packets from the telnet client and the service packets returned from the telnet server are encapsulated through the encrypted tunnel established by the negotiation to meet the link security requirement.

[0171] After sending the tunnel negotiation packet, the client proxy device receives a tunnel establishment success packet sent by the gateway device in response, where the tunnel establishment success packet indicates that the encrypted tunnel has been successfully established.

[0172] Step 114: After the encrypted tunnel is successfully established, the client proxy device transmits subsequent packets of the second session through the encrypted tunnel.

[0173] The client proxy device sends subsequent packets of the second session from the second application client to the gateway device through the encrypted tunnel. Specifically, after intercepting the subsequent packets of the second session from the second application client, the client proxy device encapsulates the subsequent packets of the second session from the second application client based on the encrypted tunnel established by the negotiation in step 114 to obtain tunnel packets, and sends the tunnel packets to the gateway device. Optionally, after receiving the tunnel packets, the gateway device performs decapsulation on the tunnel packets, and sends the packets obtained by the decapsulation to the second server.

[0174] Furthermore, the client proxy device receives subsequent packets of the second session from the gateway device through the encrypted tunnel. Specifically, the client proxy device receives tunnel packets from the gateway device, performs decapsulation on the received tunnel packets to obtain subsequent packets of the second session from the second server, and transmits the subsequent packets of the second session from the gateway device obtained by the decapsulation to the second application client.

[0175] The implementation process of step 111 is basically similar to that of step 701 in Fig. 7. The authentication information included in step 112 is also similar to the authentication information included in step 702 in Fig. 7. For similarities, please refer to the relevant descriptions of steps 701 and 702 in the above embodiments. Details will not be repeated in this specification.

[0176] According to the access control method provided in the embodiment of the present application, after intercepting the session negotiation packet belonging to the session initiated by the second application client that does not meet the encryption strength requirement, the client proxy device negotiates with the gateway device to establish an additional encrypted tunnel. Since the tunnel negotiation packet carries authentication information, the gateway device authenticates the terminal device and the user using the authentication information carried in the tunnel negotiation packet. Furthermore, the service packets in plain text form between the application client and the server are encapsulated through the encrypted tunnel established by the negotiation to ensure that the link security requirement is met.

[0177] Figure 12 is a flow chart of an access control method according to an embodiment of the present application, including step 121 to step 126. The flow chart shown in Figure 12 shows the access control method provided in the embodiment of the present application mainly from the perspective of a gateway device. Optionally, the gateway device in the embodiment shown in Figure 12 is the gateway device in the embodiment shown in Figure 6 to Figure 11. The gateway device in Figure 12 cooperates with the terminal device or the server in the embodiment shown in Figure 6 to Figure 11 to implement access control in the terminal device.

[0178] Step 121: The gateway device receives a first negotiation packet, where the first negotiation packet is from a first client proxy device and is used to perform negotiation to establish a first session, the first session being a session between a first terminal device and a first server, the first client proxy device running on the first terminal device, and a transport layer packet header of the first negotiation packet carries authentication information.

[0179] Optionally, after receiving the first negotiation packet, the gateway device first determines whether the transport layer packet header of the first negotiation packet carries authentication information. For example, the gateway device performs protocol analysis on the first negotiation packet and tries to obtain authentication information in the transport layer packet header of the first negotiation packet. For example, when the first negotiation packet is a Client Hello message, the gateway device determines whether a TLS option exists in the transport layer packet header of the Client Hello message, and obtains authentication information carried in the TLS option field of the Client Hello message if the TLS option exists. For a description of the authentication information, please refer to the description of step 702 in FIG. 7. Details will not be repeated in this specification.

[0180] When the transport layer packet header of the first negotiation packet carries authentication information, the gateway device performs step 122 .

[0181] Step 122: The gateway device initiates a first authentication based on the authentication information.

[0182] There are several authentication implementations. In the present application, only two of the implementations are briefly described. Other authentication implementations can be obtained based on the detailed adjustment and modification of the authentication implementations.

[0183] Optionally, in one authentication scheme, the gateway device compares authentication information obtained from the transport layer packet header of the first negotiation packet with a control policy previously delivered by a control device corresponding to the authenticated user, and determines whether to allow the initiator (user and terminal device) of the first negotiation packet access to the requested service.

[0184] Optionally, each policy in the control policies corresponding to an authenticated user includes a matching condition and a matching action, and the matching condition includes one or more of the following: a token of one authenticated user, an identifier of an authenticated terminal device, a token of an application that can be used by the authenticated user, and address information of a server that the authenticated user is allowed to access. The action includes one or more of the following: permission to access, charging, and traffic restriction, etc.

[0185] Optionally, in another authentication method, the gateway device sends authentication information obtained from the transport layer packet header of the first negotiation packet to the control device, and receives an authentication result returned by the control device. The control device dynamically determines the authentication result according to stored policies and other authentication-related information, such as, for example, the state of the network topology and the state of each involved resource (for example, the current operating state of the first server).

[0186] If it is determined that the initiator of the first negotiation packet is not authorized to access the requested service according to a control policy corresponding to the authenticated user, then authentication is determined to have failed, and if it is determined that the initiator of the first negotiation packet is authorized to access the requested service according to a control policy corresponding to the authenticated user, then authentication is determined to have succeeded.

[0187] If the first authentication is successful, the gateway device performs steps 123 , 125 , and 126 .

[0188] Optionally, if the first authentication fails, the gateway device performs step 124.

[0189] Step 123: The gateway device skips performing tunnel decapsulation on the first negotiation packet, and forwards the first negotiation packet to the first server to establish a first connection, where the first connection is a connection between the gateway device and the first server.

[0190] In this embodiment, skipping the performance of tunnel decapsulation on the first negotiation packet refers to skipping the removal of the tunnel packet header of the first negotiation packet, and is also referred to as "skip tunnel decapsulation" or "skip tunnel decapsulation."

[0191] Optionally, in the embodiment of the present application, the gateway device skips performing tunnel decapsulation for the first negotiation packet based on the indication information carried in the first negotiation packet. For the function and carrying manner of the indication information, please refer to the description of step 702 in the related embodiment of Figure 7. Details are not repeated in this specification.

[0192] Optionally, forwarding the first negotiation packet to the first server includes at least the gateway device forwarding the first negotiation packet to the first server as is, or the gateway device removing the authentication information from the first negotiation packet and then forwarding the first negotiation packet with the authentication information removed to the first server. Because the authentication information is carried in a transport layer packet header, tunnel decapsulation is not required when only the authentication information is removed.

[0193] Also in the example where the first negotiation packet is a Client Hello message, in step 123 the gateway device either forwards the Client Hello message carrying the authentication information in the TLS option field to the first server as is, or removes the TLS option field from the Client Hello message and sends the Client Hello message with the TLS option field removed to the first server.

[0194] Optionally, after step 123, in addition to establishing the first connection, the gateway device further establishes a connection between the gateway device and the first client proxy device. In this embodiment, the connection between the gateway device and the first client proxy device is called a second connection for short. Steps 125 and 126 are performed.

[0195] Step 125: After the first authentication is successful, the second connection is successfully established.

[0196] Step 126: The gateway device transmits subsequent packets of the first session through the first connection and the second connection. Specifically, the gateway device receives subsequent packets of the first session sent by the first client proxy device through the second connection, and forwards the subsequent packets of the first session from the first client proxy device to the first server through the first connection.

[0197] A subsequent packet of the first session is received from the first server via the first connection, and the subsequent packet of the first session is forwarded from the first server to the first client proxy device via the second connection.

[0198] Step 124: The gateway device completes the establishment of the second connection. In other words, the gateway device closes the connection between the gateway device and the first client proxy device used to transmit the first negotiation packet.

[0199] In the embodiment of the present application, if the gateway device successfully authenticates the terminal device and the user based on the authentication information carried in the modified session negotiation packet, an additional encrypted tunnel does not need to be established between the first client proxy device and the gateway device to transmit subsequent service packets of the first session, which helps save the processing resources consumed by the terminal device and the gateway device for performing the tunnel encapsulation or decapsulation process and the encryption and decryption processes that may be involved, reduces the performance overhead of the terminal device and the gateway device, and improves the overall performance of the access control system.

[0200] The gateway device relays and forwards subsequent service packets of the session created between the first application client and the server. Optionally, the gateway device performs packet forwarding in proxy mode. The principle of the proxy mode is basically similar to that of the proxy mode when the client proxy device performs packet forwarding. For details, please refer to the relevant description of step 705 of the embodiment shown in Figure 7. The details will not be repeated in this specification.

[0201] Figure 13 is a flow diagram of an access control method according to an embodiment of the present application, including step 131 to step 135. Both Figure 13 and Figure 12 show the access control method provided in the embodiment of the present application from the perspective of a gateway device. The difference between Figure 13 and Figure 12 is that Figure 12 shows the access control method when the transport layer packet header of the session negotiation packet carries authentication information, while Figure 13 shows the access control method when the transport layer packet header of the session negotiation packet does not carry authentication information, as an optional supplement to the embodiment shown in Figure 12.

[0202] Step 131: The gateway device receives a second negotiation packet, where the second negotiation packet is from a second client proxy device and is used to perform negotiation to establish a second session with a second server. The second client proxy device runs on a second terminal device, and a transport layer packet header of the second negotiation packet does not carry authentication information.

[0203] Optionally, since a client proxy device on one terminal device may complete zero trust-related functions for multiple application clients running on that terminal, the second terminal device in FIG. 13 and the first terminal device in FIG. 12 may be the same terminal device or different terminal devices, and the second client proxy device in FIG. 13 and the first client proxy device in FIG. 12 may be the same client proxy device or different client proxy devices.

[0204] Optionally, the gateway device determines that the transport layer packet header of the second negotiation packet does not carry authentication information using a method similar to that of step 121. The gateway device performs protocol analysis on the second negotiation packet to determine whether the session negotiation packet is of a predetermined protocol or a predetermined packet format. For example, when the second negotiation packet is a Client Hello message, the gateway device attempts to obtain the authentication information carried in the Client Hello message from a TLS option field of the Client Hello message. If the TLS option field is not present in the Client Hello message, it is determined that the Client Hello message does not carry authentication information.

[0205] If the transport layer packet header of the second negotiation packet does not carry authentication information, it indicates that the client proxy device fails to multiplex the session negotiation packet to transfer the authentication information. In this case, the session negotiation packet is actually a packet sent by the client proxy device to initiate the creation of an additional encrypted tunnel.

[0206] If the transport layer packet header of the second negotiation packet does not carry authentication information, the gateway device performs step 132 .

[0207] The implementation process of step 131 is basically similar to that of step 121, and the implementation process of step 132 is also similar to that of step 122. For similarities, please refer to the relevant descriptions of step 121 and step 122 in the above embodiments. Details will not be repeated in this specification.

[0208] Step 132: The gateway device obtains authentication information from the application layer packet header of the second negotiation packet, and initiates a second authentication based on the authentication information obtained from the application layer packet header of the second negotiation packet.

[0209] Optionally, in an embodiment of the present application, the application layer packet header includes, but is not limited to, an HTTP packet header. Of course, the application layer packet header may also be a packet header of another encryption application.

[0210] Take an example where the application layer packet header is an HTTPS packet header. When the client proxy device carries the address information of the real server in the Connect field of the HTTP packet header and the token information in the Cookie field, the gateway device uses the data read from the Connect field and the Cookie field as authentication information.

[0211] For details of the authentication process, please refer to the description of step 122 in Figure 12. Details will not be repeated here.

[0212] If the first authentication process is successful, the gateway device performs steps 133, 134, and 135; if the second authentication fails, the gateway device performs step 136.

[0213] Step 133: The gateway device performs tunnel decapsulation on the second negotiation packet, and sends the packet obtained by decapsulation to the second server to establish a third connection, where the third connection is a connection between the gateway device and the second server.

[0214] Step 134: The gateway device establishes an encrypted tunnel between the gateway device and the second client proxy device.

[0215] Step 135: The gateway device transmits subsequent packets of the second session through the encrypted tunnel and the third connection.

[0216] Specifically, the gateway device receives subsequent packets of the second session subsequently transmitted by the second client proxy device through the encrypted tunnel, performs decapsulation on the received tunnel to obtain the subsequent packets of the second session from the second client proxy device, and forwards the subsequent packets of the second session from the second client proxy device to the second server through the third connection.

[0217] The gateway device receives subsequent packets of the second session from the second server via the third connection, where the subsequent packets of the second session from the second server are responsive to the subsequent packets of the second session from the second client proxy device. After performing tunnel encapsulation on the subsequent packets of the second session from the second server, the gateway device transmits the tunnel packets obtained by the encapsulation to the second client proxy device.

[0218] Step 136: The gateway device finishes establishing the encrypted tunnel with the second client proxy device.

[0219] According to the access control method provided in the embodiment of the present application, when failing to obtain authentication information from the packet header of the session negotiation packet, the gateway device obtains authentication information from the application layer packet header of the session negotiation packet actually provided as a tunnel negotiation packet, when the authentication is successful, the gateway device transmits the service packet in plain text format between the application client and the server through an encrypted tunnel additionally established between the gateway device and the client proxy device to ensure that the link security requirement is met.

[0220] Fig. 14 is a schematic diagram of an access control method according to an embodiment of the present application. Fig. 14 shows the interaction process between an application client, a client proxy device, a gateway device, a server and a control device in the form of a sequence diagram when a session to be created meets the encryption strength requirement. Fig. 14, Fig. 7 and Fig. 12 separately show the access control method from different perspectives in the same scenario, specifically, when a session to be created meets the encryption strength requirement. These embodiments can be mutually referenced, and similar details will not be described in detail.

[0221] As shown in Fig. 14, an FTPS client on a terminal device initiates a session creation to an FTPS server. The session negotiation packet sent by the FTPS client is a Client Hello message. When a client proxy device on the same terminal device determines that the negotiated session meets the encryption strength requirement based on the encryption strength-related information carried in the Client Hello message, such as a protocol version number and / or a cipher suite identifier list, a TLS option field is newly added to the Client Hello message, and this TLS option field carries authentication information. The client proxy device sends the Client Hello message carrying the authentication information in the TLS option field to the gateway device.

[0222] The gateway device performs analysis on the received Client Hello message, extracts authentication information from the TLS option field, and interacts with the control device based on the authentication information to complete the authentication. If the authentication fails, the gateway device terminates the establishment of a connection with the client proxy device. Then, the client proxy device closes the connection with the FTPS client. If the authentication is successful, the gateway device establishes a connection with the FTPS server and completes a TLS handshake with the client proxy device, and then the client proxy device completes a TLS handshake with the FTPS client. The client proxy device records information required to adjust the sequence number and acknowledgment number of subsequent service packets, and switches from a proxy mode to a stream mode.

[0223] The client proxy device intercepts an FTPS service packet (shortly referred to as a "client FTPS service packet") sent by an FTPS client, adjusts a sequence number and an acknowledgment number of the client FTPS service packet to obtain an adjusted client FTPS service packet, and sends the adjusted client FTPS service packet to a gateway device. The gateway device forwards the adjusted client FTPS service packet to an FTPS server.

[0224] The client proxy device receives an FTPS service packet (shortened to be "server FTPS service packet") forwarded by the gateway device and responded to by the FTPS server, adjusts the sequence number and the acknowledgment number of the server FTPS service packet to obtain an adjusted FTPS service packet of the FTPS server, and sends the adjusted FTPS service packet of the FTPS server to the FTPS client.

[0225] Fig. 15 is a schematic diagram of an access control method according to an embodiment of the present application. Fig. 15 shows the interaction process between an application client, a client proxy device, a gateway device, a server and a control device in the form of a sequence diagram when a session to be created does not meet the encryption strength requirement. Fig. 15, Fig. 11 and Fig. 13 separately show the access control method from different perspectives for the same scenario, specifically, the case where a session to be created does not meet the encryption strength requirement. Therefore, these embodiments can be mutually referenced, and similar details will not be described in detail.

[0226] As shown in Fig. 15, a telnet client on a terminal device initiates a session creation to a telnet server. The session negotiation packet sent by the telnet client is a SYN packet. The client proxy device on the same terminal device determines based on the session negotiation packet that the session to be created is an unencrypted application and does not meet the encryption requirements. The client proxy device performs tunnel negotiation with the gateway device, negotiates to establish an HTTPS tunnel, and encrypts service packets to ensure link security. The client proxy device carries authentication information in the Connect field and the cookie field of the tunnel negotiation packet HTTP header (as shown in Fig. 5).

[0227] The gateway device performs analysis on the received tunnel negotiation packet, extracts authentication information from the Connect field and the cookie field of the tunnel negotiation packet, and interacts with the control device based on the authentication information to complete the authentication process. If the authentication fails, the gateway device terminates the establishment of a connection with the client proxy device. Then, the client proxy device closes the connection with the telnet client. If the authentication is successful, the gateway device establishes a connection with the telnet server and completes the tunnel establishment process with the client proxy device.

[0228] The client proxy device intercepts a telnet service packet (shortly called a "client telnet service packet") sent by a telnet client, performs HTTPS tunnel encapsulation on the client telnet service packet, and then sends the tunnel packet obtained by the encapsulation to the gateway device.

[0229] The gateway device receives a tunnel packet transmitted by the client proxy device through the HTTPS encrypted tunnel, performs decapsulation on the received tunnel packet to obtain a client telnet service packet, and transfers the client telnet service packet obtained by decapsulation to the telnet server.

[0230] The gateway device receives a telnet service packet (shortly called "server telnet service packet") from a telnet server, where the server telnet service packet is in response to the client telnet service packet. After performing tunnel encapsulation on the server telnet service packet, the gateway device sends the encapsulated tunnel packet to the telnet client proxy device.

[0231] The client proxy device receives the tunnel packet from the gateway device through the encrypted tunnel, performs decapsulation on the received tunnel packet to obtain a server telnet service packet, and sends the server telnet service packet obtained by decapsulation to the telnet client.

[0232] 16 is a schematic diagram of the structure of a terminal device according to an embodiment of the present application. The terminal device shown in FIG. 16 includes: a memory 162 and at least one processor 161.

[0233] Optionally, the processor 161 may implement the method of the above embodiment by reading instructions stored in the memory 162 to generate a client proxy device, or the processor 161 may implement the method of the above embodiment by generating a client proxy device via instructions stored in the memory 162. When the processor 161 implements the method of the above embodiment by reading instructions stored in the memory 162, the memory 162 stores instructions for implementing the client proxy device in the above embodiment of the present application.

[0234] The client proxy device generated by the terminal device having the structure shown in Fig. 16 implements the functions of the client proxy device in the solution described in the above embodiment. In a session initiated by an application client in the terminal device of Fig. 16 that meets the encryption strength requirement, before forwarding the session negotiation packet to the gateway device, the client proxy device carries authentication information in the transport layer packet header of the session negotiation packet, and the client proxy device does not need to further perform encrypted tunnel encapsulation. This reduces the overhead caused by additional encryption and decryption of the tunnel. Optionally, the client proxy device performs the functions of the client proxy device described in the embodiments related to Fig. 6, Fig. 7, Fig. 9, Fig. 10, Fig. 11, Fig. 14, or Fig. 15, and cooperates with the gateway device to reduce the performance overhead of the terminal device and the gateway device in the access control process.

[0235] Memory 162 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical memory, etc. Memory 162 stores the code of the operating system.

[0236] After the program instructions stored in the memory 162 are read by the at least one processor 161, the client proxy apparatus generated by the terminal device performs the following operations: an operation of intercepting a first negotiation packet, the first negotiation packet being from a first application client on the terminal device and used to perform a negotiation to establish a first session, the first session being a session between the first application client and a first server, the first session meeting an encryption strength requirement; adding authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet; sending the modified first negotiation packet to the gateway device; Execute.

[0237] Optionally, for a detailed process of the client proxy device adding authentication information corresponding to the first application client to the transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet, please refer to the description of the related embodiments in Figures 7, 8, 9, and 10 for the detailed process of sending the modified first negotiation packet to the gateway device, and the details will not be repeated in this specification.

[0238] Optionally, for the case of a session that does not meet the encryption strength requirements that is initiated by an application client in a terminal device, and the process of handling the session negotiation packet by the terminal device, please refer to the description of FIG. 11 and related embodiments above, and the details will not be repeated here.

[0239] Optionally, the terminal device shown in Fig. 16 further includes a network interface 163. The network interface 163 may be a wired interface, such as a Fiber Distributed Data Interface (FDDI) or a Gigabit Ethernet (GE) interface. Alternatively, the network interface 163 may be a wireless interface. The network interface 163 is configured to transmit packets to or receive packets transmitted by the gateway device in the embodiment shown in Fig. 6, Fig. 7, Fig. 8, Fig. 9, Fig. 10, or Fig. 11.

[0240] Optionally, the terminal device shown in Figure 16 further includes a bus 164. The processor 161 and the memory 162 are typically connected to each other via the bus 164, or may be connected to each other in another manner.

[0241] Optionally, the protection system further includes an input / output interface 165. The input / output interface 165 is configured to connect to an input device and receive identification information input by a user via the input device. The input device includes, but is not limited to, a keyboard, a touch screen, a microphone, etc. The input / output interface 165 is connected to an output device and further configured to output logs or statistics related to the access control of the processor 161, such as, for example, applications for which user authentication has failed or applications for which user authentication has succeeded. The output device includes, but is not limited to, a display, a printer, etc.

[0242] After intercepting the session negotiation packet of the session that meets the encryption strength requirement initiated by the application client, the client proxy device in the terminal device provided in the embodiment of the present application adds authentication information to the transport layer packet header of the session negotiation packet to obtain a modified session negotiation packet, and sends the modified session negotiation packet to the gateway device, so that the gateway device authenticates the terminal device and the user according to the authentication information carried in the transport layer packet header of the session negotiation packet. In this way, the original session negotiation packet of the application client is multiplexed between the client proxy device and the gateway device to implement the purpose of transferring authentication information. In this way, under the premise of ensuring the security of the connection and transferring the authentication information, the client proxy device and the gateway device do not need to establish an additional encrypted tunnel. This helps to save the processing resources consumed for performing additional tunnel negotiation in the terminal device and the gateway device, and reduces the performance overhead of the terminal device and the gateway device.

[0243] FIG. 17 is a schematic diagram of the structure of a client proxy device according to an embodiment of the present application. The client proxy device having the structure shown in FIG. 17 implements the functions of the client proxy device in the solution described in the above embodiment. In a session initiated by an application client in a terminal device where the client proxy device shown in FIG. 17 is located and meets the encryption strength requirement, before forwarding the session negotiation packet to the gateway device, the client proxy device carries authentication information in the transport layer packet header of the session negotiation packet, and the client proxy device does not need to further perform encrypted tunnel encapsulation. This reduces the overhead caused by additional encryption and decryption of the tunnel. Optionally, the client proxy device performs the functions of the client proxy device described in the embodiments related to FIG. 6, FIG. 7, FIG. 9, FIG. 10, FIG. 11, FIG. 14, or FIG. 15, and cooperates with the gateway device to enable the performance overhead of the terminal device and the gateway device in the access control process to be reduced.

[0244] The client proxy device includes a processing module 171 and a transmitting module 172 .

[0245] The processing module 171 is configured to intercept a first negotiation packet, where the first negotiation packet is from a first application client on the terminal device and is used to perform negotiation to establish a first session, where the first session is a session between the first application client and a first server, where the first session meets an encryption strength requirement, and the processing module 171 is further configured to add authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet.

[0246] The transmitting module 172 is configured to transmit the modified first negotiation packet to the gateway device.

[0247] For a detailed process of the processing module 171 adding authentication information corresponding to the first application client to the transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet, please refer to the related embodiment descriptions in Figures 7, 8, 9, 10, and 14 for the detailed process of sending the modified first negotiation packet to the gateway device, and the details will not be repeated in this specification.

[0248] Optionally, the sending module 72 is further configured to transmit subsequent packets of the first session in a stream mode after the first session is successfully established.

[0249] Optionally, the processing module 171 is further configured to intercept a second negotiation packet, where the second negotiation packet is from a second application client on the terminal device and is used to negotiate with a second server to establish a second session, where the second session does not meet the encryption strength requirement, and the processing module 171 is further configured to perform tunnel encapsulation on the second negotiation packet to obtain a tunnel negotiation packet, where a packet header of the tunnel negotiation packet includes authentication information corresponding to the second application client, and the tunnel negotiation packet is used to perform negotiation to establish an encrypted tunnel between the client proxy device and the gateway device.

[0250] Correspondingly, the sending module 172 is further configured to send the tunnel negotiation packet to the gateway device.

[0251] Optionally, for the case of a session that is initiated by an application client in a terminal device and does not meet the encryption strength requirement, and for further detailed processes of handling session negotiation packets by the terminal device, please refer to the above Figures 11 and 15 and the description of related embodiments, and the details will not be repeated here.

[0252] Figure 18 is a schematic diagram of the structure of a gateway device according to an embodiment of the present application. The gateway device having the structure shown in Figure 18 implements the function of the gateway device in the solution described in the above embodiment. Optionally, the gateway device shown in Figure 18 performs the function of the gateway device described in any one of the embodiments shown in Figure 6, Figure 12, Figure 13, Figure 14, or Figure 15, and cooperates with the client proxy device to enable the performance overhead of the terminal device and the gateway device in the access control process to be reduced.

[0253] The gateway device shown in FIG. 18 includes a memory 182 and at least one processor 181.

[0254] Optionally, the processor 181 may implement the method of the above embodiment by reading instructions stored in the memory 182, or the processor 181 may implement the method of the above embodiment via instructions stored in the processor 181. When the processor 181 implements the method of the above embodiment by reading instructions stored in the memory 182, the memory 182 stores instructions for implementing the method provided in the above embodiment of the present application.

[0255] Optionally, the at least one processor 181 may be one or more CPUs or a single-core CPU, or may be a multi-core CPU.

[0256] Memory 182 includes, but is not limited to, RAM, ROM, EPROM, flash memory, optical memory, etc. Memory 182 stores instructions for the operating system.

[0257] After the program instructions stored in the memory 182 are read by the at least one processor, the gateway device performs the following operations: an operation of receiving a first negotiation packet, the first negotiation packet being from a first client proxy apparatus and being used to perform negotiation to establish a first session, the first session being a session between a first terminal device and a first server, the first client proxy apparatus running on the first terminal device, and a transport layer packet header of the first negotiation packet carrying authentication information; An operation of initiating a first authentication based on the authentication information; an operation of skipping performing tunnel decapsulation on the first negotiation packet after the first authentication is successful, and forwarding the first negotiation packet to the first server to establish a first connection, the first connection being a connection between the gateway device and the first server; Execute.

[0258] For a detailed process of the gateway device optionally obtaining authentication information carried in the transport layer packet header of the first negotiation packet, please refer to the description of the related embodiment in Figure 12. Details will not be repeated in this specification.

[0259] For a process of processing a session negotiation packet sent by a terminal device and received by a gateway device, in which the transport layer packet header optionally does not carry authentication information, please refer to the description of Figure 13 above and related embodiments, and details will not be repeated here.

[0260] Optionally, the gateway device shown in Figure 18 further includes a network interface 183. The network interface 183 may be a wired interface, such as, for example, a FDDI or GE interface. The network interface 183 may be a wireless interface. The network interface 183 is configured to receive packets sent by or send packets to the client proxy device, or to receive packets sent by or send packets to the server in the embodiment shown in Figure 6, Figure 12, Figure 13, Figure 14, or Figure 15.

[0261] For other functions that may be performed by the gateway device after the processor 181 reads the program instructions in the memory 182, please refer to the description of the method embodiments above.

[0262] Optionally, the terminal device shown in Figure 18 further includes a bus 184. The processor 181 and the memory 182 are typically connected to each other via the bus 184 or may be connected to each other in another manner.

[0263] If the gateway device provided in the embodiment of the present application successfully authenticates the terminal device and the user based on the authentication information carried in the received session negotiation packet, there is no need to establish an additional encrypted tunnel between the client proxy device and the gateway device to transmit subsequent service packets of the session between the application client and the server created by using the session negotiation packet, which saves the processing resources consumed by the terminal device and the gateway device to perform the tunnel encapsulation or decapsulation process and the encryption and decryption process that may be involved, helps to reduce the performance overhead of the terminal device and the gateway device, and improves the overall performance of the access control system.

[0264] Figure 19 is a schematic diagram of the structure of a gateway device according to an embodiment of the present application. The gateway device having the structure shown in Figure 19 implements the function of the gateway device in the solution described in the above embodiment. Optionally, the gateway device shown in Figure 19 performs the function of the gateway device described in any one of the embodiments shown in Figure 6, Figure 12, Figure 13, Figure 14, or Figure 15, and cooperates with the client proxy device to enable the performance overhead of the terminal device and the gateway device in the access control process to be reduced.

[0265] The gateway device includes a receiving module 191, a processing module 1921, and a transmitting module 193.

[0266] The receiving module 191 is configured to receive a first negotiation packet, where the first negotiation packet is from a first client proxy apparatus and is used to perform negotiation to establish a first session, the first session being a session between a first terminal device and a first server, the first client proxy apparatus running on the first terminal device, and a transport layer packet header of the first negotiation packet carries authentication information; The processing module 192 is configured to initiate a first authentication based on the authentication information; The sending module 193 is configured to skip performing tunnel decapsulation on the first negotiation packet after the first authentication is successful, and forward the first negotiation packet to the first server to establish a first connection, where the first connection is a connection between the gateway device and the first server.

[0267] For a detailed process of the gateway device optionally obtaining authentication information carried in the transport layer packet header of the first negotiation packet, please refer to the description of the related embodiment in Figure 12. Details will not be repeated in this specification.

[0268] Optionally, the processing module 192 is further configured to establish a second connection after the first authentication is successful, where the second connection is a connection between the gateway device and the first client proxy device; The receiving module 191 is further configured to receive subsequent packets of the first session sent by the first client proxy device via the second connection; The sending module 193 is further configured to forward subsequent packets of the first session from the first client proxy device to the first server via the first connection; The receiving module 191 is further configured to receive subsequent packets of the first session from the server over the first connection; The sending module 193 is further configured to forward subsequent packets of the first session from the first server to the first client proxy device.

[0269] For a process of processing a session negotiation packet sent by a terminal device and received by a gateway device, in which the transport layer packet header optionally does not carry authentication information, please refer to the description of Figure 13 above and related embodiments, and details will not be repeated here.

[0270] For other functions that may be performed by the gateway device shown in FIG. 19, please refer to the description of the above method embodiments.

[0271] If the gateway device provided in the embodiment of the present application successfully authenticates the terminal device and the user based on the authentication information carried in the received session negotiation packet, there is no need to establish an additional encrypted tunnel between the client proxy device and the gateway device to transmit subsequent service packets of the session between the application client and the server created by using the session negotiation packet, which saves the processing resources consumed by the terminal device and the gateway device to perform the tunnel encapsulation or decapsulation process and the encryption and decryption process that may be involved, helps to reduce the performance overhead of the terminal device and the gateway device, and improves the overall performance of the access control system.

[0272] The embodiment of the device shown in FIG. 17 or FIG. 19 is merely an example. For example, the division of modules is merely a logical division of functions, and other division patterns are possible in actual implementation. For example, multiple modules or components may be combined or integrated to form another system, or some features may be ignored or not executed. The functional modules in the embodiments of the present application may be integrated into one processing module, each module may exist physically independently, or two or more modules may be integrated into one module. For example, the modules in FIG. 19 may be implemented in the form of hardware or in the form of a software functional unit. For example, when software is used for implementation, the processing module 192 may be implemented by a software functional module generated after at least one processor 181 in FIG. 18 reads a program code stored in a memory. Alternatively, the above modules in FIG. 19 may be implemented separately by different hardware in the gateway device. For example, the processing module 192 is implemented by a part of the processing resources in the at least one processor 191 in FIG. 18 (e.g., one core of a multi-core processor), and the transmitting module 191 and the receiving module 193 are implemented by the network interface 183 in FIG. 18 and the remaining processing resources in the at least one processor 181 in FIG. 18 (e.g., another core of a multi-core processor), or are implemented using a programmable device such as an FPGA or a co-processor. It is clear that the above-mentioned functional modules may alternatively be implemented using a combination of software and hardware. For example, the receiving module 191 and the transmitting module 193 are implemented using a hardware programmable device, and the processing module 192 is implemented by a software functional module generated after the CPU reads a program code stored in a memory.

[0273] An embodiment of the present application further provides an access control system, including at least one terminal device (shown in FIG. 16 or FIG. 17) and a gateway device (shown in FIG. 18 or FIG. 19). For a schematic diagram of the access control system, please refer to FIG. 6, FIG. 14, or FIG. 15.

[0274] The embodiments in this specification are all described in order, and the same or similar parts in the embodiments may be referred to those embodiments, and each embodiment focuses on the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so they are described briefly, and the relevant parts may be referred to the partial description of the method embodiments.

[0275] Those skilled in the art may appreciate that each aspect or possible implementation of each aspect of the present application may be specifically implemented as a computer program product, which refers to computer readable program code stored on a computer readable medium.

[0276] The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination thereof. For example, the computer-readable storage medium is a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM).

[0277] It is obvious that a person skilled in the art may make various modifications and variations to the present invention without departing from the scope of the present invention. The present invention is intended to cover these modifications and variations of the present application as long as they fall within the scope of protection defined by the following claims.

Claims

1. 1. An access control method performed by a client proxy apparatus running on a terminal device, the method comprising: intercepting a first negotiation packet, the first negotiation packet being from a first application client on the terminal device and used to perform a negotiation to establish a first session, the first session being a session between the first application client and a first server, the first session meeting an encryption strength requirement; adding authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet; sending the modified first negotiation packet to a gateway device; 23. An access control method comprising:

2. The first session meeting the encryption strength requirement means 2. The method of claim 1, wherein the first negotiation packet carries a specified protocol version number, a transmission security of an implementation of a protocol version corresponding to the specified protocol version number is higher than a predefined security standard, and data transmission is performed using the first session based on the protocol version.

3. The method of claim 2 , wherein the specified protocol version number comprises Transport Layer Security TLS 1.2 or TLS 1.

3.

4. The first session meeting the encryption strength requirement means 4. The method of claim 1, wherein the first negotiation packet includes a designated cipher suite identifier, the designated cipher suite identifier identifying a designated cipher suite, transmission security implemented by the designated cipher suite being higher than the default security standard, and application data of the first session being encrypted based on the designated cipher suite.

5. The method of claim 1 , wherein the first negotiation packet is a TLS packet.

6. 6. The method of claim 5, wherein the first negotiation packet is a Client Hello message.

7. 7. The method of claim 1, wherein a transport layer packet header of the modified first negotiation packet further includes indication information, the indication information enabling the gateway device to skip performing decapsulation on the modified first negotiation packet.

8. the step of adding authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet comprises: adding a transport layer security option (TLS option) field to the transport layer packet header of the first negotiation packet; and including the authentication information corresponding to the first application client in the TLS option field.

7. The method according to any one of claims 1 to 6.

9. 9. The method of claim 8, wherein the TLS option field conforms to a Type / Length / Value TLV structure, a type T field of the TLV structure being used to carry indication information that is used to enable the gateway device to skip performing a TLS decapsulation process on the modified first negotiation packet, and a value V field of the TLV structure being used to carry the authentication information.

10. The method of claim 1 , wherein the authentication information comprises a user token and / or an application token.

11. The authentication information is The method of claim 10 , further comprising a device identifier and / or address information of the first server, the address information of the first server comprising an Internet Protocol IP address and / or a port number of the first server.

12. Prior to the step of transmitting the modified first negotiation packet, the method further comprises: modifying a sequence number of the first negotiation packet based on a first difference and a length value of the TLS option field, and modifying an acknowledgment number of the first negotiation packet based on a second difference to obtain a modified first negotiation packet, wherein the first difference is a difference between a sequence number of a synchronization packet sent by the client proxy device acting as a proxy client to the first server and a sequence number of a synchronization packet sent by the first client, and the second difference is a difference between an acknowledgment number of the synchronization packet sent by the client proxy device acting as a proxy client to the first server and an acknowledgment number of the synchronization packet sent by the first client. The method of claim 8 further comprising:

13. After the step of transmitting the modified first negotiation packet to a gateway device, the method further comprises: transmitting subsequent packets of the first session in a stream mode after the first session is successfully established. The method of claim 1 , further comprising:

14. The method comprises: intercepting a second negotiation packet, the second negotiation packet being from a second application client on the terminal device and used to negotiate with a second server to establish a second session, the second session not meeting the encryption strength requirement; performing tunnel encapsulation on the second negotiation packet to obtain a tunnel negotiation packet, a packet header of the tunnel negotiation packet including authentication information corresponding to the second application client, the tunnel negotiation packet being used to perform negotiation to establish an encrypted tunnel between the client proxy device and the gateway device; sending the tunnel negotiation packet to the gateway device; The method of any one of claims 1 to 13, further comprising:

15. 15. The method of claim 14, wherein the authentication information corresponding to the second application client is carried in an application layer packet header of the tunnel negotiation packet.

16. 1. A method of access control performed by a gateway device, the method comprising: receiving a first negotiation packet, the first negotiation packet being from a first client proxy apparatus and used to perform negotiation to establish a first session, the first session being a session between a first terminal device and a first server, the first client proxy apparatus running on the first terminal device, and a transport layer packet header of the first negotiation packet carrying authentication information; initiating a first authentication based on the authentication information; skipping performing tunnel decapsulation on the first negotiation packet after the first authentication is successful, and forwarding the first negotiation packet to the first server to establish a first connection, the first connection being between the gateway device and the first server; 23. An access control method comprising:

17. 17. The method of claim 16, wherein the first negotiation packet is a Transport Layer Security (TLS) packet.

18. 20. The method of claim 17, wherein the first negotiation packet is a Client Hello message.

19. 19. The method of claim 17 or 18, wherein the authentication information is carried in a Transport Layer Security option (TLS option) field of the transport layer packet header of the first negotiation packet.

20. 20. The method of claim 16, wherein the transport layer packet header further carries indication information, the indication information enabling the gateway device to skip performing tunnel decapsulation on the first negotiation packet.

21. 20. The method of claim 19, wherein the TLS option field conforms to a Type / Length / Value TLV structure, a type T field of the TLV structure is used to carry indication information, the gateway device skips performing TLS decapsulation on modified session negotiation packets based on the indication information, and a value V field of the TLV structure is used to carry the authentication information.

22. The method comprises: establishing a second connection after the first authentication is successful, the second connection being between the gateway device and the first client proxy device; receiving subsequent packets of the first session sent by the first client proxy device over the second connection and forwarding the subsequent packets of the first session from the first client proxy device to the first server over the first connection; receiving the subsequent packets of the first session from the server over the first connection and forwarding the subsequent packets of the first session from the first server to the first client proxy device over the second connection; 22. The method of any one of claims 16 to 21, further comprising:

23. A client proxy apparatus, the client proxy apparatus running on a terminal device, the client proxy apparatus comprising: a processing module configured to intercept a first negotiation packet, the first negotiation packet being from a first application client on the terminal device and used to perform a negotiation to establish a first session, the first session being a session between the first application client and a first server, the first session meeting an encryption strength requirement, the processing module configured to add authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet; a transmitting module configured to transmit the modified first negotiation packet to a gateway device; A client proxy device comprising:

24. The first session meeting the encryption strength requirement means 24. The client proxy device of claim 23, wherein the first negotiation packet carries a specified protocol version number, a transmission security of an implementation of a protocol version corresponding to the specified protocol version number is higher than a predefined security standard, and data transmission is performed using the first session based on the protocol version.

25. 25. The client proxy device of claim 24, wherein the specified protocol version number includes Transport Layer Security TLS 1.2 or TLS 1.

3.

26. The first session meeting the encryption strength requirement means 26. A client proxy device according to claim 23, wherein the first negotiation packet includes a designated cipher suite identifier, the designated cipher suite identifier identifying a designated cipher suite, transmission security implemented by the designated cipher suite being higher than the default security standard, and application data of the first session being encrypted based on the designated cipher suite.

27. 27. The client proxy device of claim 23, wherein the first negotiation packet is a TLS packet.

28. 28. The client proxy device of claim 27, wherein the first negotiation packet is a Client Hello message.

29. 29. The client proxy apparatus of claim 23, wherein a transport layer packet header of the modified first negotiation packet further includes indication information, the indication information enabling the gateway device to skip performing decapsulation on the modified first negotiation packet.

30. 29. The client proxy device of claim 23, wherein the processing module is configured to add a Transport Layer Security option (TLS) option field to the transport layer packet header of the first negotiation packet and include the authentication information corresponding to the first application client in the TLS option field.

31. 31. The client proxy apparatus of claim 30, wherein the TLS option field conforms to a Type / Length / Value TLV structure, a type T field of the TLV structure is used to carry indication information that is used to enable the gateway device to skip performing TLS decapsulation processing on the modified session negotiation packet, and a value V field of the TLV structure is used to carry the authentication information.

32. 32. The client proxy device of claim 23, wherein the authentication information includes a user token and / or an application token.

33. 33. The client proxy device of any one of claims 23 to 32, wherein the sending module is further configured to transmit subsequent packets of the first session in a stream mode after the first session is successfully established.

34. The processing unit includes: the processing unit is further configured to intercept a second negotiation packet, the second negotiation packet being from a second application client on the terminal device and used to negotiate with a second server to establish a second session, the second session not meeting the encryption strength requirement, the processing unit is further configured to perform tunnel encapsulation on the second negotiation packet to obtain a tunnel negotiation packet, a packet header of the tunnel negotiation packet includes authentication information corresponding to the second application client, the tunnel negotiation packet being used to perform negotiation to establish an encrypted tunnel between the client proxy device and the gateway device; the sending unit is further configured to send the tunnel negotiation packet to the gateway device. A client proxy device according to any one of claims 23 to 33.

35. 35. The client proxy device of claim 34, wherein the authentication information corresponding to the second application client is carried in an application layer packet header of the tunnel negotiation packet.

36. 1. A gateway device, comprising: a receiving module configured to receive a first negotiation packet, the first negotiation packet being from a first client proxy apparatus and being used to perform negotiation to establish a first session, the first session being a session between a first terminal device and a first server, the first client proxy apparatus running on the first terminal device, and a transport layer packet header of the first negotiation packet carrying authentication information; a processing module configured to initiate a first authentication based on the authentication information; a transmitting module configured to skip performing tunnel decapsulation on the first negotiation packet after the first authentication is successful, and forward the first negotiation packet to the first server to establish a first connection, the first connection being a connection between the gateway device and the first server; , a gateway device.

37. 37. The gateway device of claim 36, wherein the first negotiation packet is a Transport Layer Security (TLS) packet.

38. 40. The gateway device of claim 37, wherein the first negotiation packet is a Client Hello message.

39. 39. The gateway device of claim 37 or 38, wherein the authentication information is carried in a Transport Layer Security option (TLS option) field of the transport layer packet header of the first negotiation packet.

40. 40. The gateway device of claim 36, wherein the transport layer packet header further carries indication information, the indication information enabling the gateway device to skip performing tunnel decapsulation on the first negotiation packet.

41. 40. The gateway device of claim 39, wherein the TLS option field conforms to a Type / Length / Value TLV structure, a type T field of the TLV structure being used to carry indication information, the gateway device skips performing TLS decapsulation on the modified session negotiation packet based on the indication information, and a value V field being used to carry the authentication information.

42. The processing module is further configured to establish a second connection after the first authentication is successful, the second connection being between the gateway device and the first client proxy device; the receiving module is further configured to receive subsequent packets of the first session transmitted by the first client proxy device over the second connection; the transmission module is further configured to forward the subsequent packets of the first session from the first client proxy device to the first server over the first connection; the receiving module is further configured to receive the subsequent packets of the first session from the server over the first connection; 42. The gateway device of claim 36, wherein the transmission module is further configured to forward the subsequent packets of the first session from the first server to the first client proxy device.

43. A terminal device including a memory and a processor, the memory is configured to store computer instructions; A terminal device, after the computer instructions have been read by the processor, the terminal device is enabled to execute the access control method according to any one of claims 1 to 15.

44. A gateway device including a memory and a processor, the memory is configured to store computer instructions; 23. A gateway device, after the computer instructions are read by the processor, the gateway device is enabled to execute the access control method according to any one of claims 16 to 22.

45. 16. A computer-readable storage medium storing computer instructions which, when executed by a processor of a terminal device, enable the terminal device to perform the access control method according to any one of claims 1 to 15.

46. 23. A computer-readable storage medium storing computer instructions which, when executed by a processor of a gateway device, enable the gateway device to perform the access control method according to any one of claims 16 to 22.

47. An access control system including a terminal device and a gateway device, wherein a client proxy apparatus runs within the terminal device; the client proxy device is configured to intercept a first negotiation packet, the first negotiation packet being from a first application client on the terminal device and used to perform negotiation to establish a first session, the first session being a session between the first application client and a first server, the first session meeting an encryption strength requirement, the client proxy device is configured to add authentication information corresponding to the first application client to a transport layer packet header of the first negotiation packet to obtain a modified first negotiation packet, and to send the modified first negotiation packet to a gateway device; the gateway device is configured to receive the modified first negotiation packet, initiate a first authentication based on the authentication information carried in the transport layer packet header of the modified first negotiation packet, and after the first authentication is successful, skip performing tunnel decapsulation on the first negotiation packet, and forward the first negotiation packet to the first server to establish a first connection, the first connection being a connection between the gateway device and the first server. Access control systems.

Citation Information

Patent Citations

  • Systems and methods for managing proxy requests on secure networks using inherited security attributes

    JP2007520797A

  • System for controlling network access of terminal based on tunnel and method thereof

    JP2021145335A

  • Network Access Control System And Method Therefor

    US20220247718A1

  • Network access control system and method therefor

    WO2021060853A1