Application access control method and device, computer equipment and storage medium
By sending UDP door knocking package after the client registration is successful and completing SPA authentication in the secure gateway, establishing a long TCP connection and closing the TCP port, the security risks of the client port being continuously opened are solved, and strong authentication and port hiding are achieved , improves security.
Patent Information
- Application Number
- CN202411035285.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-06
AI Technical Summary
In application scenarios where the security gateway is not used, the client's port continues to open after knocking on the door, is vulnerable to attacks and has security risks. The existing technology has not effectively solved this problem.
After the client successfully registers, the UDP knocking package is assembled and sent to the management node of the security gateway. The management node completes the UDP SPA authentication based on the knocking package, opens the TCP port, and establishes the client and management node based on the TCP port. long TCP connection, and then close the TCP port according to the preset shutdown policy.
It effectively avoids the security risks caused by the continuous opening of TCP ports, realizes strong authentication, anti-replay attacks and port hiding, and improves security.
Smart Images

Figure CN119094156A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to an application access control method, apparatus, computer equipment, and storage medium. Background Art
[0002] In application scenarios where a security gateway is not used, user administrators often directly expose the business system to the Internet through port mapping and other means to provide services. The relevant IP and port are mapped to the public network, and hackers can exploit the vulnerabilities of the business system itself to launch attacks. Therefore, security gateways are introduced for application scenarios with high security requirements. When the client accesses the terminal through the security gateway, it needs to be authenticated first. Currently, SPA single packet knocking is used to complete authentication; however, after knocking, the client's port must continue to be open to the terminal, which is vulnerable to attacks and poses a security risk.
[0003] In the related technologies, after knocking on the door, the client's port must be continuously open to the terminal, which is vulnerable to attack and poses a security risk. No effective solution has been proposed yet. Summary of the invention
[0004] In this embodiment, an application access control method, apparatus, computer device and storage medium are provided to solve the problem in the related art that the client port needs to be continuously open to the terminal after knocking on the door, which is vulnerable to attack and has security risks.
[0005] In the first aspect, in this embodiment, an application access control method is provided, which is applicable to a secure access system; the secure access system includes: a client, a security gateway and a terminal; the client is connected to the terminal through the security gateway; the method includes: After the client successfully registers, the client assembles a UDP knock single packet and sends it to the management node of the security gateway; In the management node, based on the knock single packet, SPA authentication of UDP is completed to open the TCP port; Based on the TCP port, establish a TCP persistent connection between the client and the management node, so that the service access of the client accesses the corresponding application in the terminal through the TCP persistent connection; Based on the preset closing strategy, the TCP port is closed.
[0006] In some of the embodiments, the security gateway further comprises a process node; the process node comprises at least two first servers; at least two of the first servers constitute a first high availability cluster node; The management node of the security gateway includes at least two second servers; at least two of the second servers constitute a second high availability cluster node; The security gateway also includes a working node; the working node includes at least one third server; and each of the first servers serves as a third node.
[0007] In some embodiments, the method further comprises: The process node forwards the registration request initiated by the client to the management node; the registration request includes terminal identity information; On the management node, in response to the administrator approving the registration request, a terminal feature code, a terminal key and a signature key are generated to complete the registration; and the terminal feature code, the terminal key and the signature key are synchronized to the first SPA of the working node for parsing the knock single packet; The client obtains a registration result; if the registration result is successful, the terminal feature code, the terminal key and the signature key are obtained for encrypting a knock-on single packet.
[0008] In some embodiments, the method further comprises: When the client accesses the B / S application of the terminal, the available working node is allocated through the management node; and the available working node is notified to open a port to the client and initialize an isolated container; the B / S application runs in the isolated container; The client sets a new window to establish a connection with the working node to create an application session; and initiates an access request based on the application session; The isolated container in the working node calls up a browser instance and opens the accessed B / S application address; at the same time, the real-time image is transmitted to the client through the VNC protocol, and the real-time image is projected in the new window of the client.
[0009] In some embodiments, the method further comprises: After opening the accessed application address, synchronizing the user's operation permissions for the corresponding application through the built-in plug-in of the browser; In response to the user's operation in the client, the built-in plug-in controls the operation according to the corresponding operation authority; the operation includes file transfer, Web access, right mouse button and clipboard operation.
[0010] In some embodiments, the method further comprises: After creating the application session, the audit service in the working node establishes a connection with the VNC service using the RFB protocol and saves the received operation message into a specified screen recording file; when playing back the screen recording, the operation message is parsed to draw the operation screen; The built-in plug-in of the browser is bound to the application session, monitors the user's operations in the client and saves the operations to the operation file, monitors the access request of the browser and records it to the preset audit log; Log file transfer messages to the audit log.
[0011] In some embodiments, the method further comprises: The client calls up a proxy subprocess to establish a Websocket communication tunnel with the session proxy service in the working node, and transmits the C / S application address to the session proxy service; Establishing a connection with the corresponding C / S application through the session proxy service and forwarding messages; The local C / S client is called up in the client, and the connection address of the C / S client is directed to the proxy subprocess, so that the proxy subprocess forwards the message.
[0012] In a second aspect, in this embodiment, an access control device for an application is provided, which is applicable to a secure access system; the secure access system includes: a client, a security gateway, and a terminal; the client is connected to the terminal through the security gateway; the device includes: An assembling unit, configured to assemble a UDP knock single packet through the client and send it to the management node of the security gateway after the client successfully registers; An authentication unit, configured to complete SPA authentication of UDP in the management node based on the knock single packet to open a TCP port; An access unit, configured to establish a TCP persistent connection between the client and the management node based on the TCP port, so that the service access of the client can access the corresponding application in the terminal through the TCP persistent connection; The closing unit is used to close the TCP port based on a preset closing strategy.
[0013] In a third aspect, a computer device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the application access control method described in the first aspect when executing the computer program.
[0014] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the access control method for the application described in the first aspect above is implemented.
[0015] Compared with the related art, the access control method, apparatus, computer equipment and storage medium of the application provided in this embodiment, after the client successfully registers, assembles a UDP knocking single packet through the client and sends it to the management node of the security gateway; in the management node, based on the knocking single packet, completes the UDP SPA authentication to open the TCP port; based on the TCP port, establishes a TCP long connection between the client and the management node, so that the client's business access can access the corresponding application in the terminal through the TCP long connection; based on the preset closing strategy, closes the TCP port, which solves the problem that the client's port has to be continuously open to the terminal after knocking, which is vulnerable to attack and has security risks. UDP and TCP are used to complete authentication, and the TCP port opened during the authentication process is closed to avoid the security risks caused by the continuous opening of the TCP port; and it has the characteristics of strong authentication, anti-replay attack and port hiding.
[0016] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 It is a structural diagram of a secure access system provided by an embodiment of the present application; Figure 2 This is a flow chart of an application access control method provided by an embodiment of the present application; Figure 3 It is a flowchart of the SPA authentication process provided by an embodiment of the present application; Figure 4 It is a flowchart of a registration process provided by an embodiment of the present application; Figure 5 is a flowchart of an application access process provided by an embodiment of the present application; Figure 6 It is a flowchart of operation control provided by an embodiment of the present application; Figure 7 It is a flowchart of an operation audit process provided by an embodiment of the present application; Figure 8 It is a flowchart of a C / S application port convergence process provided by an embodiment of the present application; Fig. 9 It is a structural block diagram of an application access control device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0019] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0020] The method embodiment provided in this embodiment can be executed in a secure access system; Figure 1 As shown, the secure access system includes: a client 10 , a security gateway 20 and a terminal 30 ; the client 10 is connected to the terminal 30 via the security gateway 20 .
[0021] The client 10 includes a client terminal (Terminal) and a C / S client; the Terminal is the client software installed on the client 10, responsible for initiating user registration and Web application access, etc. The C / S client is the client 10 of the C / S architecture; the full name of the C / S architecture is Client / Server, i.e., the architecture of the client 10 / server.
[0022] The terminal 30 includes C / S applications and B / S applications. The C / S application is an application of the C / S architecture. The B / S application is an application of the B / S architecture. The full name of the B / S architecture is Browser / Server, i.e., browser / server architecture.
[0023] Among them, the security gateway 20 includes a management node (Master), a process node (Epm) and a worker node (Worker); the process node includes at least two first servers; at least two first servers constitute a first high-availability cluster node; the process node is used to handle user access during registration, provide Terminal installation package downloads and version updates, and open port 443 to the outside. The management node includes at least two second servers; at least two second servers constitute a second high-availability cluster node. The worker node has at least one third server; each first server serves as a third node. It connects to the registered client 10 and only temporarily opens the channel (port 443) to the client 10 that has passed the SPA single package authorization and Master authentication.
[0024] The process node (Epm) includes the first Nginx and the process subnode (the first server); the first server is connected to the first Nginx through port 8443; the first Nginx is connected to the Terminal through port 443. Among them, Nginx (engine x) is a high-performance HTTP and reverse proxy web server, and also provides IMAP / POP3 / SMTP services.
[0025] The management node includes the first SPA, the second Nginx and the management module (Admin); the first SPA is connected to the Terminal through port 1445; connected to the second Nginx through port 443, and connected to the management module through port 5005, and can update the certificate. The first SPA is used to receive the client terminal UDP knock single packet signature and verify the client identity. After the verification is passed, a port (port 443) is temporarily opened to the client 10, and the client program establishes an encrypted channel with the security gateway 20 through the port. The second Nginx is connected to the first server through port 443 to forward the registration application letter message. The management module is used to provide functions such as system management, terminal management, application management, application authorization management and auditing.
[0026] The working node includes the third Nginx, the audit module (Controller), the second SPA, the session proxy service (Sessproxy-Server) for providing C / S session proxy service, the session management service (Session-Server) and the isolated container (Session-Worker); wherein the third Nginx is connected to the client terminal (Terminal) and the C / S client through port 443, connected to the management module through port 8443, connected to the audit module through port 8086, connected to the session management service through port 8080, and connected to the session proxy service through port 18081. The audit module is connected to the second Nginx through port 8443, and connected to the second SPA through port 5005 controlled by the switch firewall; it is used to forward the messages such as file transfer up and down, clipboard up and down, mouse right button, etc. of the RBI page, and record the audit log at the same time. The session proxy service is connected to the audit module to synchronize the session connection status, and is connected to the C / S application to forward TCP. The session management service is connected to the audit module to synchronize the session connection status, and is connected to the isolation container to open the browser instance. It is used for the RBI session management service and is responsible for the creation and destruction of the RBI session. The isolation container is connected to the B / S application and is used for the RBI isolation container to manage the VNC session and the start and stop of the isolation browser; it includes the session management sub-service (Vnc Server) and the browser (Chrome); the browser has a built-in browser plug-in (Chrome-Plugin). The RBI browser plug-in is connected to the audit module, which performs operations such as file transfer up and down, clipboard up and down, and mouse right-click on the RBI page, and provides Web control and file transfer control capabilities.
[0027] SPA refers to Single Packet Authorization, a network security technology that aims to improve security and efficiency by completing the authentication process through a single encrypted data packet. National cryptographic algorithms refer to domestic cryptographic algorithms, mainly SM1, SM2, SM3, and SM4. The key length and packet length are both 128 bits. RBI refers to Remote Browser Isolation, a network security measure that isolates user devices from the Internet browsing process by hosting browser activities on a remote server, ensuring that potential malicious code does not run on the local device, so that browser activities occur in a safe environment and prevent malicious website threats. VNC refers to Virtual Network Console, a remote desktop protocol that allows remote access and control of the graphical desktop of other computers over the network; based on the RFB (Remote Frame Buffer) protocol, the RFB protocol defines standards for image transmission and user input. FrameBufferUpdate message: FrameBufferUpdate is a message used to transmit image data when using the VNC (Virtual Network Computing) remote desktop application. When a VNC client connects to a VNC server, the server sends a complete FrameBufferUpdate message containing the initial screen image data. A browser plug-in is a small piece of software that runs inside a browser and can add additional functionality to the browser. User Datagram Protocol (UDP) refers to a simple datagram-oriented transport layer protocol. It provides non-connection-oriented, unreliable data stream transmission. Transmission Control Protocol (TCP) defines the format of data and confirmation information exchanged for reliable transmission between two computers, as well as the measures taken by computers to ensure the correct arrival of data. The Websocket protocol is a TCP-based communication protocol that provides a full-duplex, low-latency communication method that enables bidirectional real-time data exchange between the client 10 and the server. SNAT (Source Address Translation) refers to the conversion of the intranet IP address initiating the access to a specified IP address (specific services and corresponding ports or port ranges can be specified) when the intranet address is accessed externally. This allows hosts using reserved IP addresses in the intranet to access the external network, that is, multiple hosts in the intranet can access the external network through a valid public IP address.
[0028] In this embodiment, a method for controlling access to an application is provided. Figure 2 is a flow chart of the access control method for applications of this embodiment. Figure 2As shown, the process includes the following steps: Step S210, after the client successfully registers, the client assembles a UDP knock single packet and sends it to the management node of the security gateway; Step S220, in the management node, based on the knock single packet, complete the SPA authentication of UDP to open the TCP port; Step S230: establishing a TCP persistent connection between the client and the management node based on the TCP port, so that the client's service access can access the corresponding application in the terminal through the TCP persistent connection; Step S240, closing the TCP port based on a preset closing strategy.
[0029] Specifically, after the client successfully registers, the client must first perform SPA authentication on the corresponding terminal before accessing the security gateway. After the SPA authentication is passed, an encrypted tunnel is allowed to access the security gateway. The security gateway then authenticates the accessing user to achieve secure access to the gateway, thereby improving the security of access.
[0030] In this embodiment, the above steps can be considered as the SPA authentication process, which mainly occurs between the client terminal (Terminal) and the management node (Master); Figure 3 As shown, the SPA authentication process is: After the client is successfully registered, the user can configure the access address of the management node of the security gateway on the client terminal. The client terminal in the client assembles a UDP knock packet (UDP message) and sends it to the management node. The first SPA on the management node captures the knock packet of the specified port, parses the knock packet according to the pre-agreed message format, and obtains the terminal feature code, signature, and encrypted message body in the knock packet. Use the terminal feature code to retrieve the key and signature public key of the corresponding terminal. Use the signature public key to verify the encrypted message. If the signature is successful, continue with the decryption step. Use the key to parse the encrypted message body. If the parsing is successful and the content of this message is legal, port 1445 is temporarily opened to the client terminal corresponding to the source IP address, thereby completing the UDP SPA authentication.
[0031] The client terminal sends a TCP knock single packet (TCP message) based on port 1445, and tries to establish a TCP long connection with the management node; after the long connection is successfully established (TCP three-way handshake), the client's business access can access the corresponding application in the terminal through the TCP long connection. For example: the client terminal sends the encrypted data packet for business access again, and the management node confirms that the business access terminal is legal after signature verification and decryption, and allows the client terminal to initiate business access. The first SPA in the management node will automatically rotate and delete expired firewall policies to close the TCP port of the source IP. In other embodiments, the closing policy can also be closed at a scheduled time, that is, after the preset time is reached, the TCP port is directly closed. Both UDP knocking and TCP handshake must authenticate the terminal identity, which can prevent unregistered terminals from accessing the security gateway without knocking in the SNAT scenario.
[0032] Among them, in SPA opening mode: EPM's 443 port is open to the outside; MASTER's 1445 port is not open by default, and the client UDP knocks on the door and then briefly opens the 1445 port to the source IP; WORKER's 443 port is not open by default, and the client applies to the MASTER for application access and then the WORKER opens the 443 port to the source IP. In other embodiments, the name of the port can be determined by the user, and there is no restriction on this.
[0033] In the related art, SPA single packet knocking is used to complete authentication; however, after knocking, the client's port must be continuously open to the terminal, which is vulnerable to attack and poses a security risk. In this embodiment, after the client successfully registers, the client assembles a UDP knocking single packet and sends it to the management node of the security gateway; in the management node, based on the knocking single packet, UDP SPA authentication is completed to open the TCP port; based on the TCP port, a TCP long connection is established between the client and the management node, so that the client's business access can access the corresponding application in the terminal through the TCP long connection; based on the preset closing strategy, the TCP port is closed; the problem that the client's port must be continuously open to the terminal after knocking, which is vulnerable to attack and poses a security risk is solved, UDP and TCP are used to complete the authentication, and the TCP port opened during the authentication process is closed to avoid the security risk caused by the continuous opening of the TCP port; and it has the characteristics of strong authentication, anti-replay attack and port hiding.
[0034] In some of the embodiments, the access control method of the application further includes the following steps: The process node forwards the registration request initiated by the client to the management node; the registration request includes the terminal identity information; On the management node, in response to the administrator approving the registration request, a terminal feature code, a terminal key, and a signature key are generated to complete the registration; and the terminal feature code, the terminal key, and the signature key are synchronized to the first SPA of the working node for parsing the knock single packet; The client obtains the registration result; if the registration result is successful, the terminal feature code, terminal key and signature key are obtained to encrypt the knock package.
[0035] In this embodiment, the above steps can be considered as a registration process, which mainly occurs between the client terminal (Terminal), the process node (Epm), the management module (Admin) of the management node (Master) and the first SPA; Figure 4 As shown, the registration process is: The client terminal collects the terminal identity information of the terminal and submits the terminal registration request to the process node, and the process node forwards the registration request to the management module of the management node. Among them, the terminal identity information includes UUID, MAC and IP information.
[0036] On the management node, the administrator can approve the terminal's registration application; in response to the administrator's approval of the registration request, a terminal feature code (unique), terminal key, and signature key are generated to complete the registration. The terminal feature code, encryption key, and signature public key can be considered as the client terminal certificate; the terminal feature code, encryption key, and signature public key are then automatically synchronized to the first SPA for parsing the knock package of the client terminal. Among them, the terminal key is generated using the SM4-CBC national encryption algorithm, and the signature key is generated using the SM2WithSM3 algorithm; different encryption algorithms are used to improve security. Of course, the terminal key and signature key can be generated using other encryption algorithms, and there is no restriction on this.
[0037] The client terminal actively or passively obtains the registration application result; if the registration is successful, the terminal feature code, encryption key and signature private key are obtained for encryption of the knocking package. Specifically, the client terminal initiates a request message to obtain the registration application result; the request message is encrypted using the terminal key; the process node receives and forwards the request message to the management module; the management module uses the corresponding key to decrypt the request message and returns the approval result of the client terminal; the process node receives and forwards the approval result; the client terminal determines whether the approval is passed. If the approval is passed, the client terminal certificate (terminal feature code, terminal key and signature key) is saved. If the approval is not passed, the request message for obtaining the registration application result is returned.
[0038] In this embodiment, the security gateway can distinguish between the two roles of administrator and ordinary user; the administrator logs in to the security gateway through the Web to manage and maintain the system, and ordinary users need to log in to the security gateway through the client terminal to access the managed application. And through this embodiment, the secure access and operation control of the application are realized.
[0039] In some of the embodiments, the access control method of the application further includes the following steps: When the client accesses the B / S application of the terminal, the management node allocates available working nodes; and notifies the available working nodes to open ports to the client and initialize isolated containers; the B / S application runs in the isolated container; The client sets up a new window to establish a connection with the working node to create an application session; and initiates an access request based on the application session; The isolated container in the working node calls up the browser instance and opens the accessed B / S application address; at the same time, the real-time image is transmitted to the client through the VNC protocol and projected in a new window of the client.
[0040] In this embodiment, the above steps can be considered as an application access process, which mainly occurs between the client terminal (Terminal), the management node (Master), the working node (Worker) and the application of the terminal; Figure 5 As shown in the figure, the specific process of application access is as follows: The client terminal requests application login information based on the application ID (corresponding B / S application); the management module in the management node allocates available working nodes and applies to open the firewall of the working node; logs in to the corresponding B / S application through single sign-on to return the application login information to the client terminal.
[0041] The client sets up a new window to establish a connection with the working node to create an application session; initiates an access request based on the application session; the isolation container calls up the browser instance and opens the B / S application address to be accessed to achieve data transmission. When calling up the browser instance, if it is a single sign-on, the isolation container is set to direct to the SSO URL; the form is submitted to the current window, the login application is filled in, and the url is the app URL; if it is not a single sign-on, the isolation container is set to direct to the app URL.
[0042] Through this embodiment, the B / S application accessed by the user runs in an isolated container, thereby achieving protection of the URL address and application data.
[0043] In some of the embodiments, the access control method of the application further includes the following steps: After opening the accessed application address, synchronize the user's operation permissions for the corresponding application through the browser's built-in plug-in; In response to user operations in the client, the built-in plug-in manages the operations according to the corresponding operation permissions; the operations include file transfer, Web access, right mouse button and clipboard operations.
[0044] In this embodiment, the above steps can be considered as an operation control process, which mainly occurs between the client, the management node (Master), and the terminal application; Figure 6 As shown in the figure, the specific process of operation control is as follows: When the user logs in to the application and opens the application address to be accessed, the built-in plug-in of the browser synchronizes the user's operation permissions for the corresponding application. The user initiates an operation in the client, and in response to the user's operation in the client, the built-in plug-in controls the operation according to the corresponding operation permissions. For example: determine the matching strategy and policy type; when the keyboard and mouse operation triggers the clipboard event, the browser plug-in decides to allow or deny the operation according to the dynamic permissions and waits for the next operation. When the user performs file upload and download operations in the application, the browser plug-in decides to execute the corresponding policy action according to the file transfer policy. When the user accesses a URL address in the application, the browser plug-in decides to execute the corresponding policy action according to the Web access control policy. The corresponding policy action is determined as follows: the operation has been reviewed and the control policy has been obtained; if it is an alarm, an alarm notification is issued and the operation is executed; if the operation has been reviewed or the control policy is not matched, the current operation is ignored and the operation is executed; after the operation is executed, the next operation is waited for. If the review is rejected, the operation is rejected, a rejection / review notification message is sent, and the next operation is waited for. If the review is cut off, the operation is rejected and the session is cut off, a cut-off notification message is sent, and the session ends. If review is required, the operation will be rejected and a review request will be sent to the reviewer configured in the policy. A rejection / review notification message will be sent and the system will wait for the next operation.
[0045] Through this embodiment, permission control policies such as file transfer, Web access, right-click of the mouse, and clipboard operation are provided, which can restrict the user's operation behavior on application access and avoid information leakage caused by illegal operations.
[0046] In some of the embodiments, the access control method of the application further includes the following steps: After creating the application session, the audit service in the working node uses the RFB protocol to establish a connection with the VNC service and saves the received operation messages to the specified screen recording file; when playing back the screen recording, the operation messages are parsed to draw the operation screen; The browser's built-in plug-in is bound to the application session, monitors the user's operations in the client and saves the operations to the operation file, monitors the browser's access requests and records them in the preset audit log; Log file transfer messages to the audit log.
[0047] In this embodiment, the above steps can be considered as an operation audit process, which mainly occurs between the client terminal (Terminal), the audit module (Controller), the session management sub-service (Vnc Server) and the browser plug-in (Chrome-Plugin); Figure 7 As shown in the figure, the specific process of operation audit is as follows: The client terminal initiates application access, which enables the audit module to create an application session and start recording the application session. The audit module and the session management subservice use the RFB protocol to establish a connection with the VNC service and receive the FrameBufferUpdate message. The session management subservice returns the FrameBufferUpdate message to the audit module. The audit module saves the audit recording file. After the application session is created, the browser's built-in plug-in is bound to the application session, monitors the user's operations in the client, and saves the operations to the operation file (mouse and keyboard operation file). If the client terminal initiates a file transfer, the audit module forwards the message and records it in the audit log, and the browser plug-in performs the file transfer operation. If the client terminal initiates a URL access, the browser plug-in monitors the access operation, and the audit module records it in the audit log.
[0048] Through this embodiment, the screen recording, keyboard and mouse operations, file transfer, and URL access generated during the access to the B / S application will be recorded. When the screen recording is played back, the operations will be associated in chronological order to restore the entire B / S application access process, which is convenient for users to use later.
[0049] In some of the embodiments, the access control method of the application further includes the following steps: The client calls up the proxy child process to establish a Websocket communication tunnel with the session proxy service in the working node, and transmits the C / S application address to the session proxy service; Establish a connection with the corresponding C / S application through the session proxy service and forward messages; In the client, call up the local C / S client, point the connection address of the C / S client to the proxy subprocess, and the proxy subprocess forwards the message.
[0050] In this embodiment, the above steps can be considered as the C / S application port convergence process, which mainly occurs between the C / S client, the client terminal (Terminal), the session proxy service (Sessproxy-Server) and the C / S application; Figure 8 As shown in the figure, the specific process of C / S application port convergence is as follows: The client terminal obtains the address (IP+PORT) for accessing the C / S application, starts the client terminal proxy subprocess and listens to a random port, calls up the C / S client, initiates a Websocket connection and carries the C / S application address parameter; after initiating the Websocket connection and carrying the C / S application address parameter, the session proxy service establishes a Websocket connection, parses the parameter to obtain the C / S application address, and uses the C / S application address to initiate a TCP connection; then the C / S application will establish a TCP connection and send and receive messages based on the TCP connection; the session proxy service and the client terminal forward the message to the C / S client. After calling up the C / S client, the C / S client will establish a TCP connection with the subprocess to send and receive messages.
[0051] Through this embodiment, the Websocket protocol is used to implement the proxy of client access traffic, which can not only realize two-way message forwarding, but also realize port convergence, thereby reducing the exposure of the attack surface.
[0052] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0053] In this embodiment, an access control device for an application is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "sub-unit", etc. used below may implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation in hardware, or a combination of software and hardware, is also possible and conceivable.
[0054] Fig. 9 is a structural block diagram of the access control device for the application of this embodiment, such as Fig. 9 As shown, the device comprises: The assembling unit 210 is used to assemble a UDP knock single packet through the client and send it to the management node of the security gateway after the client successfully registers; The authentication unit 220 is used to complete the SPA authentication of UDP based on the knock single packet in the management node to open the TCP port; The access unit 230 is used to establish a TCP persistent connection between the client and the management node based on the TCP port, so that the client's service access can access the corresponding application in the terminal through the TCP persistent connection; The closing unit 240 is used to close the TCP port based on a preset closing strategy.
[0055] Through the above device, the problem that the client port has to be continuously open to the terminal after knocking on the door, which is vulnerable to attacks and has security risks is solved. UDP and TCP are used to complete authentication, and the TCP port opened during the authentication process is closed to avoid the security risks caused by the continuous opening of the TCP port; and it has the characteristics of strong authentication, anti-replay attack and port hiding.
[0056] In some of the embodiments, the security gateway further comprises a process node; the process node comprises at least two first servers; the at least two first servers constitute a first high availability cluster node; The management node of the security gateway includes at least two second servers; the at least two second servers constitute a second high availability cluster node; The security gateway also includes a working node; the working node includes at least one third server; and each first server serves as a third node.
[0057] In some of the embodiments, the access control device for an application further includes: The registration module is used by the process node to forward the registration request initiated by the client to the management node; the registration request includes the terminal identity information; On the management node, in response to the administrator approving the registration request, a terminal feature code, a terminal key, and a signature key are generated to complete the registration; and the terminal feature code, the terminal key, and the signature key are synchronized to the first SPA of the working node for parsing the knock single packet; The client obtains the registration result; if the registration result is successful, the terminal feature code, terminal key and signature key are obtained to encrypt the knock package.
[0058] In some of the embodiments, the access control device for an application further includes: The application access unit is used to allocate available working nodes through the management node when the client accesses the B / S application of the terminal; and notify the available working nodes to open ports to the client and initialize the isolated container; the B / S application runs in the isolated container; The client sets up a new window to establish a connection with the working node to create an application session; and initiates an access request based on the application session; The isolated container in the working node calls up the browser instance and opens the accessed B / S application address; at the same time, the real-time image is transmitted to the client through the VNC protocol and projected in a new window of the client.
[0059] In some of the embodiments, the access control device for an application further includes: The operation control unit is used to synchronize the user's operation permissions for the corresponding application through the built-in plug-in of the browser after opening the application address to be accessed; In response to user operations in the client, the built-in plug-in manages the operations according to the corresponding operation permissions; the operations include file transfer, Web access, right mouse button and clipboard operations.
[0060] In some of the embodiments, the access control device for an application further includes: The operation audit unit is used to establish a connection between the audit service in the working node and the VNC service using the RFB protocol after creating an application session, and save the received operation message to the specified screen recording file; when playing back the screen recording, the operation message is parsed to draw the operation screen; The browser's built-in plug-in is bound to the application session, monitors the user's operations in the client and saves the operations to the operation file, monitors the browser's access requests and records them in the preset audit log; Log file transfer messages to the audit log.
[0061] In some of the embodiments, the access control device for an application further includes: The C / S application port convergence unit is used for the client to call up the proxy subprocess to establish a Websocket communication tunnel with the session proxy service in the working node, and transmit the C / S application address to the session proxy service; Establish a connection with the corresponding C / S application through the session proxy service and forward messages; In the client, call up the local C / S client, point the connection address of the C / S client to the proxy subprocess, and the proxy subprocess forwards the message.
[0062] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0063] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0064] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0065] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: S1, after the client successfully registers, the client assembles a UDP knock packet and sends it to the management node of the security gateway; S2, in the management node, completes UDP SPA authentication based on the knock single packet to open the TCP port; S3, based on the TCP port, establish a TCP persistent connection between the client and the management node, so that the client's business access can access the corresponding application in the terminal through the TCP persistent connection; S4, closes the TCP port based on the preset closing strategy.
[0066] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0067] In addition, in combination with the application access control method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, the application access control method of any one of the above embodiments is implemented.
[0068] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0069] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0070] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0071] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A method for controlling access to an application, characterized in that: Suitable for secure access systems; The secure access system comprises: a client, a secure gateway and a terminal; the client is connected to the terminal via the secure gateway; the method comprises: After the client successfully registers, the client assembles a UDP knock packet and sends it to the management node of the security gateway; In the management node, based on the knock single packet, SPA authentication of UDP is completed to open the TCP port; Based on the TCP port, establish a TCP persistent connection between the client and the management node, so that the service access of the client accesses the corresponding application in the terminal through the TCP persistent connection; Based on the preset closing strategy, the TCP port is closed.
2. The method for controlling access to an application according to claim 1, characterized in that: The security gateway further comprises a process node; the process node comprises at least two first servers; at least two of the first servers constitute a first high availability cluster node; The management node of the security gateway includes at least two second servers; at least two of the second servers constitute a second high availability cluster node; The security gateway also includes a working node; the working node includes at least one third server; and each of the first servers serves as a third node.
3. The access control method for applications according to claim 2, characterized in that: The method further comprises: The process node forwards the registration request initiated by the client to the management node; the registration request includes terminal identity information; On the management node, in response to the administrator approving the registration request, a terminal feature code, a terminal key and a signature key are generated to complete the registration; and the terminal feature code, the terminal key and the signature key are synchronized to the first SPA of the working node for parsing the knock single packet; The client obtains a registration result; if the registration result is successful, the terminal feature code, the terminal key and the signature key are obtained for encrypting a knock-on single packet.
4. The method for controlling access to an application according to claim 2, characterized in that: The method further comprises: When the client accesses the B / S application of the terminal, the available working node is allocated through the management node; and the available working node is notified to open a port to the client and initialize an isolated container; the B / S application runs in the isolated container; The client sets a new window to establish a connection with the working node to create an application session; and initiates an access request based on the application session; The isolated container in the working node calls up a browser instance and opens the accessed B / S application address; at the same time, the real-time image is transmitted to the client through the VNC protocol, and the real-time image is projected in the new window of the client.
5. The application access control method according to claim 4, characterized in that: The method further comprises: After opening the accessed application address, synchronizing the user's operation permissions for the corresponding application through the built-in plug-in of the browser; In response to the user's operation in the client, the built-in plug-in controls the operation according to the corresponding operation authority; the operation includes file transfer, Web access, right mouse button and clipboard operation.
6. The method for controlling access to an application according to claim 4, characterized in that: The method further comprises: After creating the application session, the audit service in the working node establishes a connection with the VNC service using the RFB protocol and saves the received operation message into a specified screen recording file; when playing back the screen recording, the operation message is parsed to draw the operation screen; The built-in plug-in of the browser is bound to the application session, monitors the user's operations in the client and saves the operations to the operation file, monitors the access request of the browser and records it to the preset audit log; Log file transfer messages to the audit log.
7. The method for controlling access to an application according to claim 2, characterized in that: The method further comprises: The client calls up a proxy subprocess to establish a Websocket communication tunnel with the session proxy service in the working node, and transmits the C / S application address to the session proxy service; Establishing a connection with the corresponding C / S application through the session proxy service and forwarding messages; The local C / S client is called up in the client, and the connection address of the C / S client is directed to the proxy subprocess, so that the proxy subprocess forwards the message.
8. An application access control device, characterized in that: Suitable for secure access systems; The secure access system comprises: a client, a secure gateway and a terminal; the client is connected to the terminal via the secure gateway; the device comprises: An assembling unit, configured to assemble a UDP knock single packet through the client and send it to the management node of the security gateway after the client successfully registers; An authentication unit, configured to complete SPA authentication of UDP in the management node based on the knock single packet to open a TCP port; An access unit, configured to establish a TCP persistent connection between the client and the management node based on the TCP port, so that the service access of the client can access the corresponding application in the terminal through the TCP persistent connection; The closing unit is used to close the TCP port based on a preset closing strategy.
9. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the application access control method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the access control method for an application according to any one of claims 1 to 7 are implemented.
